This fixes the tradefed build error caused by aosp/2582191.
Bug: 280440941
Test: `BUILD_BROKEN_DISABLE_BAZEL=true m dist` on tradefed branch.
Change-Id: I34c9fea0a5f7110c9b2bda1986df82afa3eafc79
This reverts commit ae7f543b7c.
Reason for revert: Enabling dexpreopt for RISC-V (there is still no
compiler support, but dex2oat runs in verification mode and does
not attempt any compilation with https://r.android.com/2510739).
Change-Id: I0a6d0416bec51131f0a54c7ff5b0e194728452b1
dex2oat isn't supported for riscv64 yet, disable dexpreopt. For
aosp_riscv64-user and -userdebug builds it is also necessary to
relax the requirement that dexpreopt is enabled.
Test: lunch aosp_riscv64-userdebug && m
Change-Id: I3b66304cedf55f734f8aa1d3ad3ed594a7b9a122
This reverts commit e325f61525.
Reason for revert: DroidMonitor-triggered revert due to breakage in some branches.
Bug: 270958097
Change-Id: I2c3bb568c7f3b0dc7a364ea74b91574966102ff3
dex2oat isn't supported for riscv64 yet, disable dexpreopt. For
aosp_riscv64-user and -userdebug builds it is also necessary to
relax the requirement that dexpreopt is enabled.
Test: trehugger
Change-Id: Ib84f1b40675783d286f4ff89d3c1daa9c7be710a
This is determined by:
- a product config flag
- the vendor API level
It is then passed to the device as a system property
"ro.dalvik.vm.enable_uffd_gc".
This change is a no-op change. It doesn't enable userfaultfd GC by
default. OVERRIDE_ENABLE_UFFD_GC=default can be passed to the build
system to enable userfaultfd GC for testing purposes.
Bug: 242553398
Test: -
1. lunch aosp_redfin-userdebug
2. OVERRIDE_ENABLE_UFFD_GC=default build/soong/soong_ui.bash --dumpvars-mode --vars=ENABLE_UFFD_GC
3. See "false" in the output
Test: -
1. lunch aosp_oriole-userdebug
2. OVERRIDE_ENABLE_UFFD_GC=default build/soong/soong_ui.bash --dumpvars-mode --vars=ENABLE_UFFD_GC
3. See "true" in the output
Test: -
1. lunch aosp_redfin-userdebug
2. OVERRIDE_ENABLE_UFFD_GC=true build/soong/soong_ui.bash --dumpvars-mode --vars=ENABLE_UFFD_GC
3. See "true" in the output
Test: -
1. lunch aosp_oriole-userdebug
2. OVERRIDE_ENABLE_UFFD_GC=false build/soong/soong_ui.bash --dumpvars-mode --vars=ENABLE_UFFD_GC
3. See "false" in the output
Change-Id: Ifd6e6cddb502315912ff949619a5b526ae0d73ff
This is the list of jars that system_server loads dynamically using
separate classloaders. We will rely on this variable to decide which
jars to preopt in the build system and on the device for system_server.
The list is supposed to be in sync with the code in SystemServer.java.
There will be a follow-up CL to add a comment in SystemServer.java to
remind developers to keep them in sync.
Bug: 203198541
Test: m nothing
Change-Id: I305a73218ef2d2c61ac3795d21026b2afe7007fd
Regardless of an "updatable" property, list all apex jars in the same
variable. This is less confusing for devs and matches the pattern with
PRODUCT_APEX_BOOT_JARS.
Bug: 191127295
Test: atest CtsClasspathsTestCases
Change-Id: I3b12f26237636f4271cb000480928b3ce1c2e62f
Merged-In: I3b12f26237636f4271cb000480928b3ce1c2e62f
Note that ART apex boot jars and core-icu4j are exceptions here as they
are not part of ApexBootJars. ART apex boot jars are defined in their
own variable, while core-icu4j is treated as a regular non-updatable
boot jar.
Bug: 191127295
Test: atest CtsClasspathsTestCases
Change-Id: I5f5feb7344941d0154f384e3c06279d49b490768
Regardless of an "updatable" property of individual, list all apex boot
jars in the same variable. This is less confusing for devs, especially
since they shouldn't care about things like boot images.
Bug: 191127295
Test: atest CtsClasspathsTestCases
Change-Id: I0a559db462d1e1f67003ac54d1e27a89110d802a
Merged-In: I0a559db462d1e1f67003ac54d1e27a89110d802a
When constructing the dexpreopt config it will strip out any entries in
ART_APEX_JARS which are not present in PRODUCT_BOOT_JARS and store the
remainder in ArtApexJars.
Bug: 185391652
Test: lunch sdk_phone_x86_vendor && m nothing
lunch sdk_phone_x86 && m nothing
Change-Id: I403ef9768a8ac2d222bbd6cfd0a68a2019f67c16
For now the config is always set to false (updatable boot jars are
excluded), but this may change in the future.
Bug: 178467404
Test: lunch aosp_cf_x86_64_phone-userdebug && m
Change-Id: I1b45a89748e065a29130efbf8b54dddfae69e48b
If set to true, it disables <uses-library> checks for a product. It is
possible to override with environment variable RELAX_USES_LIBRARY_CHECK
on the command-line.
Per product configuration is needed rather than per board configuration
(such as BUILD_BROKEN_* variables) because of the specifics of
<uses-library> checks: they depend on the product packages list, and
not on the board config.
One example of a product family that needs to disable the checks are
the SDK builds (e.g. sdk_gphone_x86_64), see b/183339664.
Bug: 183339664
Bug: 132357300
Test: treehugger
Change-Id: Ia58559e4e70163da94e9eb7b8a6133e0cbecd459
The new mode is enabled with environment variable
RELAX_USES_LIBRARY_CHECK. If the variable is set to true, then a
verify_uses_libraries check failure does not fail the build, instead it
sets a special compiler filter "extract" for dexpreopt, which means that
the DEX file will be extracted, but it won't be compiled to native code.
Class loader context will be set to empty in this case (not &, as it is
going to be deprecated soon).
If the variable RELAX_USES_LIBRARY_CHECK is unset or set to something
other than "true", then the old behaviour of the verify_uses_libraries
check is preserved.
The intended use case for this flag is to have a smoother migration path
for the Java modules that need to add <uses-library> information in
the build files. The flag allows to quickly silence build errors. This
flag should be used with caution and only as a temporary measure, as it
masks real errors and affects performance.
verify_uses_libraries check is reworked so that it writes the error
message to a status file (which is used instead of the former timestamp
file). Currently the stored error message is not used, but it may be
used later to produce a warning. Dexpreopt command checks if the status
file exists and is nonempty; if that is the case, then compiler filter
is set to "extract".
Bug: 132357300
Test: Manually add some mismatch between the libraries in the Android.bp
and Android.mk files for dexpreopted apps, build with
RELAX_USES_LIBRARY_CHECK=true and obsserve that the build doesn't
fail and they are compiled with compiler-filter "extract".
Unset RELAX_USES_LIBRARY_CHECK and observe that the build fails.
Change-Id: Ie1a6298c4dba2f368ca9ac8b9fee2de0a26e68e8
Bug: 176171716
Test: build_mainline_modules.sh and ensure that the ART boot image is
built: `find out -type f -name '*.art'` is nonempty for every arch.
Change-Id: I5163ebe1f8db3d4d921bab0f83cd388ba29419ec
Bug: 177214554
Test: lunch cf_x86_phone-userdebug && m
Test: Ensure that `find out -name dexpreopt.config` lists before and
after the fix are identical (for target cf_x86_phone-userdebug).
Test: TARGET_PRODUCT=mainline_modules_x86_64 \
TARGET_BUILD_VARIANT=userdebug \
build/soong/soong_ui.bash --make-mode UipbUtil
Change-Id: I28b38c08ad570d53dc679f9b42975545d457416e
Not setting TARGET_ARCH is ok if TARGET_ARCH_SUITE is set instead. Skip
certain TARGET_ARCH-specific steps of the config:
- don't run the 'select' steps to figure out cpu flags
- don't generate dexopt config for TARGET_ARCH
Bug: 174315599
Test: lunch <product that sets TARGET_ARCH_SUITE but not TARGET_ARCH>
Change-Id: I74a9e71d0cc5c7f74d3b10b1c8bb89682c096d7c
Instead of TARGET_BUILD_APPS, introduce DISABLE_PREOPT,
which is true when TARGET_BUILD_UNBUNDLED_IMAGE or TARGET_BUILD_APPS is set.
Test: TARGET_BUILD_UNBUNDLED_IMAGE=true m vendorimage and then
check if there is no preopt
Bug: 160390776
Change-Id: Id27030e602a29ebd438678270db13744dd145143
Properties for <partition>/build.prop are now added via
PRODUCT_<PARTITION>_PROPERTIES.
PRODUCT_SYSTEM_PROPERTIES is added. PRODUCT_SYSTEM_DEFAULT_PROPERTIES
will be deprecated.
PRODUCT_VENDOR_PROPERTIES is added. PRODUCT_PROPERTY_OVERRIDES and
PRODUCT_DEFAULT_PROPERTY_OVERRIDES will be deprecated in favor of the new
variable.
For other partitions (odm, system_ext, product), there is no change.
Exempt-From-Owner-Approval: cherry-pick from internal master
Bug: 117892318
Test: m
Merged-In: I98f3b5d0da661b3ad75260a23754e655103b7a44
(cherry picked from commit ad810b6dae)
Change-Id: I98f3b5d0da661b3ad75260a23754e655103b7a44
This moves the condition from Soong to make, so that
config.UnbundledBuild() in Soong no longer implies disabling
dexpreopting.
Test: TH, in particular builds green on ub-launcher3-master
Bug: 157549171
Change-Id: I7273be8591c9d627d89e033b641139dacc275806
If true, incorrect order of system server jars does not cause a build
error. The order is non-optimal if some jar X precedes its dependency Y.
In that case dexpreopt will be unable to resolve any rerefences from X
to Y.
Test: lunch cf_x86_phone-userdebug && m nothing
Test: lunch aosp_car_arm && m nothing
Bug: 140451054
Change-Id: I70efd365fa9fbd9e40792d646f8471d009164924
Merged-In: I70efd365fa9fbd9e40792d646f8471d009164924
(cherry picked from commit 17715b48f0)
These options are not used anymore.
Bug: 119800099
Exempt-From-Owner-Approval: Rebase after conflict
Test: m
Change-Id: I1057a6fc420b45e326ec7744b6df159f950ad853
They are now created from Soong, and therefore put in a separate config file
out/soong/dexpreopt_soong.config.
Test: m
Bug: 145934348
Change-Id: I27e710f09c37e64e8975b8e763d13434e5de71b3
Migrate PRODUCT_UPDATABLE_BOOT_MODULES &
PRODUCT_UPDATABLE_BOOT_LOCATIONS to a new PRODUCT_UPDATABLE_BOOT_JARS.
This new variable uses the same format as
PRODUCT_UPDATABLE_SYSTEM_SERVER_JARS, i.e <apex>:<jar> pair.
Test: Compiles & flashed device. Ensured that the bootclasspath & system_server class
paths remain the same.
Change-Id: I1cb26d5ec825cd1f5282a6e0255094ddf2fe046a
Allow system_server jars delivered via apex. Regular system_server
jars are located in /system/framework folder. But, jars delivered via
apex are mounted at /apex/<module_name>/javalib. Also, not all the
libraries in /apex/<module_name>/javalib will be a system_server jar,
so adding a mechanism to list out the jar file explicitly within the
apex module.
Bug: 144722612
Bug: 141785760
Test: Compiles (both with empty & non-empty PRODUCT_SYSTEM_SERVER_APEX_JARS
value set)
Change-Id: Ia181ab22fdf2da575bfd532c1cd90a2f54742528
Dexpreopt build commands should only be generated on targets that
include build/make/target/product/runtime_libart.mk, which sets the
necessary variables such as PRODUCT_SYSTEM_DEFAULT_PROPERTIES that
contain default values passed to dex2oat. This file also sets a
variable PRODUCT_USES_DEFAULT_ART_CONFIG that is used in
build/make/core/dex_preopt.mk to decide if boot images should be
installed.
On some targets build/make/target/product/runtime_libart.mk is not
included. Prior to this patch, on such targets invalid dexpreopt
commands were generated, but not used, so they did not cause any
visible build failures. The invalid commands can be grepped as:
lunch qemu_trusty_arm64-userdebug && m nothing \
&& fgrep -e '-Xms ' $ANDROID_BUILD_TOP/out/soong/build.ninja
In this case '-Xms ' is an ill-formed option passed to dex2oat (the
option expects one argument, but none is passed).
This patch makes the DisablePreopt variable passed from make to
soong more strict: it not only requires WITH_DEXPREOPT, but also
PRODUCT_USES_DEFAULT_ART_CONFIG. This means that dexpreopt commands
will not be generated on targets that do not include
build/make/target/product/runtime_libart.mk.
Test: lunch aosp_walleye-userdebug && m \
&& find $ANDROID_BUILD_TOP/out -name 'boot.art'
# expect to find files in /out/target/product/walleye/system/framework/$ARCH/
Test: lunch qemu_trusty_arm64-userdebug && m \
&& fgrep -e '-Xms ' $ANDROID_BUILD_TOP/out/soong/build.ninja
# expect empty output
Change-Id: I3d765ed0dd8b38236b8bdd5c6202bb1d3f45f904
Stripping is incompatible with ART module updatability.
Bug: 65154345
Bug: 138851227
Test: build and observe no change in output (stripping is not used by
default).
Change-Id: Ic2d9738ef393814c3af3cad116071f7b5938aa84
dexpreopt usually gets a dex jar instead of the final APK, which
means targetSdkVersion can't be parsed out of it. Move the
shared library verification to a tool that operates on the final
AndroidManifest.xml instead. verify_uses_libraries.sh is still
used to verify prebuilts where we don't have an AndroidManifest.xml
and must parse it out of the APK.
Test: m Gallery2
Bug: 132357300
Change-Id: I6ade74b6144c73aee094f5d5ff343067ca0a0e5a
Move the dexpreopt.config passed to Soong to out/soong/dexpreopt.config
and let it write a new copy in a rule and pass the path back to make
as DEX_PREOPT_CONFIG_FOR_MAKE.
Bug: 132379813
Test: m checkbuild
Change-Id: Iac29beac3af8864d36d1563ce42bed11b685548d
For enabling per product configuration of resolving startup
const strings.
Bug: 130217075
Bug: 131310042
Test: make
(cherry picked from commit b37c79c3a2)
Merged-In: I51cb8931b915a710ab584f954b7a99c7a651d914
Change-Id: I0ecc7823620bca9f252b3d91b82982db91dd248d