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
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
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
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
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
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
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
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
Append error-correcting codes to verified partitions provided that
PRODUCT_SUPPORTS_VERITY_FEC is true.
This moves verity metadata to be after the hash tree, and requires
matching changes from
Ide48f581bbba77aed6132f77b309db71630d81ed
Bug: 21893453
Change-Id: I6945cbab99e214566a1f9d3702333f2dbbc35816
gcc color diagnostics stopped working when the flag was moved to
TARGET_GLOBAL_CFLAGS, as that gets overwritten by combo/select.mk. Put
it back in COMMON_GLOBAL_CFLAGS, and then let the windows build filter
it out, similar to the way clang deals with unknown flags.
Change-Id: I2db221edb893d81f199494e7515d1b9282c12fae
The 8 in this definition refers to NDK release 8, not the API level 8.
Setting it to "current" is better, since it still contains the relevant
target API level (9 in our case) for using/building our RS support APIs.
Change-Id: Ib216ea859e137643fba81c39c4b9d0077ec04455
The windows toolchain doesn't support color, only apply
-fdiagnostics-color to HOST and TARGET, not HOST_CROSS.
Change-Id: I17b999a2852b8d70b2d39a58befa10e2e32c4608
Force gcc and clang to always output color diagnostics. Ninja will
strip the ANSI color codes if it is not running in a terminal.
Bug: 24273983
Change-Id: Ic9252549bfacf3bbb3f4b9d20f63010fc24ac21d
When BREAKPAD_GENERATE_SYMBOLS is set to true, generate breakpad
symbols for binaries.
Bug: 23900817
Change-Id: I7b992d819350f4f80df5868d16f13016502dfca0
Except for kati, we never use COMMON_GLOBAL_CPPFLAGS without also using
COMMON_GLOBAL_CFLAGS, which leads to duplicate command line entries.
Change-Id: I25d625924e9d157175a9e88bc3f15b7214cfb4ed
Use md5sum as the build.ninja filename suffix if the suffix is longer
than 64 characters. Also store the original suffix in a corresponding
.suf file for human lookup.
This fixes the "File name too long" error when kati tries to write to
build.ninja with the long original suffix.
Bug: 24302576
Change-Id: Ie04b0c14e1a9d593aa5c2a6b357b19a9e8a7158e
For some reason shamu doesn't boot after this change.
Bug: http://b/24166967
This reverts commit e92d25f296.
Change-Id: Ibd90c0fccb1fe7446f959c937963d1aa4e43c37c
Target modules shouldn't re-export libgcc.a because we don't want
other binaries importing them when they should be getting their own
copy of the builtins.
Bug: http://b/24166967
Change-Id: Iaa208933885375da4a8e1b8935f76e9f3ea0647f
Instead of using recursive make to change the HOST_OS when building the
windows SDK under linux, add the concept of cross-building to another
host os.
Bug: 23566667
Change-Id: I6dc525b601b6251d458d197c30bf4660d7485502
With USE_GOMA, the path to gomacc in $GOMA_DIR or $HOME/goma
will be appended to CC_WRAPPER and CXX_WRAPPER.
Note this works only with USE_NINJA. Unlike ninja, GNU make
cannot change the parallelism depending on targets. Specifying
-j500 to GNU make would mean you may run 500 local jobs in
parallel, but with -j32 goma will just slow down the build.
Change-Id: I0f571454fd2a5b525ee29b445f7ab8715927ca00