Commit graph

8534 commits

Author SHA1 Message Date
Colin Cross
615d66e2c2 Merge "Make export_includes a restat rule" 2015-12-01 01:42:26 +00:00
Colin Cross
6b9bddde6f Make export_includes a restat rule
There is currently an intentional incremental rebuild issue with
import_includes.  export_includes might get updated with an identical
version, but we don't want to force everything downstream of it to
rebuild.

When BUILDING_WITH_NINJA==true, only update export_includes if it
changes, and use .KATI_RESTAT to only run downstream rules if it
changes.  import_includes will only be updated if one of the
export_includes files is updated, so object files can have a normal
dependency on import_includes instead of an order-only dependency.
All downstream object files will now be recompiled if their imported
include paths change.

Bug: 25910568
Change-Id: I626f3b24ac02ac1309049cf1ce66cfe8ec816513
2015-11-30 17:33:26 -08:00
Colin Cross
bae8872294 Merge changes I1de10391,I4399ca26,Iec3b2b0b
am: bff3c9b4c1

* commit 'bff3c9b4c10dcb3ce3820d3a5e144e3df20313dc':
  Use libstdc++ for ijar
  Build ijar for apps build
  Use .KATI_RESTAT to reduce unnecessary rebuilds of .jar files
2015-12-01 00:03:27 +00:00
Tao Bao
a04fca31bf Stop packaging obsolete OTA tools.
applypatch, applypatch_static and sqlite3 are no longer needed.

Bug: 24621915
Change-Id: I6de5bc45bc8434b9c387e1d3d1b6c347c23a5290
2015-11-30 12:22:24 -08:00
Shinichiro Hamaji
89b255ab71 Use .KATI_RESTAT to reduce unnecessary rebuilds of .jar files
The same optimization was done for binaries in

https://android-review.googlesource.com/#/c/175250/

To create a TOC file from .jar files, this change introduces
ijar, which is designed for this purpose. Only #include lines
were modified from the original version.

https://github.com/bazelbuild/bazel/tree/master/third_party/ijar

Performance:

$ m && touch
frameworks/base/core/java/com/google/android/util/Procedure.java && time
m
Before: 4m30s (1580 targets)
After: 3m57s (772 targets)

Unfortunately, the improvement is small yet, but local
experiments showed we can cut ~2 more minutes if the similar
optimization is done for .dex files.

(cherry picked from commit c1f5d9c203)

Bug: 24597504
Change-Id: Iec3b2b0b0e674bee5d80cce3c300dc8fad6e7c13
2015-11-30 11:16:23 -08:00
Shinichiro Hamaji
51ef51c4ad Merge "Revert "Use .KATI_RESTAT to reduce unnecessary rebuilds of .jar files""
am: 2ff3ad9045

* commit '2ff3ad90455e868a1805d065f0aa2b8babbc6660':
  Revert "Use .KATI_RESTAT to reduce unnecessary rebuilds of .jar files"
2015-11-27 04:02:09 +00:00
Shinichiro Hamaji
2ff3ad9045 Merge "Revert "Use .KATI_RESTAT to reduce unnecessary rebuilds of .jar files"" 2015-11-27 03:59:30 +00:00
Shinichiro Hamaji
3ae7f66bab Revert "Use .KATI_RESTAT to reduce unnecessary rebuilds of .jar files"
This reverts commit c1f5d9c203.

Change-Id: I7e9969a060e3f1380154da65e76134168aee15d8
2015-11-27 03:58:51 +00:00
Paul Duffin
9c4bb4c1c0 Merge "Fix generated-sources-dir-for for COMMON"
am: 623799d3e0

* commit '623799d3e0aab49b00552fb7862f2528b845bd51':
  Fix generated-sources-dir-for for COMMON
2015-11-26 11:43:02 +00:00
Paul Duffin
623799d3e0 Merge "Fix generated-sources-dir-for for COMMON" 2015-11-26 11:39:30 +00:00
Shinichiro Hamaji
27770abe27 Merge "Use .KATI_RESTAT to reduce unnecessary rebuilds of .jar files"
am: c9a1b27845

* commit 'c9a1b278458eddd3065c0e9fc06e12b2cb1c38cb':
  Use .KATI_RESTAT to reduce unnecessary rebuilds of .jar files
2015-11-26 05:30:54 +00:00
Shinichiro Hamaji
c9a1b27845 Merge "Use .KATI_RESTAT to reduce unnecessary rebuilds of .jar files" 2015-11-26 05:25:58 +00:00
Paul Duffin
699a32217a Fix generated-sources-dir-for for COMMON
When the 4th argument specified is non-empty then it attempts to
use either HOST_OUT_GEN_COMMON or TARGET_OUT_GEN_COMMON
depending on whether the 3rd argument is non-empty or not
respectively. Unfortunately, those two variables do not exist,
the correct names for those variables is HOST_OUT_COMMON_GEN and
TARGET_OUT_COMMON_GET.

Change-Id: I66edb02824c06e0f504ebe04ff80ddbd77a16c95
2015-11-25 13:14:23 +00:00
Ying Wang
f0522b0c34 Merge "Fix typo."
am: deeb2d2453

* commit 'deeb2d245397a8330890247697d01629f763ec31':
  Fix typo.
2015-11-24 22:16:45 +00:00
Ying Wang
deeb2d2453 Merge "Fix typo." 2015-11-24 22:09:49 +00:00
Ying Wang
6cce4026ff Fix typo.
Change-Id: I299076791c620968fa7a5c420b5ca21ea4d30b51
2015-11-24 14:09:11 -08:00
Ying Wang
fdfd0b0d81 Merge "Don\'t delete META-INF in jack-java-to-dex when packing resources."
am: 81bbac6a0f

* commit '81bbac6a0fe76f2b007f6f0c2c3dc44f85fd4dd6':
  Don't delete META-INF in jack-java-to-dex when packing resources.
2015-11-24 22:01:54 +00:00
Ying Wang
81bbac6a0f Merge "Don't delete META-INF in jack-java-to-dex when packing resources." 2015-11-24 21:58:06 +00:00
Ying Wang
3be52e6692 Don't delete META-INF in jack-java-to-dex when packing resources.
LOCAL_DONT_DELETE_JAR_META_INF is meant for deleting resources carried
by static Java libraries, see comment in clear_vars.mk.
For a module's own resources, we should pick up whatever in
LOCAL_JAVA_RESOURCE_DIRS.
The same applies  when building .jack from a  prebult jar in
transform-jar-to-jack.

Bug: 25860887
Change-Id: I20c120e039342a1124362c5f8747eace94b03931
(cherry-pick from commit 996ae38ffd)
2015-11-24 13:57:10 -08:00
Shinichiro Hamaji
22a2efde22 Merge "Prevent findleaves.py from traversing copies of "
am: 84639d127b

* commit '84639d127b50734ef670232bfa43a6fb9f3f0576':
  Prevent findleaves.py from traversing copies of $(OUT_DIR)
2015-11-24 04:57:26 +00:00
Shinichiro Hamaji
84639d127b Merge "Prevent findleaves.py from traversing copies of $(OUT_DIR)" 2015-11-24 04:54:02 +00:00
Ying Wang
59ab005dde Merge "Increase droiddoc -J-Xmx to 1600MB."
am: 01f49a3d5e

* commit '01f49a3d5e5d8f4fdd83d1b74a230f8160aabe08':
  Increase droiddoc -J-Xmx to 1600MB.
2015-11-20 02:38:00 +00:00
Ying Wang
02bcb27b4a Increase droiddoc -J-Xmx to 1600MB.
As we occasionally see  java.lang.OutOfMemoryError when running
doc-comment-check-docs.

Bug: 25787786
Change-Id: I6c505c96ec36d09d28d400e03027b169870c49bb
2015-11-19 18:31:01 -08:00
Christopher Wiley
dbc3d09ca6 Merge "Fix race in C++ AIDL file generation"
am: b2055df782

* commit 'b2055df782eb5276128ef14ac4724d32f94e1aec':
  Fix race in C++ AIDL file generation
2015-11-19 22:07:06 +00:00
Colin Cross
d924c14097 Merge "Switch to using kati env script"
am: 7926e42209

* commit '7926e42209b41766369e49b2093e6334564f93d4':
  Switch to using kati env script
2015-11-19 22:06:52 +00:00
Christopher Wiley
b2055df782 Merge "Fix race in C++ AIDL file generation" 2015-11-19 22:01:27 +00:00
Christopher Wiley
2d91c61ef0 Fix race in C++ AIDL file generation
The export_includes file for a library needs to express a dependency on
all generated exported headers.  For aidl generated headers, express a
dependency on the .cpp file instead, since the generator promises to
generate this file last.  Unfortunately, the C++ headers generated from
a .aidl file depend on the contents of the file.

Change-Id: I9402b364e4538b502c0958ac8c7bd72cb0add724
2015-11-19 13:52:15 -08:00
Colin Cross
7926e42209 Merge "Switch to using kati env script" 2015-11-19 21:11:01 +00:00
Christopher Wiley
a626a5f6d9 Merge "Export generated AIDL headers"
am: 0c595d4730

* commit '0c595d47304e6c00a493600b4a46f655cd148db9':
  Export generated AIDL headers
2015-11-19 19:24:42 +00:00
Christopher Wiley
0c595d4730 Merge "Export generated AIDL headers" 2015-11-19 19:17:47 +00:00
Christopher Wiley
c7e936f530 Export generated AIDL headers
It is common for developers to generate/compile AIDL in a static
library, then link that library into an executable.  When doing this,
developers need to export the generated headers.

Bug: 25779424
Test: a refactoring of the aidl Android.mk shows this works

Change-Id: I4f7d471a601d2a683cb5a9da5e02e3fab576c26a
2015-11-19 11:04:18 -08:00
Stephen Hines
4b191b40b7 Merge "Rename AArch64 ASan target runtime library to match upstream convention."
am: af9e29d040

* commit 'af9e29d040dc20aeb4cceb545d864d41ecf0bca5':
  Rename AArch64 ASan target runtime library to match upstream convention.
2015-11-19 16:20:00 +00:00
Stephen Hines
af9e29d040 Merge "Rename AArch64 ASan target runtime library to match upstream convention." 2015-11-19 16:14:08 +00:00
Shinichiro Hamaji
6a378a3a7a Prevent findleaves.py from traversing copies of $(OUT_DIR)
by putting blank Android.mk and CleanSpec.mk in $(OUT_DIR).

Bug: 25732342
Change-Id: I3fcc4efddb9ee5ce309502e978f0589335af8371
2015-11-19 18:31:29 +09:00
Shinichiro Hamaji
c1f5d9c203 Use .KATI_RESTAT to reduce unnecessary rebuilds of .jar files
The same optimization was done for binaries in

https://android-review.googlesource.com/#/c/175250/

To create a TOC file from .jar files, this change introduces
ijar, which is designed for this purpose. Only #include lines
were modified from the original version.

https://github.com/bazelbuild/bazel/tree/master/third_party/ijar

Performance:

$ m && touch
frameworks/base/core/java/com/google/android/util/Procedure.java && time
m
Before: 4m30s (1580 targets)
After: 3m57s (772 targets)

Unfortunately, the improvement is small yet, but local
experiments showed we can cut ~2 more minutes if the similar
optimization is done for .dex files.

Bug: 24597504
Change-Id: Id54953aea25e497c8ebbe783b03f13b488577c6a
2015-11-19 17:10:35 +09:00
Dan Albert
e3b4114410 Merge "Really allow overriding the LLVM prebuilts path."
am: ec18c0fdfe

* commit 'ec18c0fdfe0475cb4eff2458cf1f825d37fbc2b5':
  Really allow overriding the LLVM prebuilts path.
2015-11-19 06:33:50 +00:00
Stephen Hines
bf45029dc4 Rename AArch64 ASan target runtime library to match upstream convention.
Rename from
 libclang_rt.asan-arm64-android.so
to
 libclang_rt.asan-aarch64-android.so

Change-Id: I6d73f458f437440c1de5bc72d2188d392c80cb98
2015-11-18 22:13:16 -08:00
Dan Albert
2d6d5c6e53 Really allow overriding the LLVM prebuilts path.
Not sure why my previous testing was working without this, but kati is
a bit pickier about ?= vs :=.

Change-Id: I80243a3c93dec7fd9b8e6f92e2c6cc956706ace0
2015-11-18 18:01:31 -08:00
Colin Cross
b35469cb90 Merge "Support LOCAL_ACP_UNAVAILABLE for prebuilts"
am: 153af5a27e

* commit '153af5a27e48627c24bda68495d1a972c744aa00':
  Support LOCAL_ACP_UNAVAILABLE for prebuilts
2015-11-17 21:36:45 +00:00
Colin Cross
ea20915b30 Switch to using kati env script
Kati generates a shell script to run ninja, but that makes it difficult
to customize the ninja command line.  Switch to sourcing the new env
script and then starting ninja manually.

Change-Id: I7139290a463018ddf5e05b4d61a0d2f18b1a2247
2015-11-17 12:10:13 -08:00
Colin Cross
d6f389299c Support LOCAL_ACP_UNAVAILABLE for prebuilts
Files built by soong will be installed using BUILD_PREBUILT, and may
include prerequesites of the acp binary.  Allow specifying
LOCAL_ACP_UNAVAILABLE:=true on prebuilts.

Change-Id: Iccfe61092f90b61f397a45f5334b0c1c0f439b32
2015-11-16 17:46:10 -08:00
Dan Albert
c00e0b841a Merge "Allow overriding the LLVM prebuilts path."
am: 9119f14943

* commit '9119f14943b3d90863660fec58b4967c9ba2ccaa':
  Allow overriding the LLVM prebuilts path.
2015-11-16 18:33:08 +00:00
Dan Albert
9119f14943 Merge "Allow overriding the LLVM prebuilts path." 2015-11-16 18:28:24 +00:00
Dan Albert
8b1d17706f Allow overriding the LLVM prebuilts path.
The automated build will need to do a two stage build, and we want to
do that without altering the source directory. Building with
`make LLVM_PREBUILTS_BASE=/path/to/prebuilts` will build using an
arbitrary toolchain instead of the installed one.

Bug: http://b/17441393
Change-Id: I4ff5c5224fbb8ebeb3a752907d6c4cd0a925aa1e
2015-11-13 23:06:07 -08:00
Sen Jiang
48ea511512 Merge "Write AB_OTA_POSTINSTALL_CONFIG to META/postinstall_config.txt."
am: 99d5f361b4

* commit '99d5f361b4d587eed1b197f501bff64223dda3b9':
  Write AB_OTA_POSTINSTALL_CONFIG to META/postinstall_config.txt.
2015-11-13 19:17:06 +00:00
Sen Jiang
99d5f361b4 Merge "Write AB_OTA_POSTINSTALL_CONFIG to META/postinstall_config.txt." 2015-11-13 19:14:00 +00:00
Sen Jiang
8f22e2a0bb Write AB_OTA_POSTINSTALL_CONFIG to META/postinstall_config.txt.
The config file will be passed to delta_generator to add the postinstall
field in the update payload.

Bug: 24537566
Change-Id: I06b8d9d0b2c37f9a3e7a844ac4d9e2eead8cd4d2
TEST: make dist
2015-11-13 10:46:09 -08:00
Shinichiro Hamaji
13248f9343 Merge "Use GOMA_HERMETIC=error for USE_GOMA=true build"
am: a50961ae95

* commit 'a50961ae9517cdaab83294e537f35922717e17f9':
  Use GOMA_HERMETIC=error for USE_GOMA=true build
2015-11-13 07:30:53 +00:00
Shinichiro Hamaji
21a18b7509 Use GOMA_HERMETIC=error for USE_GOMA=true build
With this flag, goma's client (gomacc) fails when local
compiler is different from goma's. Without this, goma's
backend finds a fallback compiler which looks closer to the
local compiler using version info, etc.

Bug: 25668061

Change-Id: I64ff81751f3fe960a557ddb2ca30a090c26c4327
2015-11-13 15:53:56 +09:00
Elliott Hughes
8b0e2e5094 Merge "Set WINVER as well as _WIN32_WINNT."
am: 4b6bb08da3

* commit '4b6bb08da308004898ad7db177834f78c808eabb':
  Set WINVER as well as _WIN32_WINNT.
2015-11-13 03:11:39 +00:00
Elliott Hughes
4b6bb08da3 Merge "Set WINVER as well as _WIN32_WINNT." 2015-11-13 03:09:25 +00:00
Dan Willemsen
aa725f6769 Merge "Sort dex and static lib resources"
am: 67d993fc9c

* commit '67d993fc9cd01950f8994b7613362ea749be561a':
  Sort dex and static lib resources
2015-11-13 01:44:44 +00:00
Dan Willemsen
67d993fc9c Merge "Sort dex and static lib resources" 2015-11-13 01:39:30 +00:00
Dan Albert
37a9e5d568 Merge "Make not having Jack non-fatal."
am: 5f88dd0dd6

* commit '5f88dd0dd68356679ebdc5991c20bbbad657cc43':
  Make not having Jack non-fatal.
2015-11-13 01:18:32 +00:00
Dan Albert
18ace0f2fe Merge "Allow globally disabling the relocation packer."
am: 6d6ba8aaf1

* commit '6d6ba8aaf19b3f5cb209c0b60c7bfd1900411945':
  Allow globally disabling the relocation packer.
2015-11-13 01:18:24 +00:00
Dan Albert
fd8c722714 Make not having Jack non-fatal.
Not every build needs Java.

Bug: http://b/17441393
Change-Id: Ia55742cfd43c3a4f9c7873b87816bcce99f8156f
2015-11-12 15:29:12 -08:00
Dan Albert
52831d118c Allow globally disabling the relocation packer.
The relocation packer is part of prebuilts/misc, and pulling that
repository into the manifest requires pulling in a lot of other things
not needed by the simpler builds (like the clang toolchain manifest).

Bug: http://b/17441393
Change-Id: If4a94804fc1a3f81215b840247f8e332d0b510c1
2015-11-12 15:27:49 -08:00
Elliott Hughes
cf1c15c975 Set WINVER as well as _WIN32_WINNT.
Change-Id: I6ace26d6c25549cf42755423340af07e96e05779
2015-11-12 13:33:20 -08:00
Tao Bao
741c16686e Merge "build: Remove check_prereq."
am: 79dd4b2983

* commit '79dd4b29831b5fe5b6d9627c0b0373374c4e3036':
  build: Remove check_prereq.
2015-11-12 16:46:13 +00:00
Tao Bao
79dd4b2983 Merge "build: Remove check_prereq." 2015-11-12 16:41:45 +00:00
Yohann Roussel
94f86f8877 Sort dex and static lib resources
Before adding them to the apk or javalib.jar. This allows the entries
order to be reproducible and will help to have a reproducible build.

Bug: 25629246

Change-Id: Ie596aecfdd08047ea9f9071896a2b980e7200b41
2015-11-12 14:58:19 +01:00
Tao Bao
cb4abef523 build: Remove check_prereq.
check_prereq is a tool for recovery API v2, which has been obselete
since we moved to v3 in [1].

[1] commit e08991e02a7d678f2574e85289a34b2a9a537c82

Bug: 24621915
Change-Id: Ie96348fb56c5a3e029cac2417b59d8eb62dc085b
2015-11-11 21:26:29 -08:00
Dan Willemsen
0cfcb599ea Merge "Make uncompressing jni libs in prebuilt APKs reproducible"
am: ae8e6c8cda

* commit 'ae8e6c8cda704277ab84851c475ecd8bf4c484cb':
  Make uncompressing jni libs in prebuilt APKs reproducible
2015-11-12 05:25:24 +00:00
Dan Willemsen
5c64b4e81c Make uncompressing jni libs in prebuilt APKs reproducible
This was extracting the shared libraries into a temporary directory,
then adding them back into the zip file using the raw filesystem
ordering. Fix that by passing a sorted list to zip.

Bug: 24201956
Change-Id: I59c41151968be6faf289e04719a9992157eb405d
2015-11-11 18:26:38 -08:00
Chih-hung Hsieh
5188f77e8f Merge "Revert "Enable gold linker for aarch64.""
am: 98c27a83da

* commit '98c27a83da8caee0ed4e57c596d4f51e182588ef':
  Revert "Enable gold linker for aarch64."
2015-11-12 01:09:32 +00:00
Chih-hung Hsieh
98c27a83da Merge "Revert "Enable gold linker for aarch64."" 2015-11-12 01:04:06 +00:00
Chih-hung Hsieh
65c7b5c6d6 Revert "Enable gold linker for aarch64."
This reverts commit a7f68ee9ea.

Change-Id: I8c15df8ce81859f1b950dbac0a47d7d24c0f4cc2
BUG: 25642296
2015-11-11 23:07:01 +00:00
Ying Wang
d54b9e6ba0 Merge "Add suffix .so to use directly libart.so"
am: d1fd823f33

* commit 'd1fd823f3349c55ba1d7e3b022a6bbff9f1f2680':
  Add suffix .so to use directly libart.so
2015-11-11 22:12:24 +00:00
Ying Wang
d1fd823f33 Merge "Add suffix .so to use directly libart.so" 2015-11-11 22:05:48 +00:00
randy.jeong
59bdffa76a Add suffix .so to use directly libart.so
It should be the complete name with suffix .so to use libart.
At present, unnecessarily falls back like below.
"Falling back from libart to libart.so after dlopen error:
dlopen failed: library "libart" not found"

Change-Id: Ie5da35a71d6661434d2097c842407e6a254f8f58
Signed-off-by: randy.jeong <randy.jeong@samsung.com>
2015-11-10 16:42:49 +09:00
Stephen Hines
3f83ed0181 Merge "Switch from clang 3.6 to new clang repository (with 3.8)."
am: 106eb619e2

* commit '106eb619e242ef6694f66a862c1e21249de68f97':
  Switch from clang 3.6 to new clang repository (with 3.8).
2015-11-10 06:01:47 +00:00
Stephen Hines
e8119e96fc Switch from clang 3.6 to new clang repository (with 3.8).
This reverts commit f7dbab16ff.

Bug: 23396112

Switch from "-fsanitize-undefined-trap-on-error" to
"-fsanitize-trap=all". The former ends up accidentally leaving
unresolved calls to __ubsan* helper functions in the object file with
clang 3.8. The latter is used when we don't include address sanitizer,
and replaces any misbehavior with a direct call to abort().
2015-11-09 16:32:11 -08:00
Lee Campbell
5bd31df419 Merge "build: Add LINUX_KERNEL_COPYING license file"
am: 8b2c37c953

* commit '8b2c37c9533f94f81fd8b15257c56061ce10998c':
  build: Add LINUX_KERNEL_COPYING license file
2015-11-09 20:47:25 +00:00
Lee Campbell
b463fcde80 build: Add LINUX_KERNEL_COPYING license file
The build requires LINUX_KERNEL_COPYING when building
the notices. Change from depending on a file in
prebuilds/qemu-kernel to one in /build/core.

This is required as Brillo does not have the qemu-kernel
in its checkout.

BUG=25578534

Change-Id: Ieff6970035d27884c0769106e507284c1096c33f
2015-11-09 02:27:01 +01:00
Ying Wang
7c09c937b6 Merge "Tag "tests" alone doesn\'t prevent including emma.jar"
am: a23a97e3bf

* commit 'a23a97e3bf77bdd7fa01cd1f681d758a943db63a':
  Tag "tests" alone doesn't prevent including emma.jar
2015-11-06 19:31:00 +00:00
Ying Wang
a23a97e3bf Merge "Tag "tests" alone doesn't prevent including emma.jar" 2015-11-06 19:27:52 +00:00
Ying Wang
324ffb2785 Tag "tests" alone doesn't prevent including emma.jar
Only if an app has LOCAL_INSTRUMENTATION_FOR, it can get the emma
classes from the target app and we don't need to instrument the test app
itself.

Change-Id: If0fba50ddae757254fc58ca104d729d61603fd78
2015-11-06 11:22:28 -08:00
Steve Fung
dc43cddbf6 Merge "Add the build type to META folder in target files.zip"
am: 53a6fd6498

* commit '53a6fd649817e5d9909d9aaca0369c19840f8613':
  Add the build type to META folder in target files.zip
2015-11-06 03:23:31 +00:00
Steve Fung
53a6fd6498 Merge "Add the build type to META folder in target files.zip" 2015-11-06 03:18:35 +00:00
Steve Fung
4044b38f0a Add the build type to META folder in target files.zip
For AB builds, add the build type to META/build_type.txt so the
server can easily determine user, userdebug, and eng builds
from each other.

Bug: 25420005
Change-Id: I6e4de2ba36a6fd1208c65a434d4725bb93d2cee6
2015-11-05 15:04:11 -08:00
Than McIntosh
fbf9234233 Merge "Enable gold linker for aarch64."
am: 838ad09b17

* commit '838ad09b17c6525122e6e8881674030e6746a8c4':
  Enable gold linker for aarch64.
2015-11-05 11:52:25 +00:00
Than McIntosh
838ad09b17 Merge "Enable gold linker for aarch64." 2015-11-05 11:49:56 +00:00
Shinichiro Hamaji
7070e5dc59 Merge "Allow missing SONAME in .toc files"
am: 457345e58c

* commit '457345e58c9f273a467847e2086318d6d8380d5b':
  Allow missing SONAME in .toc files
2015-11-05 04:07:21 +00:00
Shinichiro Hamaji
f0972f7966 Allow missing SONAME in .toc files
At least one shared object in internal repo doesn't have
SONAME entry in its dynamic segment because it is created by
objcopy instead of a linker.

Change-Id: If7106da022ff1e4e925191402f9072795dc3ddcb
2015-11-05 12:51:08 +09:00
Shinichiro Hamaji
7557ad2bbd Merge "Use .KATI_RESTAT to reduce unnecessary rebuilds of binaries"
am: 2f8ffa61be

* commit '2f8ffa61bee03593a89913806e863f73a8e646b7':
  Use .KATI_RESTAT to reduce unnecessary rebuilds of binaries
2015-11-05 01:27:06 +00:00
Shinichiro Hamaji
2f8ffa61be Merge "Use .KATI_RESTAT to reduce unnecessary rebuilds of binaries" 2015-11-05 00:46:04 +00:00
Than McIntosh
a7f68ee9ea Enable gold linker for aarch64.
[Second attempt, this time with updated mac prebuilt]

Switches default linker from -fuse-ld-bfd to
-fuse-ld=gold, and enables -Wl,--icf=safe. This
changes reduces /system/lib64/*.so text size
by about 2% for N9.

Change-Id: I587075aae9d70cb6b16e55dc9cd1052580ac2626
2015-11-04 19:34:50 -05:00
Ying Wang
3a5c02e295 Merge "Don\'t run ziptime on host zip files."
am: 7f50cf7f50

* commit '7f50cf7f501a7289cbe8c03eb20ed0f54edf5a99':
  Don't run ziptime on host zip files.
2015-11-04 18:19:54 +00:00
Ying Wang
5d88770f26 Don't run ziptime on host zip files.
ziptime fails on zip file larger than 2GB.
These zip files won't installed on device and we don't care that much
about their reprodudcibility across builds.

Change-Id: I47062928d075a59eda92dd5333e59502f490d1cb
2015-11-04 10:06:25 -08:00
Shinichiro Hamaji
0e7587a9ea Use .KATI_RESTAT to reduce unnecessary rebuilds of binaries
When a shared object is rebuilt, all dependent libraries and
executables are rebuilt. Such rebuild is unnecessary when there
is no interface change. With this patch, .toc files will be
generated for all .so files. The rule which generates .toc files
has ninja's restat=1 and .toc files are not changed ninja won't
rebuild dependent targets.

Performance:

$ m && touch bionic/libc/stdio/stdio.c && time m
Before: 1m03s (2563 targets)
After: 21s (90 targets)

Bug: 24597504
Change-Id: Ia5dd950273d143f4e99eee8bef7478f1a94cd138
2015-11-04 15:23:59 +09:00
Ying Wang
32078cd8b2 Merge "Sort out ANDROID_GOALS, KATI_GOALS and NINJA_GOALS."
am: 5dd68067a6

* commit '5dd68067a6a5e48b29882ca065606ab85b20d3d7':
  Sort out ANDROID_GOALS, KATI_GOALS and NINJA_GOALS.
2015-11-04 01:15:47 +00:00
Ying Wang
4a4a0bc38f Sort out ANDROID_GOALS, KATI_GOALS and NINJA_GOALS.
ANDROID_GOALS: any Android goals that need to be built.
KATI_GOALS: goals that we need to pass to Kati.
NINJA_GOALS: goals we need to pass to Ninja.

For modifier Android goals (dist, INTERNAL_MODIFIER_TARGETS),
we don't need to pass them to Ninja. See also commit
80e46c7c5c.
Restore the dist rule removed by the above commit.

Previously "droid" was never passed to Ninja. That's incorrect.
"make droid docs" should build both docs and droiod.
Fixed with this change.

Change-Id: I5c28061fe0ebe7848872ee349056d029b787ff71
2015-11-03 17:10:28 -08:00
Dan Willemsen
3665246dcb Merge "Don\'t use ziptime with unbundled builds"
am: 29a6675983

* commit '29a667598340624f38b0a08c3e9984afc375b12d':
  Don't use ziptime with unbundled builds
2015-11-04 00:33:44 +00:00
Dan Willemsen
a25ddad7d6 Don't use ziptime with unbundled builds
Some of the trees are unable to compile native code with the normal
build rules, even though they can build kati.

Bug: 24201956
Change-Id: I2afc3468480b2c78407d62323e6b82979c8ee254
2015-11-03 16:18:41 -08:00
Bill Yi
af05ad919a Merge commit '4f5e8cc3ca6da83f11bf42d04f1a57b9af16a582' into HEAD 2015-11-03 14:28:58 -08:00
Dan Willemsen
a0975edc16 Merge "Remove changing uids/timestamps from zip/jar files" 2015-11-03 21:38:45 +00:00
Ying Wang
fb89fd36b2 Merge "Don\'t check the host JDK tools when build/core/config.mk is called from envsetup.sh."
am: a63d379aab

* commit 'a63d379aab75fe3991320319f63faddd3b84b287':
  Don't check the host JDK tools when build/core/config.mk is called from envsetup.sh.
2015-11-03 00:40:38 +00:00
Ying Wang
a63d379aab Merge "Don't check the host JDK tools when build/core/config.mk is called from envsetup.sh." 2015-11-03 00:17:43 +00:00
Ying Wang
7fcd2f9086 Don't check the host JDK tools when build/core/config.mk is called from envsetup.sh.
Envsetup.sh (lunch) relies on config.mk to get build varaible values; while
config.mk may rely on envsetup.sh to set up JAVA_HOME/PATH.
Without this change config.mk may be checking the host JDK tools before
JAVA_HOME/PATH get set up.

Change-Id: I1e6b5e33147258832ce2f0a425f9526ef4782c43
2015-11-02 16:00:47 -08:00
Dan Willemsen
48a621c277 Remove changing uids/timestamps from zip/jar files
Pass -X to zip so that Unix UID/GID and extra timestamps aren't
saved into the zip files.

Add a new tool, ziptime, that uses a very stripped down copy of
zipalign. It no longer depends on libandroidfw, and now rewrites the
timestamps in place instead of making a copy of the zipfile. This should
improve speed and reduce disk requirements, especially with the large
packaging zip files.

Bug: 24201956
Change-Id: I50f68669f659da1b4393e964ad40b6aafb00c1e7
2015-11-02 14:51:54 -08:00
Gaurav Shah
af80a461d6 Merge "envsetup,product,ninja: enable symlink traversal"
am: f589c7b442

* commit 'f589c7b442feb02843bdf82305b599b686fc5204':
  envsetup,product,ninja: enable symlink traversal
2015-11-02 22:27:27 +00:00
Gaurav Shah
00b8cd9a15 Merge "Support build targets with no installable apps/packages"
am: aed6805380

* commit 'aed6805380810f51bb0d8b93fc5eac005a6de364':
  Support build targets with no installable apps/packages
2015-11-02 22:27:20 +00:00
Gaurav Shah
64ea350dd8 Merge "build: Add extra build customization for /product"
am: a80f1e3257

* commit 'a80f1e32575db5d66f4b4e6efdf79dd10dd2295e':
  build: Add extra build customization for /product
2015-11-02 22:27:14 +00:00
Gaurav Shah
881ec090c4 Merge "build: Add support for defining products in /product"
am: acb8a7c1f8

* commit 'acb8a7c1f8cacaf136edba1a25d64467d352a432':
  build: Add support for defining products in /product
2015-11-02 22:27:08 +00:00
Gaurav Shah
f589c7b442 Merge "envsetup,product,ninja: enable symlink traversal" 2015-11-02 22:22:50 +00:00
Gaurav Shah
aed6805380 Merge "Support build targets with no installable apps/packages" 2015-11-02 22:22:40 +00:00
Gaurav Shah
a80f1e3257 Merge "build: Add extra build customization for /product" 2015-11-02 22:22:32 +00:00
Gaurav Shah
acb8a7c1f8 Merge "build: Add support for defining products in /product" 2015-11-02 22:22:22 +00:00
Will Drewry
c13f9c952d envsetup,product,ninja: enable symlink traversal
When searching device, product, or hardware, allow
find to follow symlinks.

Add KATI_EMULATE_FIND=false to allow disabling the find
emulator which changes findleaves.py behavior wrt
symlinks.

BUG=24605247
TEST=works with CL:783781 (without the find wrapper in that CL)

Change-Id: Ia9d0e4add391a56f34828a09a6cec3f435ccc548
2015-11-02 14:18:45 -08:00
Gaurav Shah
67c2ed390f Support build targets with no installable apps/packages
Specifically, do not error out if no installable apps are found.

- When creating an archive of all the apps, and if no apps exist
for the target, generate an empty archive file.
- If building for a target with no installable jar(s) or apk(s),
generate an empty package stats file.

The former is just an output artifact. The latter is used
by the upload_pkg_stats.py script which correctly handles
an empty input file.

BUG: 23421592

Change-Id: I48db9f9e1f61914d8fd938130e09b41849685450
2015-11-02 14:18:30 -08:00
Lee Campbell
04ba31236e build: Add extra build customization for /product
This makes /product more consistent with /device & /vendor

BUG: 22030305

Change-Id: Ic65bfde7fb3e9fab8c8fb8d99af15404574abde0
2015-11-02 14:18:13 -08:00
Lee Campbell
455f6f458d build: Add support for defining products in /product
The build will now search for AndroidProducts.mk in /product

BUG: 22030305

Change-Id: I2d067d95d0c8dc1341a55167f9ac7f6926e04ce3
2015-11-02 14:17:47 -08:00
Ying Wang
cce30b6daa Merge "Add _asan suffix to ro.build.flavor for ASAN builds."
am: f0a8dd43b2

* commit 'f0a8dd43b26d49ad67e2c6c8c936e64a62df8582':
  Add _asan suffix to ro.build.flavor for ASAN builds.
2015-11-02 19:52:04 +00:00
Ying Wang
603e4ed594 Merge "Fix "make product-graph" and "make dump-products"."
am: 888f30aa44

* commit '888f30aa448370206a49ff7df940e134b8ff7017':
  Fix "make product-graph" and "make dump-products".
2015-11-02 19:51:57 +00:00
Ying Wang
f0a8dd43b2 Merge "Add _asan suffix to ro.build.flavor for ASAN builds." 2015-11-02 19:47:31 +00:00
Ying Wang
888f30aa44 Merge "Fix "make product-graph" and "make dump-products"." 2015-11-02 19:46:53 +00:00
Dan Willemsen
d8d06da814 Merge "Revert "Remove changing uids/timestamps from zip/jar files""
am: 49d8c5196e

* commit '49d8c5196eb690fc987673c27cb61087c5886be4':
  Revert "Remove changing uids/timestamps from zip/jar files"
2015-10-29 21:33:39 +00:00
Dan Willemsen
b589ae4e26 Revert "Remove changing uids/timestamps from zip/jar files"
This reverts commit 3c2c064c87.

zipalign depends on libandroidfw, and some setups don't include frameworks/base.

Bug: 24201956
Change-Id: I48ee95808924f6b2221f0a49ab205c2565096b1f
2015-10-29 21:26:18 +00:00
Dan Willemsen
a51b1d532e Merge "Remove changing uids/timestamps from zip/jar files"
am: 9f25219371

* commit '9f252193714c82dbce702e8055ffaa7eec4afe66':
  Remove changing uids/timestamps from zip/jar files
2015-10-29 19:12:37 +00:00
Dan Willemsen
3c2c064c87 Remove changing uids/timestamps from zip/jar files
Pass -X to zip so that Unix UID/GID and extra timestamps aren't
saved into the zip files.

Add a new option to zipalign, -t, to replace all timestamps with static
timestamps (2008 Jan 1 00:00:00). Use this for all non-APK zip files.
APK zip timestamps are set based on the certificate date in SignApk.

Bug: 24201956
Change-Id: Ifb619fc499ba9d99fc624f2acd5f8de36d78ef8e
2015-10-29 11:57:16 -07:00
Tao Bao
e5eb4567d4 Merge "Honor TARGET_NO_RECOVERY flag."
am: c448e91c3d

* commit 'c448e91c3d3d095f8f200c9925f7db2ad525132f':
  Honor TARGET_NO_RECOVERY flag.
2015-10-29 16:45:31 +00:00
Tao Bao
c448e91c3d Merge "Honor TARGET_NO_RECOVERY flag." 2015-10-29 16:13:52 +00:00
Ying Wang
21ec03d186 Add _asan suffix to ro.build.flavor for ASAN builds.
Bug: 25344475
Change-Id: I27f2472906631239ca725ee09da2ab791cad2195
2015-10-28 18:47:00 -07:00
Ying Wang
4f5e8cc3ca Merge "Normalize the product makefile path in inherit-product." am: aabff90bfe
am: 3482ea54a2

* commit '3482ea54a2fecc756c79a94f37a66113d21d7558':
  Normalize the product makefile path in inherit-product.
2015-10-28 23:59:12 +00:00
Ying Wang
3482ea54a2 Merge "Normalize the product makefile path in inherit-product."
am: aabff90bfe

* commit 'aabff90bfe2312a95d3cf57564845fef8dc469a2':
  Normalize the product makefile path in inherit-product.
2015-10-28 23:55:10 +00:00
Ying Wang
67132baa4d Fix "make product-graph" and "make dump-products".
- For unmodified "make product-graph" and "make dump-products",
  load only the current product configuration makefiles. This is much
  faster than loading all product makefiles.
- For "make product-graph ANDROID_PRODUCT_GRAPH=--all",
  "make dump-products ANDROID_DUMP_PRODUCTS=all", load all product
  makefiles.
- Move product-graph.mk out of build tasks, so we can skip loading all
  the Android.mks, which takes long and we don't really need them.
  More importantly, with all product makefiles loaded, modules in
  Android.mks are prone to clash (if they are conditionally included
  by variables set up in product makefiles) and lead to parse-time
  error.

Change-Id: Idc1d6b0c23eb2c8bb34fdd7a1fa4d56171768d21
2015-10-28 16:49:44 -07:00
Ying Wang
a174261042 Normalize the product makefile path in inherit-product.
Some vendor product makefiles call $(inherit-product) on the same
product makefile with different paths, by using "../" in relative paths.
However inherit-product requires unique path as ID for a product
makefile, for bookkeeping purpose.
Normalize the product makefile path in inherit-product, if the path
contains "../".

Change-Id: I1a864ce120c713d8e79ec179213b9fc9352aba53
2015-10-28 15:20:41 -07:00
Colin Cross
0dc087dff7 Merge "Remove use of .INTERMEDIATE" am: dda5e96b14
am: 24ef58d163

* commit '24ef58d1638716c1fdbc130e6cf871d052e9d672':
  Remove use of .INTERMEDIATE
2015-10-28 21:15:27 +00:00
Colin Cross
24ef58d163 Merge "Remove use of .INTERMEDIATE"
am: dda5e96b14

* commit 'dda5e96b144c15a75d625ceac7e92b50cf9c363a':
  Remove use of .INTERMEDIATE
2015-10-28 21:12:02 +00:00
Colin Cross
42470e915d Remove use of .INTERMEDIATE
make 3.81 has a bug where combining an up-to-date .INTERMEDIATE rule
with -j causes an infinite loop (http://savannah.gnu.org/bugs/?15919).
.INTERMEDIATE was only necessary to support multiple outputs while only
running a command once, remove .INTERMEDIATE by replacing
$(KATI_OUTPUTS) dependencies with $(KATI_BUILD_NINJA).  We can assume
that $(KATI_NINJA_SH) will be updated at the same time as
$(KATI_BUILD_NINJA), and not explicitly depend on it.

Also remove generateonly and fastincremental, which are no longer
necessary and were overcomplicating ninja.mk.  kati now always runs due
to FORCE, and ninja is run by a phony rule that depends on
$(KATI_BUILD_NINJA).

Bug: 25344116
Change-Id: I99d2713b1532ea11d83da9a11b1be26cfe13a5d2
2015-10-28 13:31:40 -07:00
Tao Bao
db45efa647 Honor TARGET_NO_RECOVERY flag.
Don't generate recovery.img when calling 'make dist' if
TARGET_NO_RECOVERY is set. The build system passes the flag to the
packaging script which then generates recovery.img conditionally.

Bug: 25329471
Change-Id: Ifbc999300d5c31e897878f81e231ae7dd2aca660
2015-10-27 20:00:10 -07:00
Colin Cross
1ac51c013e Merge "Error out early on nonstandard JDK directory layouts" am: 506113d267
am: e95cf75293

* commit 'e95cf75293c7111957229ae898ad1afd453ead50':
  Error out early on nonstandard JDK directory layouts
2015-10-27 19:22:07 +00:00
Colin Cross
e95cf75293 Merge "Error out early on nonstandard JDK directory layouts"
am: 506113d267

* commit '506113d2671e8f3dd5a46b63b7996accec6acb35':
  Error out early on nonstandard JDK directory layouts
2015-10-27 19:17:38 +00:00
Colin Cross
506113d267 Merge "Error out early on nonstandard JDK directory layouts" 2015-10-27 19:12:40 +00:00
Ying Wang
fd06048887 Merge "Revert "Enable gold linker for aarch64."" am: edfa0981c9
am: 5eccb209d0

* commit '5eccb209d06bcc9c7502d5767dbc6c9e2fc7f8c5':
  Revert "Enable gold linker for aarch64."
2015-10-27 18:55:19 +00:00
Ying Wang
5eccb209d0 Merge "Revert "Enable gold linker for aarch64.""
am: edfa0981c9

* commit 'edfa0981c958453215fbbfccdcf6d05662cf9583':
  Revert "Enable gold linker for aarch64."
2015-10-27 18:49:07 +00:00
Ying Wang
edfa0981c9 Merge "Revert "Enable gold linker for aarch64."" 2015-10-27 18:36:47 +00:00
Dan Albert
e4256f5759 Revert "Enable gold linker for aarch64."
Causes build failures on Darwin.

prebuilts/gcc/darwin-x86/aarch64/aarch64-linux-android-4.9/aarch64-linux-android/bin/ld.gold: warning: cannot scan executable section 5 of out/target/product/flounder/obj/SHARED_LIBRARIES/libdl_intermediates/libdl.o for Cortex-A53 erratum because it has no mapping symbols.

prebuilts/gcc/darwin-x86/aarch64/aarch64-linux-android-4.9/aarch64-linux-android/bin/ld.gold: warning: cannot scan executable section 8 of out/target/product/flounder/obj/SHARED_LIBRARIES/libdl_intermediates/libdl.o for Cortex-A53 erratum because it has no mapping symbols.

prebuilts/gcc/darwin-x86/aarch64/aarch64-linux-android-4.9/aarch64-linux-android/bin/ld.gold: warning: cannot scan executable section 11 of out/target/product/flounder/obj/SHARED_LIBRARIES/libdl_intermediates/libdl.o for Cortex-A53 erratum because it has no mapping symbols.

prebuilts/gcc/darwin-x86/aarch64/aarch64-linux-android-4.9/aarch64-linux-android/bin/ld.gold: error: treating warnings as errors

This reverts commit 127d110172.

Change-Id: I1d3de90f5ae777b66a8f94fbcc9ccde8a9e3001c
2015-10-27 18:18:46 +00:00
Ying Wang
86a7c218e0 Merge "Strip LOCAL_MODULE before referencing it." am: 411b2f90a9
am: fbb85a95b5

* commit 'fbb85a95b5d1089c335106c33ce3613e3e39702a':
  Strip LOCAL_MODULE before referencing it.
2015-10-27 00:16:05 +00:00
Ying Wang
fbb85a95b5 Merge "Strip LOCAL_MODULE before referencing it."
am: 411b2f90a9

* commit '411b2f90a95e5a471f248ec769826cf22dd12296':
  Strip LOCAL_MODULE before referencing it.
2015-10-27 00:12:53 +00:00
Ying Wang
227cdd02c4 Strip LOCAL_MODULE before referencing it.
Bug: 24985980
Change-Id: Ic97e852aa7a8bf2d9224d3d6656d33145cc67800
(cherry-pick from commit 4d20a32a79)
2015-10-26 17:06:08 -07:00
Dan Albert
bcaf671bb6 Merge "Drop GCC back to C++11." am: dba46710fe
am: a01ec70d92

* commit 'a01ec70d92fa95d0851171f9f40eeb6d4dcb7dd3':
  Drop GCC back to C++11.
2015-10-26 21:14:46 +00:00
Dan Albert
a01ec70d92 Merge "Drop GCC back to C++11."
am: dba46710fe

* commit 'dba46710fe5bb0ea3bea8c3c0fea76273d343ff3':
  Drop GCC back to C++11.
2015-10-26 21:10:15 +00:00
Dan Albert
da63739767 Drop GCC back to C++11.
Our GCC does not use a valid C++14 ABI.

Bug: http://b/25022512
Change-Id: I6f4b3450137c24a6a0c00bf956bae7a0ba280094
2015-10-26 11:28:33 -07:00
Than McIntosh
77bdc82f5f Merge "Enable gold linker for aarch64." am: 14c2d968b9
am: 52cc54dcee

* commit '52cc54dceeb17fa6818b6a3e1496c894cb2bd231':
  Enable gold linker for aarch64.
2015-10-26 12:31:34 +00:00
Than McIntosh
52cc54dcee Merge "Enable gold linker for aarch64."
am: 14c2d968b9

* commit '14c2d968b913573e7a21fe72723254c9cc277210':
  Enable gold linker for aarch64.
2015-10-26 12:27:28 +00:00
Than McIntosh
14c2d968b9 Merge "Enable gold linker for aarch64." 2015-10-26 12:22:26 +00:00
Colin Cross
ca440e58d1 Merge "Add dummy description for GET-INSTALL-PATH" am: 9d192f1c10
am: bc20982b40

* commit 'bc20982b405a228984f9242957a23db6d463aad2':
  Add dummy description for GET-INSTALL-PATH
2015-10-24 21:15:53 +00:00
Colin Cross
bc20982b40 Merge "Add dummy description for GET-INSTALL-PATH"
am: 9d192f1c10

* commit '9d192f1c1090a757c9218296457482d2ba737989':
  Add dummy description for GET-INSTALL-PATH
2015-10-24 21:13:05 +00:00
Colin Cross
9d192f1c10 Merge "Add dummy description for GET-INSTALL-PATH" 2015-10-24 21:09:34 +00:00