Building a static library for the NDK only requires that the NDK
headers be available. Currently, A module with both
`static_ndk_lib: true` and `sdk_version: something` will have a cyclic
dependency since it both needs the NDK and is in the NDK. Create two
NDK timestamp files: one for the isolated parts of the NDK (headers
and stub libraries), and another for the full sysroot with the static
libraries.
Test: set static_ndk_lib on compiler-rt-extras, make ndk
Bug: None
Change-Id: Iab50ffa0e4cbf4cd164f376e15281030c7aad984
Add support for all-aidl-files-under, all-Iaidl-files-under,
and all-logtags-files-under to android.mk
Test: manual
Change-Id: I5e187e0c5f9d1c63c8632f84ab47665ba85a5678
Allow apps to specify that they should be installed in priv-app,
and export the value to Make which normally handles installation.
Test: m checkbuild
Change-Id: I79a05e7bb6ec0df5c31429e2f4592c6fd57dab70
All of the properties for Make were inside an incorrect
export_package_resources check, which only worked because
the only app so far was framework-res, which had the
property set.
Test: m checkbuild
Change-Id: Idd9be1f497c31b2bd38fee0a83bb4756c6e94305
A llndk_headers module was double defined; one as a header lib and the
other as a static lib. Since llndk_headers is a header lib, the static
lib is now deleted.
Bug: 70617292
Test: build. (TestLlndkHeaders added)
Change-Id: I1a3e9d1a73616ea4faf03664a7a4b03bd5955629
This (possibly arch-specific) property adds extra flags while building
for profiling. For example, dex2oat requires setting
'-Wno-frame-larger-than' when instrumentation is enabled.
Test: Build 'pgo' module with the new property and inspect build.ninja
Change-Id: Ia36422a400b0e0b87cbb33b1c8e565569475a56d
If PLATFORM_VNDK_VERSION has a version $VER other than "current",
install current VNDK libs to /system/lib[64]/vndk[-sp]-$VER.
Otherwise, they will be installed to /system/lib[64]/vndk[-sp].
Bug: 69883025
Test: device boot
Change-Id: Ifa8564f39687dab5b407bf2178b13022625a94f3
Propagation of LTO flags from a main binary or library to its static
dependencies is necessary so that objects being linked with LTO are built as
bitcode rather than native objects. This propagation was broken when thin LTO
was added to the build system. This patch propagates the LTO mode (thin or full)
down to object and archive dependencies.
Test: Build libhwui with full and thin LTO and check that intermediate objects
are LLVM bitcode.
Change-Id: Ic57a80d75052d86940db076fbc0f5375a79c89a1
Add a rule in soong that re-executes soong_build in order to
generate build documentation. This allows Soong to customize
the documentation.
Bug: 70516282
Test: m soong_docs
Change-Id: If143cfacd6ac20274cd7bb8d8fab0c07025a5553
Make the currently-unused SingletonContext.Rule match
ModuleContext.Rule and take a blueprint.RuleParams instead
of an android.RuleParams, and delete android.RuleParams.
Test: m checkbuild
Change-Id: I018685a3dc13f60825b5ba383ef365df2bc98dfc
Add an option to use D8's desugar instead of the standalone version.
USE_D8_DESUGAR=true m would trigger DCHECK in dex2oat unless
https://android-review.googlesource.com/c/platform/art/+/562595 is
patched in as well.
Bug: 69329508
Test: m && USE_D8_DESUGAR=false m
Change-Id: I864d88e257a2ba0b7f19aa5cced537301950e963
Bug: 70387174
Test: Put this text into an Android.bp:
genrule {
name: "test_genrule",
tool_files: ["foo"],
out: ["foo.c"],
cmd: "for i in a b c; do echo $$i; done > $(out)",
}
cc_library {
name: "libtest_genrule",
srcs: [":test_genrule"],
}
and then run `m -j libtest_genrule`. Although the library
shouldn't compile, check that it produces a foo.c that has
"a\nb\n\c\n" and not "\n\n\n".
Change-Id: I139106479439c9b3a95f1a2ecc23e73570d7bd59
Also allow commands with no tools for the case when standard
shell utilities are used to munge an input file.
Test: m checkbuild
Change-Id: Ie061e90cafe1a0a0db004a89e9a17fb48709cb03
On large branches (250+ configurations), the open file count can go
over the default 1024 soft limit on Ubuntu. Many systems have increased
that default, but for the ones that haven't, at least opt into the
hard limit until this can be refactored to use fewer open files.
Bug: 70370883
Test: prlimit -n256:4096 build/soong/build_test.bash -only-config
Test: ulimit -Sn 256; build/soong/build_test.bash -only-config (darwin)
Change-Id: I7a952ffc89a0149ab65b04db1523d348daa6ab3e
After this revert CL topic, the default toolchain for Android
goes back to being OpenJDK 8.
This revert is being prepared ahead of time in case of
any problems with CL topic:
https://r.android.com/#/q/topic:bug69449021_attempt2
Bug: 69449021
Test: Treehugger
Change-Id: I9ead8d569226bd487baee3c6d5be9ec7033eb56a
(This is cherry-picked from the first attempt to submit this CL
topic, which was reverted after 3 hours because of bug 70286093;
robolectric 3.{1.1,4.2} now stick with OpenJDK 8 to avoid that bug).
Before this CL topic, the build toolchain for .java source files
used OpenJDK 8, targeting 1.8 (v52 class files) by default.
This CL topic switches the default to OpenJDK 9, but still
targeting 1.8 (v52 class files) by default. If USE_ERROR_PRONE
is set to true, then the default remains OpenJDK 8.
Code in the Android platform should generally be unaffected,
but if host tools that are now compiled and run using
OpenJDK 9 are causing problems for your team, then let me
know.
To manually switch back to the old behavior for now (continue
using OpenJDK 8), run this command in your shell:
export EXPERIMENTAL_USE_OPENJDK9=false
Bug: 69449021
Test: Treehugger
Test: Running robolectric tests succeeds on internal-master
after cherry-picking this CL topic, using the command
line from http://b/70286093#comment1
(cherry picked from commit 0ae8b548af)
Change-Id: Ide6a7e55126d919a44f89ef8e0bd14fb12ff470e
tool_files can be used to add dependencies on files used by tools,
so let it support globs.
Test: m checkbuild
Change-Id: I1c1cb098190e1bb1c81292f6eb0c4ed0e240c1e1
These variables are published by config.go for use inside
.mk scripts. They are suitable for rules that need to be
pinned to a particular java/javac version because they do
not (yet) support the other.
Bug: 70286093
Test: Treehugger
Change-Id: Id407fca187fdf6c1947fc9d1ed7cd634fe089384
Merged-In: Id407fca187fdf6c1947fc9d1ed7cd634fe089384
Logtags files in cc and java are treated fundamentally differently.
In cc, they are not used for compiling at all, but need to be passed
to Make to be combined into the global logtags list, and logtag files
are listed in a logtags property. In java they are listed in srcs
and produce generated code that is compiled in, and so shouldn't
also need to be listed in a logtags property.
Move the logtags property to cc and export it to Make from there,
and have java extract logtags files from srcs to be exported to
Make.
Test: m checkbuild
Change-Id: I31d49289efe72db60d2f33566df771b4a3ebc8a0
to enable other subprojects to use their own instance of
Blueprint in other directories.
Files named Android.bp are still autodetected throughout the
tree like previously.
Bug: 64363847
Test: mkdir -p subdir \
&& echo "syntax error" > Blueprints \
&& m -j nothing
Test: build/soong/scripts/diff_build_graphs.sh \
--products=aosp_arm \
'build/soong:work^' 'build/soong:work'
Change-Id: I8199f12b68dc1699bf44682b86169def37b53a5e