Commit graph

9114 commits

Author SHA1 Message Date
Pirama Arumuga Nainar
fa4ff9defd Merge "Update RS to use latest Clang-2812033 prebuilts as well." 2016-05-04 21:00:07 +00:00
Colin Cross
2614bdb876 Merge "Update path to reverse_path.py" 2016-05-03 21:13:22 +00:00
Colin Cross
367ab2989a Update path to reverse_path.py
Change-Id: I98902e94a99fae7f9e738a872a83acb98d32c781
2016-05-02 15:31:17 -07:00
Igor Murashkin
11821a1e1e Merge "old-cts: Add testng and libcoreoj test support" 2016-05-02 20:40:09 +00:00
Stephen Hines
348b81a404 Update RS to use latest Clang-2812033 prebuilts as well.
Change-Id: I62e294e2b8c882c235a6ac7518fa352acd46e055
2016-04-29 16:50:48 -07:00
Chih-Hung Hsieh
30f86e4ab8 Suppress google-* checks in vendor modules.
Too many warnings in vendor code that we cannot fix yet.

Bug: http://b/27779618
Change-Id: I8b65b1fd55c4e4d0dadf0617ab25962809237309
2016-04-29 15:16:59 -07:00
Stephen Hines
fb737e9002 Merge "Switch to clang-2812033." 2016-04-27 22:33:05 +00:00
Yabin Cui
e13b4c61bd Merge "Use strip mode mini-debug-info by default except on mips." 2016-04-27 19:19:06 +00:00
Yabin Cui
700883eadd Use strip mode mini-debug-info by default except on mips.
Bug: 27923447
Change-Id: I818dea44f126155b4b9b3cd929823d8eda1a1174
2016-04-26 17:39:59 -07:00
Igor Murashkin
2d9bba9735 old-cts: Add testng and libcoreoj test support
Bug: 27521545
Change-Id: I2a954401ce47604987a437a2741bcab252d32707
2016-04-26 17:00:22 -07:00
Ying Wang
f8d15d6f3f Warn if there is file with unknown suffix in Java module's sources.
This helps catch extra ) at the end of LOCAL_SRC_FILES.

Bug: 28389144
Change-Id: I0ab536b5bb47338ebf5bdf531835d58f527ccf67
2016-04-26 15:59:06 -07:00
Mohammed Habibulla
a48eb99f41 Merge "ccache: Allow external setting of CCACHE_COMPILERCHECK variable" 2016-04-26 22:14:17 +00:00
Stephen Hines
e8b87607c8 Switch to clang-2812033.
Bug: http://b/25291096
Change-Id: I630b7e8a682e3c3b82ad9837b664c1155497618f
2016-04-26 14:34:24 -07:00
Chih-Hung Hsieh
460171a3e4 Add tidy.mk to set up global default checks.
* Default checks include only google* minus google-readability*.
* Some google-* checks are disabled for external projects.
* Each project can add more or disable checks through LOCAL_TIDY_CHECKS.

Bug: http://b/27779618
Change-Id: I83eed73bd2bddaace565a6dde532fb2036b4fac4
2016-04-25 12:17:03 -07:00
Nikola Veljkovic
f738562316 Switch mips64 back to NDK r10.
The NDK doesn't support mips32r6, and the update of prebuilts/ndk to
r11 doesn't have the hack that r10 did. Revert back to r10, until we
decide on a more appropriate solution.

Change-Id: I7891603d8ccbb20398aad893b62c1debf353ef41
2016-04-22 14:17:00 -07:00
Treehugger Robot
93fdee98a9 Merge "Update the path to clean_header.py on the documentation." 2016-04-22 18:11:18 +00:00
Alex Deymo
be0e7c9894 Update the path to clean_header.py on the documentation.
Bug: None
Change-Id: I8064c67b6066613b51a581ec67476797690418ae
2016-04-22 10:18:15 -07:00
Yohann Roussel
5ce149b76a Merge changes I6e98fc65,Ia8665e7c
* changes:
  Remove bootclasspath handling for Jack
  Remove static libraries from Jack classpath
2016-04-22 15:51:50 +00:00
Yohann Roussel
ae2fc81706 Remove bootclasspath handling for Jack
Bootclasspath libraries are already added in LOCAL_JAVA_LIBRARIES by
java.mk and host_dalvik_java_library.mk meaning that bootclasspath
handling was just doing a duplicate work and adding duplicated entries
to the classpath.

Also fix order of bootclasspath libraries for host.

Bug: 28307907
Change-Id: I6e98fc651a127435c029de65285dbf2cb04844af
2016-04-22 09:29:32 +02:00
Chih-hung Hsieh
3f03b10654 Merge "Call clang-tidy based on WITH_TIDY* variables." 2016-04-21 21:01:45 +00:00
Chih-Hung Hsieh
a9a55c7c7e Call clang-tidy based on WITH_TIDY* variables.
* Call clang-tidy before every C/C++ compilation if
  (1) clang-tidy is found at $(PATH_TO_CLANG_TIDY)
  (2) $(my_clang) is true
  (3) LOCAL_TIDY is 1 or true, or
      LOCAL_TIDY is undefined and WITH_TIDY is 1 or true.
* clang-tidy is called with -checks=$(my_tidy_checks),
  which has default '-*,google*,-google-readability*'
  and can be overwritten by WITH_TIDY_CHECKS.
* LOCAL_TIDY_CHECKS is appended to $(my_tidy_checks)
* Extra flags are passed to clang-tidy through
  WITH_TIDY_FLAGS or LOCAL_TIDY_FLAGS.
* To quickly find and fix clang-tidy warnings, set $(WITH_TIDY_ONLY)
  to 1 or true to skip compilation of C/C++ files.
* Add a PHONY tidy_only target,
  which includes all $(cpp_objects) and $(c_objects).
* The 'mm' and 'mmm' functions are changed to call make with
  the 'tidy_only' target when WITH_TIDY_ONLY is true or 1.
  In that case, only clang-tidy is called for C and C++ files.

Bug: http://b/27779618
Change-Id: I8adcfff217d68af49849b79aacee7d7654cafb1b
2016-04-21 12:31:13 -07:00
Yohann Roussel
2dc79b11cd Remove static libraries from Jack classpath
Those libraries are already imported (or added to the classpath in the
case of the check command) meaning that they were all duplicated.
In addition to complicating the build this was also slowing down the
compilation.

Bug: 28307907
Change-Id: Ia8665e7c5ad8b567bd02de7839fa62e67a5668f7
2016-04-21 17:40:55 +02:00
Shinichiro Hamaji
bd0bab233d Merge "Add input dependencies to .img targets" 2016-04-21 06:10:38 +00:00
Shinichiro Hamaji
71211d8a0a Merge "Add normalize_path.py to prerequisites" 2016-04-21 05:34:06 +00:00
Ying Wang
c24740fdc8 Merge "Allow to build native tests for translation arch only." 2016-04-20 20:58:17 +00:00
Ying Wang
626302262c Allow to build native tests for translation arch only.
- To build a native test for translation arch only, use:
  LOCAL_MODULE_TARGET_ARCH := <translation arch>
- Also disable building .odex for translation arch for Java libraries.

Bug: 27526885
Change-Id: I063e8876781c4424da7abebf1b9b7cb842ce205f
(cherry-pick from commit d90eb21cd7)
2016-04-20 13:57:22 -07:00
Colin Cross
5cde746042 Make jack_check_timestamp depend on setup-jack-server
Some builds were failing with:
[  3% 2226/61362] /bin/bash out/target/common/obj/JAVA_LIBRARIES/core-all_intermediates/jack.check.timestamp.rsp
FAILED: /bin/bash out/target/common/obj/JAVA_LIBRARIES/core-all_intermediates/jack.check.timestamp.rsp
No Jack server running. Try 'jack-admin start-server'

While jack-admin was running concurrently:
[  3% 2226/61362] /bin/bash -c "(prebuilts/sdk/tools/jack-admin stop-server 2>&1 || (exit 0) ) && (prebuilts/sdk/tools/jack-admin kill-server 2>&1 || (exit 0) ) && (prebuilts/sdk/tools/jack-admin uninstall-server 2>&1 || (exit 0) ) && (prebuilts/sdk/tools/jack-admin install-server prebuilts/sdk/tools/jack-launcher.jar prebuilts/sdk/tools/jack-server-4.8.ALPHA.jar  2>&1 || (exit 0) ) && (mkdir -p \"/buildbot/dist_dirs/git_nyc-dev-mac-sdk_phone_armv7-sdk/2779793/logs/jack/\" ) && (JACK_SERVER_VM_ARGUMENTS=\"-Dfile.encoding=UTF-8 -XX:+TieredCompilation -Dcom.android.jack.server.log.file=/buildbot/dist_dirs/git_nyc-dev-mac-sdk_phone_armv7-sdk/2779793/logs/jack/jack-server-%u-%g.log\" prebuilts/sdk/tools/jack-admin start-server 2>&1 || exit 0 ) && (prebuilts/sdk/tools/jack-admin update server prebuilts/sdk/tools/jack-server-4.8.ALPHA.jar 4.8.ALPHA 2>&1 || exit 0 ) && (prebuilts/sdk/tools/jack-admin update jack prebuilts/sdk/tools/jacks/jack-2.28.RELEASE.jar 2.28.RELEASE || exit 47; prebuilts/sdk/tools/jack-admin update jack prebuilts/sdk/tools/jacks/jack-3.26.ALPHA.jar 3.26.ALPHA || exit 47; prebuilts/sdk/tools/jack-admin update jack prebuilts/sdk/tools/jacks/jack-3.27.BETA.jar 3.27.BETA || exit 47; prebuilts/sdk/tools/jack-admin update jack prebuilts/sdk/tools/jacks/jack-3.30.BETA.jar 3.30.BETA || exit 47 )"
Stopping background server
Killing background server
No Jack server to kill
Removing jack server from "/Users/android-build/.jack-server"
Installing jack server in "/Users/android-build/.jack-server"
Launching Jack server java -XX:MaxJavaStackTraceDepth=-1 -Djava.io.tmpdir=/buildbot/tmp -Dfile.encoding=UTF-8 -XX:+TieredCompilation -Dcom.android.jack.server.log.file=/buildbot/dist_dirs/git_nyc-dev-mac-sdk_phone_armv7-sdk/2779793/logs/jack/jack-server-%u-%g.log -cp /Users/android-build/.jack-server/launcher.jar com.android.jack.launcher.ServerLauncher

(cherry picked from commit febe2bcc21)

Change-Id: I406afc87b4f7dda49406c4e1674430d223914e8d
2016-04-20 09:36:45 +02:00
Stephen Hines
a58cefb683 Merge "Enable asan/ubsan for mips" 2016-04-20 04:44:39 +00:00
Ying Wang
c160c3f21a Don't reset LOCAL_*MODULE_STEM.
By resetting we lose LOCAL_*MODULE_STEM values for the second include
of the *_internal.mk.
We don't need to reset because we now store the default value to a
temporary variable my_*module_stem in configure_module_stem.mk.

Bug: 27775991
Change-Id: I36d1ff3d177818677fb38bdb3d340dd2ff34c404
2016-04-19 12:20:47 -07:00
Shinichiro Hamaji
3deb87d5fd Add input dependencies to .img targets
They should have build/tools/releasetools/*.py as their
prerequisites.

Bug: 27954979
Change-Id: I51595fc91caaad38be3e47befb5df7ac2683bf14
2016-04-19 18:41:27 +09:00
Neil Fuller
8c5698d220 Merge "Add core-lambda-stubs to default classpath for target libs compiling using javac" 2016-04-19 08:13:23 +00:00
Shinichiro Hamaji
d50001e74a Add normalize_path.py to prerequisites
Bug: 27954979
Change-Id: I1e22eb4f42a8cb348ce1101e207e239bc5aa7976
2016-04-19 16:22:27 +09:00
Yabin Cui
b34f69f849 Merge "Revert "Use strip mode mini-debug-info by default."" 2016-04-19 03:42:04 +00:00
Yabin Cui
3aa7df592b Revert "Use strip mode mini-debug-info by default."
This reverts commit 0e131e7e2c.

breaks in aosp_mips-eng

Change-Id: I468b0a47c878ffde9afc78442e8d4f0dabf7eb6e
2016-04-19 03:38:34 +00:00
Yabin Cui
c7eab6db27 Merge "Use strip mode mini-debug-info by default." 2016-04-19 02:52:21 +00:00
Dan Austin
7984620461 Merge "Adding gcc-specific disable of Wattributes in preparation for libcxx rebase." 2016-04-18 18:23:11 +00:00
Neil Fuller
eed17d84cc Add core-lambda-stubs to default classpath for target libs compiling using javac
In order to compile lambda code javac requires various invokedynamic-
related classes to be present. This change adds stubs needed for
javac to compile lambdas.

Bug: 27475234
Bug: 26753820
Bug: 26604040
(cherry picked from commit b08544ed7d)

Change-Id: Ie82600da21a9dbe2348e96aef1c5e966a7a1ef5a
2016-04-18 16:38:54 +01:00
Yabin Cui
0e131e7e2c Use strip mode mini-debug-info by default.
Bug: 27923447
Change-Id: If52eed69ea5c2e91bffacdb8520bf53deafced3e
2016-04-15 17:42:17 -07:00
Yabin Cui
9a02623eb6 Merge "Add strip mode mini-debug-info." 2016-04-16 00:23:50 +00:00
Yabin Cui
fab7995cd8 Add strip mode mini-debug-info.
Mini-debug-info strip mode strips most debug information, but
maintains minimal debugging information similar to
https://sourceware.org/gdb/onlinedocs/gdb/MiniDebugInfo.html.

Bug: 27923447

Change-Id: I0405f0b3c33cb3cadeafbd22ce94d645c4dbe7b9
2016-04-15 16:12:00 -07:00
Tao Bao
d5cd404f6e Makefile: Pack squashfs and f2fs tools into otatools.zip.
The following tools are essential to create squashfs and f2fs images
during signing (if applicable).

squashfs: mksquashfs and mksquashfsimage.sh
f2fs: make_f2fs and mkf2fsuserimg.sh

Bug: 28179154
Change-Id: Ia48bc6d9a40d2667bc6f2c973bd0c55eed7a06fc
(cherry picked from commit cffaf73f84)
2016-04-14 15:13:46 -07:00
Yohann Roussel
6f4f2a7793 Merge "Allow to force min sdk given to Jack" 2016-04-14 21:14:38 +00:00
Yohann Roussel
109141ccc9 Allow to force min sdk given to Jack
Allows setting the min sdk version for target Jack commands,
overriding the default value obtained from LOCAL_SDK_CURRENT.

Bug: 28188420
Change-Id: I1b84ad8a7b6ae30639f8ade455c1e542af5692e4
2016-04-14 20:59:47 +00:00
Ying Wang
98f7a5c744 Merge "Reject Google's build of JDK." 2016-04-14 18:49:07 +00:00
Ying Wang
22b23b9b00 Reject Google's build of JDK.
Bug: 28097637
Change-Id: I8afbd48230bdd1f198a873f72df1c178bed38d0e
2016-04-14 11:34:04 -07:00
David Zeuthen
25328627ba Add support for Brillo partitioning.
To generate partition tables in the Android build system, simply add
the path to a .bpt file to the BOARD_BPT_INPUT_FILES variable.

 BOARD_BPT_INPUT_FILES += "hardware/bsp/vendor/soc/board/board-specific.bpt"

The variable BOARD_BPT_DISK_SIZE can be used to specify or override
the disk size, for example:

 BOARD_BPT_DISK_SIZE := "10 GiB"

Additional arguments to 'bpttool make_table' can be specified in the
variable BOARD_BPT_MAKE_TABLE_ARGS.

If BOARD_BPT_INPUT_FILES is set, the build system generates two files

 partition-table.img
 partition-table.bpt

in ${ANDROID_PRODUCT_OUT} using 'bpttool make_table'. The former is
the binary partition tables generated using bptool's --output_gpt
option and the latter is a JSON file generated using the --output_json
option. These files will also be put in the IMAGES/ directory of
target-files.zip when running 'm dist'.

BUG=27831397
TEST=Manually tested.

Change-Id: Iedd15354afb2dd483dcb9bc001360b2a37fd6dc0
2016-04-13 12:45:20 -04:00
Shinichiro Hamaji
f221cbba42 Merge "Always use ensure_start to ensure goma's daemon runs" 2016-04-13 05:07:01 +00:00
Treehugger Robot
5f3b3689af Merge "Add support for LOCAL_EXPORT_*_LIBRARY_HEADERS" 2016-04-12 21:24:51 +00:00
Christopher Wiley
ff1c3f2b05 Add support for LOCAL_EXPORT_*_LIBRARY_HEADERS
Listing a library in any of:

  LOCAL_EXPORT_SHARED_LIBRARY_HEADERS
  LOCAL_EXPORT_STATIC_LIBRARY_HEADERS

will cause the headers exported by that library to be exported from
the current library target as well.

This means that when library A's public headers include headers from
library B, library C which consumes A no longer has to explicitly list
A and B in its LOCAL_SHARED_LIBRARIES for the purpose of picking up B's
headers.

Bug: 27804373
Test: Introduced dependency on libbase to libbinder at the header level.
      Libraries that consume libbinder do not need to explicitly depend
      on libbase.

Change-Id: If69079f058a4a182c5ef5a3c5ba15035570da22d
2016-04-12 09:27:29 -07:00
Shinichiro Hamaji
91609e249a Always use ensure_start to ensure goma's daemon runs
Recent goma client automatically restarts when GOMA_*
environment variable changes. http://b/25676777 was fixed
2 months ago, so there wouldn't be old goma client.

Change-Id: I3b5419ce4bae4cf8180d8d0a53d2b4218d317fec
2016-04-12 18:14:28 +09:00
Andreas Gampe
907fb03273 Build: Add ART_BOOT_IMAGE_EXTRA_ARGS
Allow to modify the boot image compilation. Can be used to easily
dump initialization failures.

Bug: 27265238
Change-Id: I9d54c562a2e623b23b7c1dea9cdbe303786c95dd
2016-04-11 15:10:09 -07:00
Sebastien Hertz
cb49804e06 Merge "Update code coverage filtering" 2016-04-11 14:31:35 +00:00
Sebastien Hertz
74ec3f49d1 Update code coverage filtering
Replaces old LOCAL_EMMA_COVERAGE_FILTER by new variables:
- LOCAL_JACK_COVERAGE_INCLUDE_FILTER for included classes
- LOCAL_JACK_COVERAGE_EXCLUDE_FILTER for excluded classes
Both variables can contain a comma-separated list of class names,
where * and ? are accepted wildcard (like foo.?ar.*).

When code coverage is enabled, we will use these variables to
pass code coverage filters on the Jack command-line.

Bug: 28014424
Change-Id: Ic29c99b6feb7ea2251c29d659e7ea1f1c46d1ed1
2016-04-08 10:26:49 +02:00
Colin Cross
4e2c57ab0a Pass SANTIIZE_HOST and SANITIZE_TARGET to soong
Change-Id: I80e2e386db3367383454adb1b0785b10e13a4c58
2016-04-07 13:33:06 -07:00
Shinichiro Hamaji
4eaeef8df7 Add jack's argument files to prerequisites
Dex files should be updated when jack-default.args or
proguard*.flags are modified.

Bug: 27954979
Change-Id: I72a7084302f4ef92a89a8068f03f790dd7acd582
2016-04-07 18:56:42 +09:00
Shinichiro Hamaji
4d69fbf5be Merge "Add Bison binary and its data to prerequisite" 2016-04-07 03:48:31 +00:00
Shinichiro Hamaji
5e2d7f3204 Merge "Fix dependencies of protoc with nanopb-c plugin" 2016-04-07 03:48:02 +00:00
Dan Austin
75e7af10b9 Adding gcc-specific disable of Wattributes in preparation for libcxx rebase.
Change-Id: Ida49761801e58b2475e006525e3ea2bbad3731af
2016-04-06 18:35:07 +00:00
Shinichiro Hamaji
a3184dc2ae Fix dependencies of protoc with nanopb-c plugin
Bug: 27954979
Change-Id: Ic06b5288b092d8ea5225516069845bfc2ffa9cd1
2016-04-06 13:54:03 +09:00
Shinichiro Hamaji
b708bc5533 Add Bison binary and its data to prerequisite
Bug: 27954979
Change-Id: Id68425ef85c07b9bd06d9640f4bf96270af1b893
2016-04-06 13:46:02 +09:00
Dan Albert
a6a6285686 Merge "Remove mips special case." 2016-04-05 18:51:16 +00:00
Sebastien Hertz
2e8a1fc966 Merge "Fix code coverage for apps" 2016-04-05 09:20:21 +00:00
Dan Albert
ce2fe3c121 Remove mips special case.
The NDK doesn't have an r6 subdir.

Bug: http://b/28009632
Change-Id: I482723a1b7400ed13dc70acad24fbed96683f460
2016-04-05 00:28:35 -07:00
Sen Jiang
aef8e28fa6 Merge "Remove libdivsufsort shared library from otatools." 2016-04-04 21:43:11 +00:00
Elliott Hughes
fcbd4d8bfc Merge "libm's headers have moved to live with their libc cousins." 2016-04-04 20:44:35 +00:00
Sen Jiang
f1ae051bb0 Remove libdivsufsort shared library from otatools.
The library is now a static library.

Bug: 26955860
Change-Id: I64525737da1451895c255a30904a1e3e4ad8d253
2016-04-04 13:44:06 -07:00
Dan Albert
66dcc50c71 Merge "Update NDK libc++ header paths." 2016-04-04 20:27:42 +00:00
Elliott Hughes
1598df4c7d libm's headers have moved to live with their libc cousins.
(To reduce the need for this kind of thing in the various build systems.)

Change-Id: I4430a76a749262b0234c194434b331f7294da009
2016-04-04 12:58:50 -07:00
Mohamad Ayyash
95fe0025c1 Always build squashfs host tools
Now that mac compatibility has been fixed

BUG: 27657762
Change-Id: I49933ccedf74b9d172967dad721971a752047da6
Signed-off-by: Mohamad Ayyash <mkayyash@google.com>
2016-04-04 12:33:24 -07:00
Sebastien Hertz
2319e56366 Fix code coverage for apps
When building apps with EMMA_INSTRUMENT=true, we must ensure that
jacoco is at least on the classpath (or even embedded for unbundled
branches) and that proguard will ignore jacoco classes. Otherwise
the Jack compilation would fail.

For unbundled build, we include the proguard configuration file
build/core/proguard.jacoco.flags to ignore jacoco classes.

For full build, we ensure jacoco is on the classpath during the
jack compilation.

Bug: 27607712

(cherry picked from commit d9641e01f3)

Change-Id: Ib46c91d03721f2418b15c17546d4f322f2f90a28
2016-04-04 10:48:02 +02:00
Miao Wang
5d4d1d8ebb Merge "[RenderScript] Update the build rules for x86_64 support lib." 2016-04-01 20:22:41 +00:00
Dan Albert
4410c29fd0 Merge "Add LOCAL_NDK_VERSION." 2016-03-31 23:11:26 +00:00
Miao Wang
4121aa9bb8 [RenderScript] Update the build rules for x86_64 support lib.
Bug: 19735423

  - Unlike other archs, x86_64 has both usr/lib and usr/lib64. we need
    to search for libm.so and libc.so in lib64/. Otherwise the linker
    will report error.

Change-Id: I2859bee066a9eb100828d90da8adf0f9817d77e6
(cherry picked from commit 57ef7ea490)
2016-03-31 15:26:24 -07:00
Dan Albert
658d1e0434 Update NDK libc++ header paths.
The r11 libc++ uses libc++abi instead of libgabi++.

Bug: http://b/27801981
Change-Id: I5b90c14125dc024b2b290897bb3ef1c8d9546a7b
2016-03-31 14:22:09 -07:00
Dan Albert
13306af0c1 Add LOCAL_NDK_VERSION.
Used to select between releases of the NDK (r10, r11, etc).

Some of the libraries we use in Android come as prebuilts from
google3, which are most likely built against an older NDK than what
we have in the platform. Since things may not be ABI compatible
release to release, we need to keep legacy versions accessible for
those to keep building.

Change-Id: Ia3df42fa6f3a7bd5108ff6bbb0f2ca06239c3be9
2016-03-31 12:54:21 -07:00
Ying Wang
77b6353689 Merge "Remove support of disabling Jack." 2016-03-31 16:52:49 +00:00
Ying Wang
0fda1eaa43 Merge "Replace $(shell) in recipe with subshell." 2016-03-31 16:46:18 +00:00
Ying Wang
a6a9ab07ed Replace $(shell) in recipe with subshell.
Bug: 27925180
Change-Id: I4a735755e4f818f6ce608c87ad111b9dd205ef41
2016-03-30 18:34:43 -07:00
Dan Willemsen
8db170d914 Merge "Remove extraneous /" 2016-03-30 21:24:08 +00:00
Ying Wang
858657366f Remove support of disabling Jack.
We removed code and variables related to running dx on classes.jar in
this change. Also removed target emma rules (but kept the emma rules for
host java libraries), for it's now done by Jack.
We still support to build classes.jar (and javalib.jar for static Java
libraries) using javac, because tools like javadoc need class files as
input.
Removed the obsolete install-dex-debug.

Bug: 27400061
Change-Id: If0bcdfe62cb181a98754fb0dbe1c12c92e38d3e8
2016-03-30 14:03:12 -07:00
Dan Willemsen
1c4f8e0026 Remove extraneous /
This matches the line we use in Soong, and behaves no differently.

Change-Id: I4487f7f5555edd08dc67a22d547f8218d46ccd8f
2016-03-30 13:36:01 -07:00
Ying Wang
c79c95d3d8 Merge "Keep emma files for host rules" 2016-03-30 16:56:54 +00:00
Sebastien Hertz
8f0e52c3a6 Keep emma files for host rules
Keep coverage.em file name for host rules where Jack is not called.

(Partially reverts change 491c9ce48a)

Bug: 27822188
Change-Id: Ia9344e17ecbecfb9c335608740ab7dc5490c48d5
2016-03-30 09:39:18 +02:00
Dan Willemsen
6a54a9f10a Darwin: Use the same ar as Soong
Soong uses the copy of `ar` in the OSX SDK instead of the wrapper in
/usr/bin/ar. /usr/bin/ar appears to be a thin wrapper that looks up the
current SDK and passes execution to it. Soong does this so that it can
actually set up a dependency on the tool.

Change-Id: Ia4e4fbe3287539933fa98a1354c3ccee91f4d552
2016-03-29 16:21:32 -07:00
Dan Willemsen
e4d5e08c2e Merge "Forbid Clang for Windows" 2016-03-29 20:54:24 +00:00
Shinichiro Hamaji
4487319141 Merge "Fix dependencies around tools/*-event-log-tags.py" 2016-03-29 20:40:31 +00:00
Dan Willemsen
9537477df7 Forbid Clang for Windows
Clang and MinGW are not expected to work together currently, and you get
strange errors when this is attempted. Instead, error out with a clear
error message.

Before the windows build rewrite, we'd just explicitly set my_clang to
false without checking what the module asked for. Now, error out if the
module explicitly asked for clang, since by default they'd have it
already if it wasn't for windows. That way when Clang+Windows does
become possible, it can gradually be tested by setting LOCAL_CLANG to
true.

Change-Id: I9e0b0dca30946d94894119443f2fd0593cee1793
2016-03-29 12:34:03 -07:00
Shinichiro Hamaji
d3ce14c325 Fix dependencies around tools/*-event-log-tags.py
We should regenerate merged tag files and java sources when
these scripts are updated.

Change-Id: Id5f11d6f480f3f74dab08f01e929ee2d7fafd2d0
2016-03-30 03:04:40 +09:00
Allen Hair
29b65c4e66 Only add jacocoagent if the package contains some java code.
Bug: 27877982
Change-Id: I8bf05d67a823402e7e488990753cc9005ec5e90b
2016-03-29 10:47:49 -07:00
Sebastien Hertz
f7e06ef3b4 Merge "Rename emma coverage files" 2016-03-29 07:17:12 +00:00
Ying Wang
8fe0fc9065 Merge "Remove javac support in host dex rules." 2016-03-26 01:41:38 +00:00
Ying Wang
550e885f47 Merge "[DO NOT MERGE] Remove code pulled in by accident." 2016-03-26 01:27:32 +00:00
Ying Wang
40a4a83c90 [DO NOT MERGE] Remove code pulled in by accident.
Remove code pulled in by accident in cherry-pick commit fbc5b9f56.

Change-Id: I4e4a336faf71782c208631c581b2587a5364212f
2016-03-25 18:24:42 -07:00
Ying Wang
87538e4f8b Support x86+arm multilib build.
Support TARGET_2ND_ARCH as the binary translation arch.
See target/board/generic_x86_arm/BoardConfig.mk and
target/product/aosp_x86_arm.mk as example for the setup.

In BoardConfig, use the TARGET_2ND_ARCH/etc. variables to set up the
binary translation arch;
Set "TARGET_TRANSLATE_2ND_ARCH := true" to tell the build system it's
not a typical 64-bit multilib configuration.
In product makefile, use "PRODUCT_PACKAGES += libfoo_<2nd_arch>" to
install the TARGET_2ND_ARCH libraries. This also pulls in any dependency
libraries.
By default we don't install any TARGET_2ND_ARCH modules, unless it's
pulled in by PRODUCT_PACKAGES.

Bug: 27526885
Change-Id: I0578e9c80da0532d2fa886a8fcdb140bbc703009
(cherry-pick from commit 277e75a488)
2016-03-25 13:29:53 -07:00
Ying Wang
363fe53450 Use $(BUILD_SYSTEM) as the LOCAL_PATH of auto-generated modules.
So that we don't mess up with the vendor path check by accident.

Bug: 27543283
Change-Id: I6c34caefe3ff4abfdd8349a32c68fcca524cfd8e
(cherry-pick from commit efaf5efd06)
2016-03-25 11:06:51 -07:00
Ying Wang
fbc5b9f56b Rebuild odex files in PDK fusion build.
To rebuild odex files of Java libraries and apps,
we store the jars/apks without stripping the classes.dex inside the
platform.zip. We also save the build variables that may affect how we
rebuild an odex in pdk_dexpreopt_config.mk in the platform.zip.
We store the files and configuration only for libraries/apps that get
installed to the system.img (or vendor.img).

In PDK fusion build, we auto-generate prebuilt module definitions for
the javalib.jar and package.dex.apk carried in the platform.zip, using
configuration stored in pdk_dexpreopt_config.mk.
With the prebult modules, we override the implicit rule that directly
copies the odex from the platform.zip.
To rebuild odex of javalib.jar, we added support for prebuilt shared Java
library to prebiult_internal.mk. An installable prebuilt Java library is
treated as shared Java library, i.e. with classes.dex in the jar instead
of a set of .class files.
For apks in the platform.zip, we install the stripped version from
platform files inside platform.zip, instead of the package.dex.apk,
using a new variable LOCAL_REPLACE_PREBUILT_APK_INSTALLED. We can't
strip package.dex.apk because we can't re-sign the stripped apk at this
point.

We generate prebuilt module only if it's not already defined in the
source tree.

Bug: 27543283
Change-Id: I9e146f8b713d6f57c397fd28d88c9ab700757ca1
(cherry-pick from commit 3a61eeb6cb)
2016-03-25 11:06:04 -07:00
Ying Wang
6557ba5335 Merge "Remove rmtypedefs from the build system." 2016-03-25 17:29:30 +00:00
Sebastien Hertz
491c9ce48a Rename emma coverage files
We no longer use emma with Jack. However, during the process of a
full build, we may run the emma task and overwrite the coverage file
generated by Jack with the one from emma because they use the same
filename.

This CL renames coverage files generated by emma so they no longer
break those created by Jack.

Bug: 27822188
Change-Id: Ie3fdc2b8f53deafbefbd6973e39f29d8c46f371e
2016-03-25 17:11:38 +01:00
Ying Wang
3ae7861252 Remove javac support in host dex rules.
- Remove javac support in host_dalvik_java_library.mk
- Simplify host_dalvik_static_java_library.mk by including
  host_dalvik_java_library.mk instead of host_java_library.mk.
- Take configure_local_jack out of host_java_library_common.mk because
  it's only needed by host dalvik java libraries.

Bug: 27400061
Change-Id: I4088b09092198118d832a759663bbaadff669ed5
2016-03-24 16:48:47 -07:00
Tao Bao
20d4e10bf3 Merge "Add libbase to otatools" 2016-03-24 21:50:37 +00:00