Commit graph

865 commits

Author SHA1 Message Date
Colin Cross
44cf069b30 Merge "Remove USE_SOONG=false option" am: 5413fb4b3e
am: a36de73331

* commit 'a36de73331b92e5e75ba92e7a4707e5850e3486d':
  Remove USE_SOONG=false option

Change-Id: Iba393dadd32a55e910cf0ab980a1e82887f60bb9
2016-05-26 01:04:52 +00:00
Colin Cross
a61d672529 Remove USE_SOONG=false option
Soong is always required to build now.

Change-Id: I4e310e98e912b370ebf980bf609f04212a7e9a50
2016-05-25 12:55:43 -07:00
Dan Willemsen
7fe992c0cc Add NATIVE_TESTS class, move host native tests
Host native tests have been getting installed into
out/host/linux-x86/bin/..., but this pollutes the bin directory with a
lot of poorly named tests. Also, to support 32-bit and 64-bit tests, we
need to have different names with different suffixes. This causes
problems when tests expect to be named something specific (like gtest).
It's also convenient to store test data next to the test itself.

So with this change, native tests will be installed in
out/host/linux-x86/nativetest[64]/$(LOCAL_MODULE)/$(LOCAL_MODULE_STEM)
just like target tests get installed into /data/nativetest[64].

Implement this using a new NATIVE_TESTS class, which is like
EXECUTABLES, but sets up the install path differently, and configures
the rpath to load shared libraries with the proper relative path.
LOCAL_MODULE_RELATIVE_PATH can be used to control the directory name, it
will default to $(LOCAL_MODULE). This way multiple related tests can be
grouped together.

Target native tests also use NATIVE_TESTS now, but nothing should change
other than LOCAL_MODULE_RELATIVE_PATH can be used.

Change-Id: I535e42b1a6b21c5b8d6a580aa2f944d2be35e27d
2016-05-24 12:43:16 -07:00
Alex Klyubin
59fcd79e29 Merge "Uncompress native libs only if they are compressed." into nyc-dev
am: 451b72438e

* commit '451b72438e974a10f3f9062ced5d455d3234e4dd':
  Uncompress native libs only if they are compressed.

Change-Id: I4c680cfb228774ce93e75c644e7eee5c40988399
2016-05-18 16:25:46 +00:00
Alex Klyubin
587484abe5 Uncompress native libs only if they are compressed.
This changes the build system to uncompress native libraries in
preinstalled APKs only if the libraries are actually compressed.
Previously, any preinstalled APK containing native libraries was
modified by having all native libraries removed from the APK and then
re-added to the APK in uncompressed form.

Bug: 27887819
Change-Id: I3db172133e141bb6282bf3ed7070b068a826724e
2016-05-17 13:33:34 -07:00
Dan Willemsen
958dc6098e Merge "Remove TARGET_LIBGCC/LIBATOMIC/LIBGCOV" am: a794f4db22
am: 19fdc4428f

* commit '19fdc4428f9036b059a1174a3236eef03180e826':
  Remove TARGET_LIBGCC/LIBATOMIC/LIBGCOV

Change-Id: I143bf88ad5031764644dfb2c8b279513c809b50b
2016-05-17 03:05:32 +00:00
Dan Willemsen
db16dd2384 Remove TARGET_LIBGCC/LIBATOMIC/LIBGCOV
Instead, use the libgcc/libatomic/libgcov from the static libraries dir,
which is provided by Soong. Copy the libraries using the Soong script if
Soong is disabled - this can be removed once USE_SOONG is removed.

Change-Id: Iad2ad20ad5c3cfc48bf1e46e594a482609098d7a
2016-05-16 17:26:54 -07:00
Dan Willemsen
18a2229bab Merge "Soong: Read Android.soong.mk if skipping Android.mk" am: ea71c96894
am: b8759f4f4b

* commit 'b8759f4f4b060fe9c4dc60fa6d786949b81f4ca0':
  Soong: Read Android.soong.mk if skipping Android.mk

Change-Id: Ibc2622b8292cb33270fe89ee8fcae4cdeb6b60c9
2016-05-13 23:58:48 +00:00
Dan Willemsen
5b188fb539 Soong: Read Android.soong.mk if skipping Android.mk
If Soong is enabled, and we're skipping an Android.mk because there is
an Android.bp file, check for an Android.soong.mk file and read that
instead. This will allow us to temporarily define modules or recurse
into subdirectories that soong does not yet support.

Change-Id: Ifdb2f0204a38a5069e53527f66ffcfb8008c11a4
2016-05-13 16:10:41 -07:00
Shinichiro Hamaji
4ed2ff913b resolve merge conflicts of 505f1ea to nyc-dev-plus-aosp
Change-Id: I023ace4df452371eea1b0b004d8817e6fe90585e
2016-05-13 14:33:34 +09:00
Shinichiro Hamaji
d8f9f7d873 Follow symlinks when using find for assets
This should have been done in
https://android-review.googlesource.com/#/c/43901/

Bug: 27954979
Change-Id: I663b5e87e0d844d37a59e404219ff5e7e364df74
2016-05-12 18:17:02 +09:00
Alex Klyubin
8a86f9ea4d Fix handling of version codes in minSdkVersion when signing.
am: f59ad14c1f

* commit 'f59ad14c1f7cb07a4669741f8b0bb1e938398eca':
  Fix handling of version codes in minSdkVersion when signing.

Change-Id: Ie53be2528b32bc2eaa70645000ad66473422e06f
2016-05-11 21:56:43 +00:00
Alex Klyubin
f59ad14c1f Fix handling of version codes in minSdkVersion when signing.
The APK signing tool, build/tools/signapk, needs to know the API Level
of the oldest platform supported by the APK. The APK's minSdkVersion
may reference that using a number (API Level) or a version code. To
handle the version code case, the existing logic was to see if it
matches $PLATFORM_VERSION_CODENAME and then substitute it with
$PLATFORM_SDK_VERSION.

However, some platforms support multiple version codes. To handle this
scenario, this commit changes the logic for computing the min API
Level for signing purposes to treat any non-numeric minSdkVersion as
$PLATFORM_SDK_VERSION.

Bug: 28715556
Change-Id: I292c96e8928b7e2f8d9716ef2be33a23a87764c4
2016-05-11 12:11:11 -07:00
Ying Wang
dbe53e4bde resolve merge conflicts of e6b72b3 to nyc-dev-plus-aosp
Change-Id: Ic60ea2050c6e724e9bcbb5277087f1377315e9b3
2016-05-06 13:37:05 -07:00
Ying Wang
05f9f35836 Harden dependency on generated sources.
Previously if a library has custom generated headers in
LOCAL_GENERATED_SOURCES and export its include path with
LOCAL_EXPORT_C_INCLUDE_DIRS, there is almost no way for the users of the
library to set up dependency of their object files on the generated
headers.
This change makes the generated sources dependency of the library's
export_includes, which is guaranteed generated before client code gets
compiled.

Also we added proto-generated cpp files to my_generated_sources so that
we can deal solely with $(my_generated_sources). Because many
Android.mks assume the generted .pb.hs are in $(generated_sources_dir)
instead of $(intermediates), we have to generate the source files in
$(generated_sources_dir) and make a copy in $(intermediates).

Bug: 28622149
Change-Id: I73b21443fa706f3735faf16356ed8c08fbfecca6
2016-05-06 10:20:17 -07:00
Adam Lesinski
54d4d765ba Merge "Call aapt2 link with argument-list" into nyc-dev
am: dfd6197f51

* commit 'dfd6197f5173b957b6e41a83df66d04068fa6517':
  Call aapt2 link with argument-list

Change-Id: I34e64e07736d428ca87044ac07a952be50531464
2016-04-29 22:13:20 +00:00
Adam Lesinski
dfd6197f51 Merge "Call aapt2 link with argument-list" into nyc-dev 2016-04-29 22:09:01 +00:00
Todd Kennedy
a9ce97d223 Merge "Only align when necessary" into nyc-dev
am: 1ccfe52630

* commit '1ccfe5263008991aeff10964da3bdc6c2c1c1d06':
  Only align when necessary

Change-Id: I2452df91a9c97a0b7d2d182165384d63ce040a09
2016-04-29 21:02:31 +00:00
Todd Kennedy
3f18099610 Only align when necessary
Bug: 27887819
Change-Id: Ie8b5ca31cc1c08943588fc6039d75190ff7eeb8b
2016-04-29 13:58:13 -07:00
Adam Lesinski
8d1e2fdcba Call aapt2 link with argument-list
Also follow symbolic links when looking for assets.

Bug:22775504
Change-Id: I971e23505f766a2192469df1aad55bc20c46f618
2016-04-28 15:10:18 -07:00
Adam Lesinski
9c5f7a462c Merge "Revert "Call aapt2 link with argument-list"" into nyc-dev
am: 6c078e0522

* commit '6c078e0522daafbdb5b2635baa510c2863bde2bb':
  Revert "Call aapt2 link with argument-list"

Change-Id: I36d1080067620f991766a751830cac885fd1dc48
2016-04-28 20:15:41 +00:00
Adam Lesinski
6c078e0522 Merge "Revert "Call aapt2 link with argument-list"" into nyc-dev 2016-04-28 20:10:17 +00:00
Adam Lesinski
4c44d94999 Revert "Call aapt2 link with argument-list"
This reverts commit d4d6a50fbb.

Change-Id: If84ad9921eb51ae16eae2be3cf4b2ee86b31ce80
2016-04-28 20:06:53 +00:00
Adam Lesinski
2e58fba928 Merge "Call aapt2 link with argument-list" into nyc-dev
am: 0e57d3afc1

* commit '0e57d3afc181720bdd6bea3cd1a7352168458b62':
  Call aapt2 link with argument-list

Change-Id: Ifa9d900511acec9174e6e658d515b277e9669964
2016-04-28 19:43:46 +00:00
Adam Lesinski
0e57d3afc1 Merge "Call aapt2 link with argument-list" into nyc-dev 2016-04-28 19:34:32 +00:00
Adam Lesinski
d4d6a50fbb Call aapt2 link with argument-list
Also follow symbolic links when looking for assets.

Bug:22775504

Change-Id: I78b4e2b7d7750dfecafd64e29cf0e19dff851155
2016-04-26 13:32:01 -07:00
Keun Soo Yim
46a259651f resolve merge conflicts of 72b82dc to nyc-dev-plus-aosp
Change-Id: I6e62226774584154ad1a802594e386fe7942504b
2016-04-25 15:27:21 -07:00
Keun Soo Yim
3d4847525f build rule change for VTS (vendor test suite)'s metadata files
Change-Id: I76b81529a97b672e08632703d2f6a2777ee8811e
2016-04-25 13:06:57 -07:00
Yohann Roussel
b6232d90da resolve merge conflicts of 995b62b to nyc-dev-plus-aosp
Change-Id: I4293e9f2777fb9b7e2023764703855ff3d778b40
2016-04-22 18:45:45 +02: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
7a8e69eea2 Merge "Call clang-tidy based on WITH_TIDY* variables." am: 3f03b10654
am: c72f50d49f

* commit 'c72f50d49fb95794039f270d4083b9cfed4cd482':
  Call clang-tidy based on WITH_TIDY* variables.

Change-Id: I4eb0afd79b56ad2ddea42b33791df27da6ab8820
2016-04-21 21:11:00 +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
Yabin Cui
b10a1190cb Merge "Add strip mode mini-debug-info." am: 9a02623
am: 3cb18ef

* commit '3cb18efc4a4ec9497a237e8151ebc3b15857c837':
  Add strip mode mini-debug-info.

Change-Id: Ic915892d0cc7142ec7ce2847cc4a69a3d24a54c3
2016-04-16 00:36:07 +00: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
Ying Wang
81ef4714f4 Merge commit '1f07720f8518236e8438ae0f25ea7211da8c8c45' into manual_merge_1f07720
Change-Id: I5ad50aacbe99b4ebf8ae7e630f169100128b5b3c
2016-03-31 10:10:42 -07:00
Ying Wang
b89c5fda00 Merge "Replace in recipe with subshell." am: 0fda1ea
am: d4d59fd

* commit 'd4d59fd87c004a6dbbe581a011f7f9d9027b74a1':
  Replace $(shell) in recipe with subshell.

Change-Id: I67d553aa1ab7f92e7719a3678074aad9d6a812e8
2016-03-31 16:55:55 +00:00
Ying Wang
77b6353689 Merge "Remove support of disabling Jack." 2016-03-31 16:52:49 +00:00
Ying Wang
a6a9ab07ed Replace $(shell) in recipe with subshell.
Bug: 27925180
Change-Id: I4a735755e4f818f6ce608c87ad111b9dd205ef41
2016-03-30 18:34:43 -07: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
Shinichiro Hamaji
fbd5d8de0f Merge "Fix dependencies around tools/*-event-log-tags.py" am: 4487319
am: a2be61e

* commit 'a2be61ed16bcb406030ff01a30e4dec90a8ff5de':
  Fix dependencies around tools/*-event-log-tags.py

Change-Id: I8fee3f7846e723d46eb26356798eedb9566f3a28
2016-03-29 20:51:05 +00:00
Shinichiro Hamaji
0f846c73e1 Replace last -includes by .KATI_DEPFILE
There was a typo in binary.mk. compile-dotdot-XXX-file in
definitions.mk was also using -include.

Bug: 26839129
Bug: 27886012
Change-Id: I4a0145fb70413998cc65d30d2efcd68af07b4800
(cherry picked from commit 72904774a3)
2016-03-29 12:10:48 -07:00
Shinichiro Hamaji
2fb7b61a2e Use KATI_DEPFILE for .P associated with object files
Also specify "-d keepdepfile" to ninja so .P files won't be
deleted by ninja.

-include for .s files are removed because GCC doesn't
generate .d files for .s files.

Bug: 26839129
Bug: 27886012
Change-Id: If00e93c7a33449ec314a5cdba438475a32979f4e
(cherry picked from commit 4037c4225a)
2016-03-29 12:10: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
Colin Cross
6e6a167521 Merge "Ignore Android.mk files with USE_SOONG=true" into nyc-dev
am: c031c75

* commit 'c031c758c63c83679cf55abb50ba9e4474d22814':
  Ignore Android.mk files with USE_SOONG=true
2016-03-25 19:59:02 +00:00
Ying Wang
dcb1da9093 Merge "Remove rmtypedefs from the build system."
am: 6557ba5

* commit '6557ba5335798627572669512489fdc8c59915a6':
  Remove rmtypedefs from the build system.
2016-03-25 18:08:55 +00: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
Colin Cross
946a08cf51 Ignore Android.mk files with USE_SOONG=true
When USE_SOONG=true, ignore any Android.mk file that has an Android.bp
file in the same directory.

Change-Id: Id79bd90c2aed5dafc2f8ad2c5b7eb0aa6e81dc18
(cherry picked from commit 861ab99536)
2016-03-24 14:36:48 -07:00
Ying Wang
72bc59ce8b Remove rmtypedefs from the build system.
We don't need to run rmtypedefs in javac compilation now, because the
runtime libraries are compiled by only jack, which takes care of
rmtypedefs by itself.

Bug: 27828139
Change-Id: Ie480ae5aead8f3f58f956978fc4a05c28a35dec6
2016-03-24 12:25:56 -07:00
Dan Willemsen
1e061d789a Merge "Remove ALL_PREBUILT, all users have been removed"
am: cfb5545

* commit 'cfb554566447b31cd045a5b67b960018418fe874':
  Remove ALL_PREBUILT, all users have been removed
2016-03-23 23:19:27 +00:00
Dan Willemsen
cfb5545664 Merge "Remove ALL_PREBUILT, all users have been removed" 2016-03-23 23:12:46 +00:00
Dan Willemsen
3006962257 Remove ALL_PREBUILT, all users have been removed
Change-Id: I37154506ef419e7a68ce7e2d864624d2ae53206f
2016-03-23 14:15:16 -07:00
Ying Wang
7dee3625e0 Merge "Create empty .a on Darwin when there is no obj file."
am: 37aa85e

* commit '37aa85e8bb0d86cae946d85a27b6ded593c425b7':
  Create empty .a on Darwin when there is no obj file.
2016-03-23 16:56:20 +00:00
Ying Wang
4aaa1a1fd8 Create empty .a on Darwin when there is no obj file.
On Darwin ar would fail if there is no object file to add.
We work around by adding a dummy.o to the .a and then deleting it.

Bug: 27800477
Change-Id: I68bbebea2726058c25863d7026a645a520d05167
2016-03-22 18:23:13 -07:00
Yohann Roussel
2ae244c578 Remove rules for building dex with dx
This is just to ensure no dex file is built with dx any more, cleaning
of the build rules from Jack optionality is still to be done.

Bug: 27218410

(cherry picked from commit 22313f2b2a)

Change-Id: I1e7f2f5dcc7f95a44f5ebf2e4ba99931ff3ba014
2016-03-18 16:03:00 +01:00
Yohann Roussel
cb43e9d0da Merge "Remove rules for building dex with dx"
am: a978779

* commit 'a978779668cb6dd8791348dc701bf154f80164af':
  Remove rules for building dex with dx
2016-03-18 13:59:10 +00:00
Yohann Roussel
a978779668 Merge "Remove rules for building dex with dx" 2016-03-18 13:50:55 +00:00
Przemyslaw Szczepaniak
23649c76ce Merge "Allow for 5400 words in dump-words-to-file" into nyc-dev
am: 1b21b85

* commit '1b21b85b119796d9007e874af99948a803805397':
  Allow for 5400 words in dump-words-to-file
2016-03-18 12:44:23 +00:00
Przemyslaw Szczepaniak
0aeee045bd Allow for 5400 words in dump-words-to-file
After adding java.util.stream,  doc-comment-check target
started to fail due to "Too many words" while
generating out/target/common/docs/doc-comment-check-timestamp.rsp
This change extends number of dumped words to 5400.

Bug: 27692239
Change-Id: Ifa75cada7b90c5737fc7a1d10325f3a49a2238ac
2016-03-18 12:09:44 +00:00
Chih-Hung Hsieh
baf5f3c67f Merge "Link in ASAN library if my_global_santitize is set."
am: 9d5fb14

* commit '9d5fb14b2d551e522c51f78361b77653191c8c91':
  Link in ASAN library if my_global_santitize is set.
2016-03-17 16:36:15 +00:00
Chih-hung Hsieh
9d5fb14b2d Merge "Link in ASAN library if my_global_santitize is set." 2016-03-17 16:26:32 +00:00
Yohann Roussel
26912851ab resolve merge conflicts of 63de777 to nyc-dev-plus-aosp
Change-Id: I5dadd6f7bbf494665f9deb0cfafcce65530825d0
2016-03-16 17:33:38 +01:00
Yohann Roussel
63de777488 Merge "Inform Jack of the min sdk" into nyc-dev 2016-03-16 15:41:58 +00:00
Yohann Roussel
740ec8fe8a Inform Jack of the min sdk
Set Jack min sdk according to LOCAL_SDK_VERSION. Gives Jack current
version when LOCAL_SDK_VERSION is not available.

Bug: 27371864

(cherry picked from commit c6383d6ec6)

Change-Id: Ieba0219494f29d2737d2ca234317c3af7e5e72c8
2016-03-16 15:41:00 +01:00
Yohann Roussel
c6383d6ec6 Inform Jack of the min sdk
Set Jack min sdk according to LOCAL_SDK_VERSION. Gives Jack current
version when LOCAL_SDK_VERSION is not available.

Bug: 27371864

Change-Id: I5db233fe09aed0fae37fe9a92658bc8f24b86cdf
2016-03-16 11:55:46 +01:00
Yohann Roussel
22313f2b2a Remove rules for building dex with dx
This is just to ensure no dex file is built with dx any more, cleaning
of the build rules from Jack optionality is still to be done.

Bug: 27218410
Change-Id: Iea2c66802b6c64c52690ad9d6d487bdce5f50b79
2016-03-16 10:33:02 +01:00
Chih-Hung Hsieh
ad741e6d66 Link in ASAN library if my_global_santitize is set.
* When my_global_santitize is set and requires ASAN,
  link with ASAN library even when local module is not
  instrumented with ASAN, unless the local module is
  the ASAN library itself.
* Add -Wl,--as-needed to my_ldflags for shared libraries
  so that unneeded ASAN library would not become
  a dependent of the built .so file.
* Change shared file and executable file link argument order
  so that -Wl flags will have effect on linked-in libraries.
* Remove unused ADDRESS_SANITIZER_CONFIG_EXTRA_SHARED_LIBRARIES.

BUG: 27614834

Change-Id: I4eda6003f1f24e498cba91c043dbe1fabe522686
2016-03-15 16:53:46 -07:00
Shinichiro Hamaji
082d5e5081 Merge "Replace last -includes by .KATI_DEPFILE"
am: c26ec724b8

* commit 'c26ec724b8b4d356573901f96e1a8ce728bdd1b1':
  Replace last -includes by .KATI_DEPFILE
2016-03-15 23:06:31 +00:00
Ying Wang
c9a19779a2 resolve merge conflicts of fc16dca602 to nyc-dev-plus-aosp
Now we can remove all uses of $(ACP) in prebuilt_internal.mk.

Change-Id: I07a449f3acca9b56c6a387ff8ca1535d19c872d1
2016-03-15 14:46:12 -07:00
Shinichiro Hamaji
72904774a3 Replace last -includes by .KATI_DEPFILE
There was a typo in binary.mk. compile-dotdot-XXX-file in
definitions.mk was also using -include.

Bug: 26839129
Change-Id: I4a0145fb70413998cc65d30d2efcd68af07b4800
2016-03-16 06:40:04 +09:00
Yohann Roussel
a023f41f13 Merge "Revert "Inform Jack of the min sdk"" 2016-03-15 15:04:54 +00:00
Yohann Roussel
962282bde2 Revert "Inform Jack of the min sdk"
This reverts commit 94451580af.

Bug: 27371864
Change-Id: I60a8c89b2ab8a6cbde4dd3b0aed24b71700815ab
2016-03-15 15:02:11 +00:00
Yohann Roussel
10baeeebc4 Merge "Inform Jack of the min sdk" 2016-03-15 09:42:11 +00:00
Ying Wang
3a61eeb6cb 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
2016-03-14 21:01:46 -07:00
Shinichiro Hamaji
fb87a2610d Merge "Use KATI_DEPFILE for .P associated with object files"
am: b95dc31033

* commit 'b95dc310330bd59fa860ab98822529bb0d2256c6':
  Use KATI_DEPFILE for .P associated with object files
2016-03-14 22:07:10 +00:00
Shinichiro Hamaji
b95dc31033 Merge "Use KATI_DEPFILE for .P associated with object files" 2016-03-14 21:59:46 +00:00
Yohann Roussel
94451580af Inform Jack of the min sdk
Set Jack min sdk according to LOCAL_SDK_VERSION. Gives Jack current
version when LOCAL_SDK_VERSION is not available.

Bug: 27371864
Change-Id: Ieba0219494f29d2737d2ca234317c3af7e5e72c8
2016-03-11 11:55:57 +01:00
Dan Willemsen
8b90565476 Merge "Do not apply GLOBAL_CFLAGS_NO_OVERRIDE to host *.S" am: 6d813d8c92
am: 851983bbf2

* commit '851983bbf2dc9cf2ea5877d6e95a9d962bd63fdd':
  Do not apply GLOBAL_CFLAGS_NO_OVERRIDE to host *.S
2016-03-04 21:02:05 +00:00
Dan Willemsen
6d813d8c92 Merge "Do not apply GLOBAL_CFLAGS_NO_OVERRIDE to host *.S" 2016-03-04 20:52:57 +00:00
Ying Wang
ea04f821fc Align up java-lib-files and java-lib-deps.
- For host Java libraries, java-lib-files should return javalib.jar.
- Host dalvik Java libraries are special: factor out
  host-dex-java-lib-files.
- Be explict that jack-lib-deps equals jack-lib-files.

Bug: 27451686
Change-Id: I9235384354e119ef7ebbf29b7e525d1ceea242e0
(cherry-pick from commit 063d0455e0)
2016-03-04 10:39:24 -08:00
Ying Wang
fef4f411d9 Align up java-lib-files and java-lib-deps.
am: 063d0455e0

* commit '063d0455e0f3a14f2577a26715f82e0bf3e79ee9':
  Align up java-lib-files and java-lib-deps.
2016-03-04 17:30:59 +00:00
Dan Willemsen
df9acac680 Do not apply GLOBAL_CFLAGS_NO_OVERRIDE to host *.S
Target assembly files do not get these cflags, align the host
definitions to do the same.

Change-Id: Idadfa1f367c3ebea44460c5798225a85dd319371
2016-03-03 17:38:16 -08:00
Ying Wang
063d0455e0 Align up java-lib-files and java-lib-deps.
- For host Java libraries, java-lib-files should return javalib.jar.
- Host dalvik Java libraries are special: factor out
  host-dex-java-lib-files.
- Be explict that jack-lib-deps equals jack-lib-files.

Bug: 27451686
Change-Id: I9235384354e119ef7ebbf29b7e525d1ceea242e0
2016-03-03 13:48:43 -08:00
Shinichiro Hamaji
4037c4225a Use KATI_DEPFILE for .P associated with object files
Also specify "-d keepdepfile" to ninja so .P files won't be
deleted by ninja.

-include for .s files are removed because GCC doesn't
generate .d files for .s files.

Bug: 26839129
Change-Id: If00e93c7a33449ec314a5cdba438475a32979f4e
2016-03-03 18:19:37 +09:00
Yohann Roussel
1501a9a8b5 Merge "Use Jack to check build" into nyc-dev 2016-03-03 08:47:41 +00:00
Yohann Roussel
57a54b4199 Merge "Use Jack to check build" am: 6a9d0f9718
am: 4fd0463191

* commit '4fd0463191b316fd80b2ec8c0ba33bb5fcf5aa16':
  Use Jack to check build
2016-03-02 09:14:20 +00:00
Yohann Roussel
6a9d0f9718 Merge "Use Jack to check build" 2016-03-02 08:46:24 +00:00
Dan Willemsen
23afb78cf9 Merge commit 'cdaf748e3abefd93a4e45393e96717fad8564c51'
Change-Id: I3c44564b08ed46f46719dbca54d4225718bb8c59
2016-03-01 15:36:08 -08:00
Adam Lesinski
bda7a2b046 Merge "AAPT2: Enable product/config filtering and improve source ordering" into nyc-dev
am: 7214d224b8

* commit '7214d224b85f7504fb0686e187fdf7f18b135000':
  AAPT2: Enable product/config filtering and improve source ordering
2016-03-01 22:04:06 +00:00
Stephen Hines
ed68f54ba0 Merge changes I769ed278,I99cb69ea,I57bcbed0,I6e51e51f,Iab2d36e2 into nyc-dev
* changes:
  Remove debug statement
  Tell Soong about HOST_CROSS_*
  Update to use the latest clang-2629532.
  Use newest clang static analyzers.
  Add 64-bit windows cross-compiles
2016-03-01 21:36:15 +00:00
Dan Willemsen
7f016150a0 Remove unused dependencies on $(ACP)
Most of these are calling to copy-file-to-target or similar, which no
longer use $(ACP).

Change-Id: I62287a80c577c34df587b74e70055c2f56050ce7
2016-03-01 13:15:35 -08:00
Dan Willemsen
f1a98af5fc Replace some uses of acp with cp
ACP was originally created to overcome differences with cp between
Linux, Darwin, and Windows. We've since dropped Windows as a build host,
and don't use features like '-u' anymore.

For most of our current usecases, 'acp' is identical to 'cp' except that
it splits 'cp -p' into 'acp -p' for mode and ownership, and 'acp -t' for
timestamps. On Linux, this could be specified using
'--preserve=mode,ownership', but Darwin doesn't have this.

Since we're removing the destination file before copying, 'cp' already
preserves the mode (modulated by the umask). So the only extra thing
that gets preserved with 'acp -p' is ownership, which we should not care
about in the build system. (In many cases we shouldn't be preserving
mode either, so that readonly source trees can actually be marked
readonly, but that will be a future change)

Change-Id: Ied96fdc303ac5c774347c07363daec8b6dfb22e4
2016-03-01 13:08:50 -08:00
Dan Willemsen
93536c29b1 Merge "Remove destination before copying file" am: 469665ded5
am: e401e09a3c

* commit 'e401e09a3cf067f7eb15b5e94274a763a039be9c':
  Remove destination before copying file
2016-03-01 19:46:49 +00:00
Yohann Roussel
e792abc2d9 Use Jack to check build
Run jack with no outputs as a quick check for compilation errors and use
a timestamp to store that check was made.

Bug: 19069325

(cherry picked from commit 43084d9f49)

Change-Id: I9b84b503b28cfdfa245f91da0061ee3a79386b28
2016-03-01 16:57:20 +01:00
Yohann Roussel
ee57268cd7 Use Jack to check build
Run jack with no outputs as a quick check for compilation errors and use
a timestamp to store that check was made.

Bug: 19069325

(cherry picked from commit 43084d9f49)

Change-Id: I9b84b503b28cfdfa245f91da0061ee3a79386b28
2016-03-01 16:34:08 +01:00
Dan Willemsen
3545eeb6c1 Remove destination before copying file
If there's a symlink as the destination to one of these macros,
currently we'll write to the destination of that symlink instead of
overwriting the symlink. We've run into this a few times when a module
is added to replace a symlink that used to exist via
LOCAL_POST_INSTALL_CMD. These have required manual discovery, and
additions to CleanSpec.mk files:
http://android-review.googlesource.com/143334

Use `rm -f` for single-file targets to remove the destination before
copying. On Linux, `cp --remove-destination` can work, but is not
supported by Darwin or acp.

There may still be problems with dependencies when symlinks are
involved, since ninja will use the destination of the symlink to check
whether it is up to date. But at least with this change, if any
dependency gets regenerated, we'll properly reset the file.

Change-Id: I6d3ac0bd9ced5e21a0ff9dad0eaff012a7bc9c75
2016-02-29 22:22:29 -08:00
Dan Willemsen
9ffa38b193 Merge "Remove USE_NINJA=false" am: 3bfc095f53
am: d73633c082

* commit 'd73633c0824a63f7104bddf9a798bccc952b545c':
  Remove USE_NINJA=false
2016-02-29 22:19:29 +00:00
Dan Willemsen
1c6dc5b942 Remove USE_NINJA=false
And everything special-cased on that. Add a warning if USE_NINJA is
set to let users know that it no longer changes anything.

Change-Id: Ib8739151fe26ea6bf8f76b7ac2b8f4097dab0b47
2016-02-26 21:48:31 -08:00