This CL topic breaks the single flag value EXPERIMENTAL_USE_OPENJDK9
into two flags USE_OPENJDK9 and TARGET_OPENJDK9 which are computed
independently in config.mk and config.go; this means that later
build logic no longer depends on / duplicates the semantics of an
unset EXPERIMENTAL_USE_OPENJDK9, because that later build logic
can use USE_OPENJDK9 and TARGET_OPENJDK9 instead. Thus, it becomes
slightly easier to change this default in future CLs (touching
only config.mk and config.go).
It also makes it more straightforward to convert .mk files
to .bp.
This CL also introduces a new allowed value "false" for
EXPERIMENTAL_USE_OPENJDK9. This fourth possible value currently
has the same semantics as a default/unset
EXPERIMENTAL_USE_OPENJDK9, but allows people to explicitly
switch back to the old semantics when the default changes.
Test: make showcommands core-oj (in environments with
EXPERIMENTAL_USE_OPENJDK9 set to "", "1.8", and "true").
Bug: 38177295
Change-Id: Iaade9610b237722e5d175143808b8653b1e98996
Instead of building R8 from external/r8 use the prebuild jar in
prebuilds/r8.
Test: m -j USE_R8=true
Change-Id: I9680ae430cdbc2b3beb910873c8eed27354f6af1
Proguard doesn't support v53 class files. For now, this
CL simply replaces the Proguard step with a plain 'cp',
which is essentially a no-op.
To avoid apps exceeding the dex limit in this mode, this
CL also enables --multi-dex for those builds.
Test: Treehugger
Bug: 67673860
Change-Id: I17dc5d827360d606a0cac12e324f97e8dedbb630
This reverts commit 3d3e1cf260.
Rationale: part of a group of commits that left aosp_x86_64 not
building. (See https://android-build.googleplex.com/builds/
submitted/4426589/aosp_x86_64-eng/latest/logs/build_error.log)
Bug: 30227045
Test: builds
Change-Id: Ie22590abe3d1cdccb8d141baf6480d49dedf8789
This CL makes the following changes:
(a) It disables diagnostics for CFI which requires the runtime ubsan
library (which isn't included in static executables).
(b) It applies the ar flags for CFI correctly for nested .a
archives.
(c) Applies the version script to export CFI shadow for non-static
binaries
(d) Doesn't apply cross-dso CFI for static executables
Bug: 30227045
Test: Static executables build correctly and do not complain about
missing symbols from the ubsan runtime library.
Test: Nested .a files correctly use the gold plugin.
Change-Id: Id8fe3c13f6b76565aafbf1266e95f50d1447a790
Desugar default methods if requested by LOCAL_MIN_SDK_VERSION < 26.
Also remove --desugar_try_with_resources_if_needed=false, it is no
longer necessary if we always proguard against frameworks.jar.
Fixes d8 issues when it sees unexpected default methods that dx
was passing through.
This reapplies I81796b452d5a70a951e175727953d4295ca32c0c after
If30943efcaea44b2db1b38a6c1d558113324757f.
Test: m checkbuild
Change-Id: I3bafbb2d63de2a6b50bc8c7ff40259b54d24f128
When LOCAL_SDK_VERSION is not set, frameworks.jar is put
in the classpath for javac. If it is also in the classpath
(as opposed to the bootclasspath) for desugar then desugar
tries to rewrite classes that implement interfaces with
default methods to contain calls to the generated companion
classes for those interfaces. frameworks.jar will not
contain the companion classes, which causes proguard to
fail.
Move frameworks.jar to the bootclasspath, which matches more
closely with builds against the SDK stubs jars.
Also remove the static libraries from the classpath, they have
already been merged into the input jar.
Test: m checkbuild
Change-Id: If30943efcaea44b2db1b38a6c1d558113324757f
Desugar default methods if requested by LOCAL_MIN_SDK_VERSION < 26.
Also remove --desugar_try_with_resources_if_needed=false, it is no
longer necessary if we always proguard against frameworks.jar.
Fixes d8 issues when it sees unexpected default methods that dx
was passing through.
Test: m checkbuild
Change-Id: I81796b452d5a70a951e175727953d4295ca32c0c
With this change building with USE_R8=true will run R8 instead of Proguard + dx
for all targets that have LOCAL_PROGUARD_ENABLED set. R8 (through the
compatproguard wrapper) will use the same options as Proguard for now.
Additional Proguard configurations for R8 can be added using LOCAL_R8_FLAG_FILES
on individual targets. This makes it possible to make configuration updates
without touching the Proguard + dx configuration
Test: m -j
Test: m -j USE_D8=true USE_R8=true
Test: m -j USE_D8=true USE_R8=false
Test: m -j USE_D8=true
Change-Id: I78e8a0fd17cc5cefedccffe95b93c94a60a727f1
When building the recovery image on marlin (m bootimage):
----- Making recovery image ------
Copying baseline ramdisk...
Modifying ramdisk contents...
/bin/bash: line 0: [: 0x02000000: integer expression expected
----- Made recovery image: out/target/product/marlin/boot.img --------
Because if -gt doesn't like hexadecimal numbers. Fix the issue by doing
a dummy arithmetic to get integer $$maxsize.
Test: `m bootimage` with aosp_marlin-userdebug. Also change the
BOARD_BOOTIMAGE_PARTITION_SIZE closer to the actual size to
trigger the different size check paths.
Change-Id: I75c7727664d7255b9c18f57ae38076ff90b8a957
Soong has support for building system modules. Use the directories
produced by Soong with --system to replace -bootclasspath arguments
when using javac -target 1.9.
Since soong can't generate current SDK stubs yet, and no existing
SDK stubs need -target, only use -target 1.9 for modules that are
not compiling against the SDK. That means in practice the only
system modules that will be used for now is the default one,
core-system-modules.
Bug: 63986449
Test: m -j EXPERIMENTAL_USE_OPENJDK9=true makes some progress
Change-Id: I350ef50aedf36fdd72458c23d4fe8a2edf1a9a02
JAVAC_WRAPPER seems not be used when SOONG_JAVAC_WRAPPER is used.
Since JAVAC_WRAPPER just wraps actual javac call, the result must
be the same.
Bug: 67723445
Change-Id: I944f9534587c00ffd1bc79806c534432467ba4a5
This wasn't initializing the STATS.MODULE_TYPE.* variables, leading to
106kB of stack usage in ckati for sdk_x86_64-eng. With this fixed, the
next highest stack usage is 35kB.
Bug: 36182021
Test: Run $(flavor) over all the variables
Test: Check stack usage with custom ckati patches
Test: build-sdk_x86_64.ninja is identical before/after this change
Change-Id: Id1d8ffb8415ad6613d0093d31be5472d42d300fd
Combining $(call dexpreopt-remove-classes.dex) into a
$(call copy-one-file) rule is hacky and error prone. Make a helper
dexpreopt-copy-jar function that takes LOCAL_DEX_PREOPT and copies
the jar, removing the dex files if necessary.
Test: only description message changes to out/build-${TARGET_PRODUCT}.ninja
Change-Id: Id2fa2d18571ca01bc81302c912b8de25f3dde7a1
Those dependencies are jars/apks on which we want to
uncompress their dexs.
bug: 30972906
bug: 63920015
Test: sailfish build
Change-Id: Ic96ffe9dbe39abc1c28e7de134892d689207c9ca
When checking *.img size with the partition size, the build system
reserves additional bits for spare bits and spare bad blocks.
However, for emmc and ufs, the space bits and blocks are entirely
managed by the underlying controller and thus not visible from outside
of the controller. In fact the check routine was made for legacy MTD
storages where raw flash blocks are directly exposed.
This makes the size checking a little bit conservative in modern devices.
Builds were failed even though the *.img can actually fit into the
partition. To handle this problem, the additional size is no longer
reserved when checking *.img size with the partition size.
This change also removes following build flags that are meaningful
only for devices having MTD storages:
BOARD_NAND_PAGE_SIZE
BOARD_NAND_SPARE_SIZE
Further use of them breaks the build
Bug: 35790399
Bug: 66399382
Test: build
Merged-In: I954bf261441b53844e75d05788866f1692a2ad43
Change-Id: I954bf261441b53844e75d05788866f1692a2ad43
If a resource was moved / removed without any other timestamp updates,
ninja would not re-run aapt. To fix this, add a list of resource files
into the same command as aapt (echo ... >/dev/null). That way if the
list changes, ninja will recognize the command line changing and rerun
aapt.
Bug: 67315436
Test: mmma cts/tests/autofillservice
Test: mv cts/tests/autofillservice/res/layout/welcome_activity.xml \
cts/tests/autofillservice/res/layout/welcome_activity_test.xml
Test: mmma cts/tests/autofillservice
Change-Id: Ia93ac4ff48910fed74a1f1539ce4e1f5a9db023f
Remove all support for running jack.
Bug: 65302138
Test: m -j checkbuild
Change-Id: I1ef87c88af3f2689f8b0dcf1a01c958b16159631
Merged-In: I1ef87c88af3f2689f8b0dcf1a01c958b16159631
(cherry picked from commit 5db5d31d73)
Make R.stamp actually part of the same rule that creates R.java.
Otherwise if the generated sources directory is removed, we don't
regenerate R.java / Manifest.java.
Also move the package-export.apk and proguard options file into the same
rule.
Test: m telephony-common; rm out/target/common/obj/*/*_intermediates/src; m telephony-common
Change-Id: I71f6fcaf20593ca23271d52d15537aaa9ef4cc77
Follow Jack's behavior for now and pass LOCAL_MIN_SDK_VERSION to
dx. Don't pass it to desugar for now, desugar with low
--min_sdk_version numbers enables features we haven't verified
yet, and existing apps won't be using the new language features
that require extra desugaring.
Test: examine classes.dex from an app with LOCAL_MIN_SDK_VERSION
Change-Id: Ic7d679b1b11fba98a33418a4f79d4762a91f1f9c
m -j TURBINE_ENABLED=false will build without turbine. This is
primarily useful for A/B comparisions of turbine builds, but will
also be used to temporarily disable turbine for unbundled builds
until we have turbine prebuilts.
Bug: 64308460
Test: m -j TURBINE_ENABLED=false java
Test: m -j java
Change-Id: Ie48746c8bfc60c361be9634cb1805ca1c09aa1fe
Simplify the java-lib-* type functions, three layers of abstraction
is a bit much for a single line function, and isn't reducing enough
duplication to be worth the complexity.
Add app-lib-* functions and use them.
Test: m -j checkbuild
Change-Id: Ia47ebc95e4af2073396233416f14fdee7d856844
The bootclasspath libraries have direct dependencies now, so
remove them from LOCAL_JAVA_LIBRARIES so they don't also end
up in the classpath.
Test: m -j checkbuild
Test: m -j ANDROID_COMPILE_WITH_JACK=true java
Test: manually inspection of build-${TARGET_PRODUCT}.ninja
only has expected changes
Test: no changes to system.img
Change-Id: Icbc8987468f237aa351708b33c3abe5ea3d1816e
The libraries in the bootclasspath were getting their dependencies
because they were also in the default libraries list. Make the
dependencies explicit in preparation for rearranging the default
libraries.
Test: m -j checkbuild
Change-Id: I3ea004714a31cd648ec2ef57ed3099bce70bc6b9
- ndk/r10 is removed, we need to use SOONG ndk stubs instead.
- Use MIN_SUPPORTED_SDK_VERSION instead of hard coded version 9 for
32 bit compilation.
Bug: 38342163
Test: mm
Test: make -j40 FORCE_BUILD_RS_COMPAT=true RSTest_Compat
Change-Id: I9549446cb7f8faee8842b06f096d035535dc7f3d
Mac java build has flaky error for merge_zips. The error happend is
because both turbine.jar.premerged and static_java_libs are missing.
We allow one of them can be missing, but we don't allow both of them are
missing. So re-org the merge_zips logic to see if the input of Turbine is
empty or it is due to Turbine internal.
Bug: b/66441248
Test: m clean && m -j32
Change-Id: I3c4b15004fd67fef2b83eabc36841bc8c8ff6e4c
By doing this, the change of private_manifest file won't trigger
Javac to re-run during re-build.
Bug: b/65455145
Test: m clean && m -j32
Change-Id: Ib90d56daf0be5f31b51e07b7714a933bc5cf4496
1. Use merge_zips to merge jars without unzipping/rezipping static Java
libraries. And seperate merging process as a independent Make target so
that Javac can only depend on Turbine.
2. Remove duplicate vars: "full_java_lib_deps" in droiddoc.mk
3. Also use classes-header.jar for link_apk & link_instr
Bug: b/65455145
Test: m clean && m -j32
Change-Id: I7b0307664a6b86075c983284fce099bd3946318c
bug: 30972906
bug: 63920015
Test: doing zipinfo on the produced apks after build.
Test: fugu build
This reverts commit f69441b76b.
Change-Id: I6b029f2044385f3e3fa332091a9244cec79d2474
Broke Fugu build. Will work on a workaround for it.
bug: 30972906
bug: 63920015
This reverts commit 09dfe6739a.
Change-Id: I5a8b8de4ec98ae44808762ca1ba974ce89bebb05