Jarjar doesn't exit with a nonzero return code when there is a syntax
error in a rules file and doesn't write the output file. Without a
nonzero return code ninja prints a warning but continues, which leads
to stale results on incremental builds where the output file already
exists, or delayed errors on clean builds whre the output file didn't
exist.
Delete the output file before running jarjar, and then check if it
exists after running jarjar.
Fixes: 119516143
Test: m out/target/common/obj/JAVA_LIBRARIES/noto-emoji-compat-java_intermediates/classes-jarjar.jar
Change-Id: Ib99167403948ee11f039dd4d2d7e63052bb92136
repack_bootimg is useful to add files into a ramdisk, then repack
a boot.img. Note that mkbootimg, unpack_bootimg, lz4, minigzip, etc.,
that repack_bootimg depends are already in otatools.zip.
Bug: 174443192
Test: `m otatools-package`, unzip $OUT/otatools.zip, export $PATH
with ./otatools/bin and checks unpack_bootimg can run
Change-Id: Id4fbf2076b50522b95ab46dfeb1e2b7115d6606d
target_files.zip passes a list of files to soong_zip in a file list
file, which soong_zip interprets as a glob. Adding a file called "["
causes soong_zip to error with "syntax error in pattern". Use an RSP
file instead, which after I1de7829c668538204fc4a2ac793a4f88dbc886c9
does not interpret entries as globs.
Bug: 179297188
Test: m target-files-package
soong_zip: don't glob RSP file entries
File arguments are considered globs, but RSP file entries should be
considered filenames without globbing. Escape RSP file entries so
they don't get treated as globs later.
Bug: 179297188
Test: zip_test.go
Change-Id: I0736f2d1802114217cba03ee32b67479c9d98da8
builds.
This CL is a nop since the default is still true, but it gives us a way
to toggle it without affecting coverage builds.
Test: env NATIVE_COVERAGE=true build/soong/soong_ui.bash \
--dumpvar-mode SOONG_CONFIG_art_module_source_build
env CLANG_COVERAGE=true build/soong/soong_ui.bash \
--dumpvar-mode SOONG_CONFIG_art_module_source_build
env NATIVE_COVERAGE=true CLANG_COVERAGE=true \
build/soong/soong_ui.bash \
--dumpvar-mode SOONG_CONFIG_art_module_source_build
check that all these print "true" when the default in the "else"
clause is "false".
Bug: 172480615
Change-Id: I648ed911773c59a5b2a117dbf3ddcb2ef338830d
Filter LOCAL_OPTIONAL_USES_LIBRARIES by PRODUCT_PACKAGES. This has the
drawback that some present libraries may be filtered out as well, as the
full list of product packages is unknown until all Android.mk files have
been read.
This CL unblocks <uses-library> fixes for individual apps, which will be
necessary to dexpreopt them in the nearest future when the &-classpath
hack is removed in ART. Apps that are not fixed by then will loose
dexpreopt completely. This fix, although not perfect, lowers the risk of
loosing dexpreopt for many apps. In the future it may be replaced with a
better solution.
Bug: 132357300
Test: lunch aosp_cf_x86_64_phone-userdebug && m && launch_cvd \
adb wait-for-device && adb root && adb logcat \
| grep -E 'ClassLoaderContext [a-z ]+ mismatch'
# empty grep output, no errors
Change-Id: I188cf240259f7a448623450e6a949e0784a21f87
If a module is installed to TARGET_RECOVERY_ROOT_OUT,
then its init rc file (declared in LOCAL_INIT_RC) is installed
to $OUT/recovery/root/system/etc/init instead of
$TARGET(partition)_OUT_ETC/init.
Fixes: 178859897
Test: m snapuserd.recovery
Change-Id: I82d0f40d6d7047e271612204391c5a027f84f52f
This empty file is required to be present.
Test: fvp_mini-eng* builds and boots on FVP
*: with TARGET_ARCH_VARIANT := armv8-a-branchprot
Change-Id: I689033f16663822e263f45ab5e46c9f120c9dca0
Since Make does not visit modules in topological order of their
<uses-library> dependencies, information from dependencies to the
dexpreopted module has to be passed via dexpreopt.config files. A build
rule for a dexpreopt.config file depends on dexpreopt.config files for
<uses-library> dependencies, and dex_preopt_config_merger.py script
extracts the necessary information from dependency configs and patches
the module's config.
Bug: 132357300
Test: lunch aosp_cf_x86_phone-userdebug && m
Change-Id: Id0b71170a4d2ab1d33059de0e9ad9d7e61f2345e
Support building cc modules with different library linking strategies
for apexes, to support different apex strategies pre/post S
Test: m APEX_BUILD_FOR_PRE_S_DEVICES
library_linking_strategy_sample_binary
Bug: 154663937
Change-Id: Ic95ddce5e2b0619adff5b6b8a4e2da0d44df7173
The new variable stores the name of the <uses-library>, if for some
reason it is different than the name of the module for that library
(normally they are the same, but sometimes differ). If the variable is
undefined or defined to an empty string, the name of the <uses-library>
is considered to be the same as the name of its module. It is recorded
in a module's dexpreopt.config file as "ProvidesUsesLibrary" field.
Bug: 132357300
Test: lunch aosp_cf_x86_phone-userdebug && m
Change-Id: Iac1be0fac79a944e4c26867cc58e274b76709da8
For now the subcontexts are always empty. A follow-up change will
actually populate that field from dependencies' dexpreopt.config files.
Bug: 132357300
Test: lunch aosp_cf_x86_phone-userdebug && m
Change-Id: I6cf0e8363dff4b406cb62ba3d76d566dbfec57e7
vendor-ramdisk-debug.cpio.lz4 will be packed into a
vendor_boot-debug.img and usually won't be flashed directly.
Moving it to the intermediate build directory.
Bug: None
Test: make vendorbootimage_debug
Change-Id: I86ea72c7a3484a90286139624408d07ce4bf994c
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
Test: mm -j && mm -j dist, make sure virtual_ab_compression is set to
true in dynamic_partition_info.txt of target_File.zip
Change-Id: Id0d46bd8ed738b2b69a0c01481b7db0c7127f773
When building vendor_boot v4 with multiple vendor ramdisks, pass the
name of each ramdisk to mkbootimg.
Bug: 177882072
Test: Modify a device BoardConfig and verify the built vendor_boot.img
with unpack_bootimg
Change-Id: I679d277aa88f1e10678d2f74b579e4140536e267
Commit I56dda56bab7def1540f4fb506323e3e605620cd4 adds
BOARD_MOVE_RECOVERY_RESOURCES_TO_VENDOR_BOOT and includes
$(TARGET_RECOVERY_ROOT_OUT) directory when building vendor
ramdisk if BOARD_MOVE_RECOVERY_RESOURCES_TO_VENDOR_BOOT is set.
We should do the same thing when building the vendor debug
ramdisk as well. Otherwise, lacking some recovery files
makes the device unable to boot into fastbootd/recovery mode.
Bug: 177712689
Test: `make vendorbootimage_debug`, then unpack
./obj/PACKAGING/vendor-boot-debug_intermediates/vendor-ramdisk-debug.cpio.lz4
to check it includes recovery resources via:
`lz4 -d -c ../vendor-ramdisk-debug.cpio.lz4 | cpio -idm`
Test: device can boot into fastbootd after flashing vendor_boot-debug.img
Change-Id: I4744c6600866436ed7d5a321e67e20b8f3da8a81
By enabling these hiddenapi CSV files to be prebuilt, it
becomes possible to create a split build that supports
the hiddenapi encode dex step, but doesn't contain all
of the java sources needed to generate the CSV files.
Bug: 175048716
Test: m nothing
Test: new TestHiddenAPISingletonWithPrebuiltCsvFile
Test: local build without prebuilt hiddenapi
Test: local build with prebuilt hiddenapi
Change-Id: Ia38c5016d2aeba54aa537a5ce601898d46330730
New clang compiler enables unsigned-shift-base as part of
integer sanitizers. But it makes some daemons crash at
libc++.
Bug: 177566116
Test: build.
Change-Id: I6d64fa5002b6035be4d960441eb5176c97152af9