This makes the signapk tool use Conscrypt (where possible) instead of
the platform-default JCA providers and the Bouncy Castle JCA provider.
This speeds up (by 10-30%) APK and OTA update signing because
Conscrypt's crypto primitives are backed by BoringSSL.
Previously, the signapk tool consisted only of the signapk.jar.
Because Conscrypt is backed by native code, signapk now consists of
signapk.jar and crypto_openjdk_jni shared library. This requires that
users of the tool be updated to provide a suitable -Djava.library.path
argument to the Java runtime. This change updates all known users of
the tool inside the Android source tree to do so.
Bug: 26097626
Change-Id: I8411b37d7f771ed99269751a3007dff103083552
When USE_CLANG_PLATFORM_BUILD is not set, default will be clang/llvm.
USE_CLANG_PLATFORM_BUILD=false can be used to select gcc as default.
BUG: 23163853
BUG: 26102335
Change-Id: I00604c2aef4849e8c3505b2c4002eb1c46cd1fd1
libext2_uuid_host was renamed to libext2_uuid-host to match the
"-host" suffix used in most libraries.
Bug: 24619596
TEST=make dist
Change-Id: Ic5faccb4d5fdbbf3d3bba6f4a35cf99d4961bb54
Also install and update the server if necessary.
The target start-jack-server produces no file so it's always built.
Since the dependency is "order only", it doesn't cause force rebuilt of
jack targets after start-jack-server execution.
Bug: 25443108
Change-Id: I1608d87d186694d47307e00337b1905f0b8079c4
Without this if a Java libraryw with LOCAL_NO_STANDARD_LIBRARIES doesn't
have core-libart in its LOCAL_JAVA_LIBRARIES, it would use core-libart
as bootclasspath but without having dependency on it.
Change-Id: I611a5a5df2bf0ad59e0be50ed1ad1afe8b843e90
(cherry-pick from commit c6a301756c)
This results in nearly all functions with the possibility of stack
corruption getting stack canaries, because it applies to any function
taking a reference to the frame or with a local array rather than just
the functions with arrays larger than 8 bytes. It was developed for use
in Chrome (and Chrome OS) and has also been adopted by various other
distributions (Arch, Fedora, Ubuntu, etc).
The code size increase ranges from ~1.5% to ~2.5%, compared to ~0.3% to
~0.7% with the more conservative switch. The increase in the performance
loss is usually minimal. The overall size increase once everything other
than C and C++ code is taken into account is minimal, and it greatly
improves the mitigation of stack buffer overflow vulnerabilities.
https://lwn.net/Articles/584225/
Change-Id: Ie83d381e09d94deb34c5ff142a101ba3d14cf3ba
When $(call func) in the makefile text expansion includes newline, gmake
reports error "missing separator". But it's fine if the expansion includes
only spaces. That's a bit odd.
This change fixes the "missing separator".
Change-Id: I094e5ae1725699ebfa4ed66544eef037dd68714c
This changes the build system to no longer run zipalign except for
those prebuilts which do not need to re-signed.
Running zipalign is no longer needed because signapk takes care of
alignment. For those prebuilts which do not need to be re-signed
signapk is not invoked and thus zipalign is still needed because the
prebuilts may not have been aligned properly. This exemption will go
away once prebuilts are properly aligned.
Bug: 25794543
Change-Id: I31f10af80b9baa3c9481cb36f41e5e5046e852f9
Error out if there is a file listed in LOCAL_SRC_FILES_EXCLUDE but not in
LOCAL_SRC_FILES. This should catch typos or other mistakes that would
otherwise be missed.
Change-Id: Iaddf575a6ce35238998ac47b59591a7d05fbcd0d
AIDL is defined in the sometimes-prebuilt tools section, remove the
extra definition that was overriding it.
Change-Id: I677bf46475fd5fd4a9258c77d91ecee806e5f205
Currently, if a version script is passed to the linker (using
-Wl,--version-script,...), it is used to limit symbol visibility and
assign symbol versions. But if a symbol is listed in the version script
but is not present in the binary, no error or warning is given.
Pass -Wl,--no-undefined-version to the linker so that it verifies all
(non-wildcard, C) entries in the version script match symbols in the
binary.
Change-Id: I65878931ab61124ae75e2c738cc733adfb107afc
Don't install the prebuilt SDK tools for TARGET_BUILD_APPS builds, just
execute them in place. Avoids issues with duplicate rules for the
prebuilts and source modules when building with TARGET_BUILD_APPS in a
full platform tree.
Change-Id: I3cdb4f1a8208e8750310a5cc6130657613b683d1
the value of USER is dependent from the compilation environment,so
when compiling one same device project, the BUILD_FINGERPRINT may
exceed 91 characters because ${USER} is long, but with short ${USER}
the compilation can pass.
Signed-off-by: wei qiao <qiaowei224@gmail.com>
Change-Id: Ia0f7dfa9cf7d605f1f2603f70dd0e6877482eb8a
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
am: bff3c9b4c1
* commit 'bff3c9b4c10dcb3ce3820d3a5e144e3df20313dc':
Use libstdc++ for ijar
Build ijar for apps build
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
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
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)
As we occasionally see java.lang.OutOfMemoryError when running
doc-comment-check-docs.
Bug: 25787786
Change-Id: I6c505c96ec36d09d28d400e03027b169870c49bb
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
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
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
Not sure why my previous testing was working without this, but kati is
a bit pickier about ?= vs :=.
Change-Id: I80243a3c93dec7fd9b8e6f92e2c6cc956706ace0
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
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
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
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
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
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
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
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
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
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>
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().
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
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
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
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
[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
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
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
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
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
am: a63d379aab
* commit 'a63d379aab75fe3991320319f63faddd3b84b287':
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
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
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
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
This reverts commit 3c2c064c87.
zipalign depends on libandroidfw, and some setups don't include frameworks/base.
Bug: 24201956
Change-Id: I48ee95808924f6b2221f0a49ab205c2565096b1f
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
- 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
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
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
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
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
kati takes the first @echo command in a rule and turns it in to a ninja
description that gets pretty-printed. The GET-INSTALL-PATH is only
@echo commands and is parsed by development/testrunner/runtest.py, so
it fails to parse the pretty-printed first test.
Add a dummy @echo to GET-INSTALL-PATH for kati to use as the
description, so the rest of the @echo commands are left unmodified.
Change-Id: I192fde48b26726a2f6760448f819243bd2f21312
On Darwin, javac may be located in a nonstandard directory layout such as:
/System/Library/Frameworks/JavaVM.framework/Versions/Current/Commands/javac
The sed command to replace bin/javac with lib/tools.jar would fail to
match, resulting in the HOST_JDK_TOOLS_JAR being set to the javac path.
Since javac exists, the checks for missing tools.jar would all pass, and
javac would be added to the classpath instead of tools.jar, and causing
hard to debug errors about missing com.sun.javadoc when building doclava.
Change the sed command to replace /javac$, which should always be found,
with /../lib/tools.jar.
Change-Id: I5072f04636a5c14b3aeaa3a5cc3b366feae89c37
We rely on "sort -u" to dedupe aidl/logtags generated java files added
by both from $(all_java_sources) and from "find
$(PRIVATE_SOURCE_INTERMEDIATES_DIR) -name '*.java".
But "sort -u" doesn't work if any of the aidl/logtags source file path
has "../" in it.
This change fixes this issue by normalizing the source file paths before
passing them to "sort -u".
Change-Id: I12d2c4e0397bed9f426a1ed9b13608d72d01e0df
When an app has a resource directory, but the
directory contain no resources, R.stamp is not created.
This leads to that such apps are always rebuilt,
even when there are no changes.
This patch changes so that an empty R.stamp is
created even if there are no resources.
This leads to that affected apps are not rebuilt
unless changed.
Change-Id: Ia63e5b1913a4456402700b615ba7f9d56d2da852
To accommodate new changes (such as error correction in [1]) to BBOTA
in N release. We bump up the version to keep the OTA script backward
compatible.
Needs the matching CL in commit
1fdec8685af858c5ff4f45d2e3059186ab5ed2ab.
[1]: commit 0a7b47397db3648afe6f3aeb2abb175934c2cbca
Change-Id: Ib9158b455cd5905fe2d4742ce81feb1b7583054f
In order to have all the A/B updater variables in the same AB_OTA_
namespace we rename UPDATE_AB_PARTITIONS to AB_OTA_PARTITIONS.
Bug: None
Test: `make dist` includes the partitions.txt file if properly configured.
Change-Id: Ied4faabd7e2f0ab8a5007afb44ad2f38df8d630d
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: I0ef2483e1c47c34e63292dad6f6bf532359b733e
am: e0c7b4ec96
* commit 'e0c7b4ec96d4aa584f79a24aea7c682a114143d8':
Remove LOCAL_JACK_EXTRA_ARGS
Allow control of jack used for compilation
Clean call-jack and its callers
Use of DEFAULT_JACK_EXTRA_ARGS and LOCAL_JACK_FLAGS provides all needed
support.
(cherry picked from commit d2b2983cc7)
Change-Id: I1cd76836792e7332bc3750408a860400b0957485
Version of Jack used to compile a module can now be control from
a dedicated mk located in prebuilts/sdk/tools
Bug: 24564814
(cherry picked from commit b68c9a498d)
Change-Id: I7809dc966026ff94b5cb2daa7e2c63762ca4768d
This is possible now that we have the new Jack server.
Also fix dependency from dex/jack target to jack script
instead of jack.jar.
(cherry picked from commit 5e50b34221)
Change-Id: I8e7aa5087ba8d73cc93140ddfca8f4ab2f505175
The secondary variant fallback was not set. The build system expects
the variants, so system properties were malformed for x86-64:
[dalvik.vm.isa.x86.variant]: [dalvik.vm.isa.x86.features=default]
Bug: 24989387
Change-Id: Idbf54f81494f2650ad56080305807fd6b7ed4161
LOCAL_SRC_FILES_EXCLUDE will be used to filter files out of
LOCAL_SRC_FILES. A common usage will be to use
LOCAL_SRC_FILES_EXCLUDE_<arch> to remove a source file that will be
replaced with an arch-optimized version.
Change-Id: I75cc6114c47fb784bab65cae8f618c4f395f07bb
With the order-only dependency if the jni so files is updated,
make won't rebuild the system.img, which has dependency only on the apk
file.
Bug: 24865400
Change-Id: I9d5bee82b8a712a2c24dabaa0cd4c50174ea219f
Don't pass the arg list as argument in any bash command;
Instead store the arg list to the arg list file and
run "jar @arg-lsit-file".
Note we need to quote the arguments in the arg list file.
This fixed "argument list too long" build error on Mac.
Bug: 24789595
Change-Id: I718f84e540d82bb83516824894a473b2961da278
GCC & Clang encode the current working directory into the symbol files.
Even if the binaries are stripped before being installed, the build-id
hash will be different. This means that two different checkouts will
produce different installed binaries, even if the sources are identical.
To prevent this, set PWD=/proc/self/cwd, so that it replaces the
absolute path with the static path /proc/self/cwd. With GCC, use
-fdebug-prefix-map to remove that static path. Our clang does not yet
support this flag, but it was merged in r250094.
This does change the behavior when using gdb -- you now need to be in
$ANDROID_BUILD_TOP before gdb will load the sources.
Bug: 24204119
Change-Id: I792d65b042b7a3fdc78d567c5a6e93cdf0141b9b