- For .l/.y source files, generate .c files; for .ll/.yy source files,
generate c++ files.
- Simplified the rules by adding the generated sources to
my_generated_sources.
- Simplified generated header file naming by always using .h extension
with bison's "--defines=" option.
- Removed the unnecesarry conditional inclusion to the generated
headers. Bison already automatically generates such things.
Bug: 26492989
Change-Id: I9ab6dc149c258f7642bc36c3fa32f90ff7ee51a4
With some core classes moved to separate core-oj jar
we need to use the new jar.
(cherry picked from commit 89b94c827f)
Change-Id: I025c0adc70535bf23def3ab0ce28a1bfaef72514
Reorder the definitions of the core cflags so that we can prevent device
configurations from changing the global C(PP)FLAGS.
There is no reason for devices to be configuring the global cflags -- if
something needs to change for a particular device, that flag should be
defined in the BoardConfig.mk, then used in the individual makefiles
where it is needed. The common global flags also affected host tools,
which should not change between device configurations.
Bug: 26165350
Change-Id: Icece4505ce3d2a9168087d802953378534018d47
The .dex.toc files are created by dexdump, which outputs all
information in a .dex file which may affect compilation of
other modules.
For prebuilt java libraries and static java libraries, we'll
output empty .toc files and don't set restat=1. .dex.toc files
are necessary even for static java libraries because they can
be referenced by LOCAL_JAVA_LIBRARIES (instead of
LOCAL_STATIC_JAVA_LIBRARIES).
We don't use this optimization for apps build. We cannot build
dexdump for apps build due to lack of libc++.
Performance:
$ m && touch \
frameworks/base/core/java/com/google/android/util/Procedure.java \
&& time m
Before: 3m48s
After: 1m46s
Bug: 24597504
Change-Id: Id1665923b414dee705dc60af4c021390a19ea26f
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
AIDL is defined in the sometimes-prebuilt tools section, remove the
extra definition that was overriding it.
Change-Id: I677bf46475fd5fd4a9258c77d91ecee806e5f205
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
am: dbeab8de65
* commit 'dbeab8de6543db1d0393789cb18ee7fd7ed8fedd':
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
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
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
am: 88f5d25be1
* commit '88f5d25be1b0756db65b34114929b4dd0bc5f05c':
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
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
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