Commit graph

25679 commits

Author SHA1 Message Date
Treehugger Robot
a5dcac761f Merge "Turn missing jarjar output files into errors" 2021-02-08 22:00:02 +00:00
Colin Cross
a1271eb343 Turn missing jarjar output files into errors
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
2021-02-08 10:55:05 -08:00
Ioannis Ilkos
8e568c52ab Remove Use_lmkd_stats_log from build
Use_lmkd_stats_log used to control LMKD_LOG_STATS when compiling lmkd.

However, for newer Android releases, we mandate that lmkd informs statsd of process kills (change id I8cb123b9488fbc6e88863c2f0e75f1422bcd282e)
After aosp/1555318 we compile lmkd with statsd by default, so this setting is a noop.

Change-Id: I91bd08198fe2275fb8aca77ae5ea637df360d416
Test: build
Bug: 177985094
2021-02-08 11:17:55 +00:00
Treehugger Robot
bff5273dd0 Merge "Adding repack_bootimg into otatools.zip" 2021-02-06 08:00:55 +00:00
Colin Cross
effaa0414b Merge "Use RSP file for soong_zip in target_files.zip" 2021-02-05 21:33:37 +00:00
Treehugger Robot
530b39afc9 Merge "Add logic to ensure the ART APEXes are built from source in coverage builds." 2021-02-05 13:49:53 +00:00
Ulyana Trafimovich
966928196d Merge "Don't patch build path to DEX jar in dex_preopt_config_merger.py." 2021-02-05 11:10:03 +00:00
Bowgo Tsai
6c37c172c6 Adding repack_bootimg into otatools.zip
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
2021-02-05 18:14:34 +08:00
Bill Yi
250a0420ea Merge "Merge RQ1A.210205.004 to aosp-master - DO NOT MERGE" 2021-02-04 17:08:42 +00:00
Ulya Trafimovich
38cd0624f3 Don't patch build path to DEX jar in dex_preopt_config_merger.py.
The initial path value is correct, there's no need to patch it.

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: Iaa9171e7db348ad469ec56b977b5f2226f353284
2021-02-04 09:55:57 +00:00
Ulyana Trafimovich
015fd9e71b Merge "Quick and dirty filtering of present LOCAL_OPTIONAL_USES_LIBRARIES." 2021-02-04 06:16:03 +00:00
Bill Yi
3248ef4e4f Merge RQ1A.210205.004 to aosp-master - DO NOT MERGE
Merged-In: Ibf5ea0aaf1cf42c08f32e435b1164598410ac44a
Merged-In: I155689df9ad55e5056baebe975ee14f2d2622cef
Change-Id: Iaa90ab536a2fa336db81e3af04648ce68f138cab
2021-02-03 17:01:38 -08:00
Colin Cross
17e98b7ca2 Use RSP file for soong_zip in target_files.zip
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
2021-02-03 16:03:55 -08:00
Martin Stjernholm
7704497315 Add logic to ensure the ART APEXes are built from source in coverage
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
2021-02-03 23:16:01 +00:00
Ulya Trafimovich
156c719179 Quick and dirty filtering of present LOCAL_OPTIONAL_USES_LIBRARIES.
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
2021-02-03 15:05:42 +00:00
Treehugger Robot
1d77ebad18 Merge "Install init_rc for recovery modules correctly." 2021-02-03 07:35:04 +00:00
Yifan Hong
83d1c2ed4b Install init_rc for recovery modules correctly.
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
2021-02-02 17:04:53 -08:00
Ulya Trafimovich
c77a379241 Fix typo in variable name.
Bug: 132357300
Test: m nothing
Change-Id: I0e770aa7ab179aa90ae0d12d7c101e65ca345bee
2021-02-02 12:22:04 +00:00
Ulyana Trafimovich
d04a95a97f Merge "Merge <uses-library> dependency configs into dexpreopt.config files." 2021-02-01 10:16:57 +00:00
Tamas Petz
1c879b8822 Add armv8-a-branchprot arch variant
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
2021-01-28 17:10:24 +01:00
Ulya Trafimovich
558cb6c5ac Merge <uses-library> dependency configs into dexpreopt.config files.
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
2021-01-28 14:59:14 +00:00
Nikita Ioffe
3608148612 Add support for signing a compressed apex
Test: atest releasetools_test
Bug: 172912232
Change-Id: I4630578694afbab675db770b46898cc32f1861f3
2021-01-27 01:27:11 +00:00
Treehugger Robot
5b62daa03c Merge "Add soong config var for library linking strategy" 2021-01-26 16:57:55 +00:00
Ulyana Trafimovich
bcabefa689 Merge "Add LOCAL_PROVIDES_USES_LIBRARY and use it in module dexpreopt config." 2021-01-25 14:32:59 +00:00
Ulyana Trafimovich
0d20c7cf5e Merge "Add subcontexts field to JSON class loader context representation." 2021-01-25 14:32:23 +00:00
Treehugger Robot
c12f1084c0 Merge "Moving $OUT/vendor-ramdisk-debug.cpio.lz4 to intermediate dir" 2021-01-24 14:53:43 +00:00
Liz Kammer
c8381ba16b Add soong config var for library linking strategy
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
2021-01-22 13:08:00 -05:00
Ulya Trafimovich
514d809b20 Add LOCAL_PROVIDES_USES_LIBRARY and use it in module dexpreopt config.
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
2021-01-22 12:09:30 +00:00
Ulya Trafimovich
1047a0a4be Add subcontexts field to JSON class loader context representation.
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
2021-01-22 12:00:24 +00:00
Evgenii Stepanov
d0bd7f0db6 Merge "Support memtag_heap sanitizer type in make." 2021-01-21 20:21:13 +00:00
Jiyong Park
3c87560119 Add a missing guard around JACOCO_REPORT_CLASSES_ALL
Fixing a mistake that was made by
https://android-review.googlesource.com/c/platform/build/+/1549484/

Bug: N/A
Test: m nothing
Change-Id: I5d4c14934e9fa3fc493dcddb2916d39054da7422
2021-01-21 12:48:11 +09:00
Treehugger Robot
75c4e3483f Merge "Concat INTERNAL_*IMAGE_FILES into INTERNAL_ALLIMAGES_FILES" 2021-01-21 00:28:02 +00:00
Evgenii Stepanov
3330b2fe0b Support memtag_heap sanitizer type in make.
Bug: b/135772972
Test: build with SANITIZE_TARGET=memtag_heap
Change-Id: I0f66649e7a689c9f050dc49974e218b56698254c
2021-01-20 22:27:49 +00:00
Treehugger Robot
6e455b8ca3 Merge "Emit virtual_ab_compression prop to dynamic_parttiion_info.txt" 2021-01-20 19:04:11 +00:00
Nicolas Geoffray
c6c4f08a8c Merge "Remove unused variables." 2021-01-20 18:13:20 +00:00
Ulyana Trafimovich
8951930f21 Merge "Do not suppress compilation of boot images because of TARGET_BUILD_APPS." 2021-01-20 17:46:02 +00:00
Bill Peckham
ddf8f61ce5 Merge "Enable prebuilt hiddenapi CSV files." 2021-01-20 17:43:48 +00:00
Bowgo Tsai
7ac96037c3 Moving $OUT/vendor-ramdisk-debug.cpio.lz4 to intermediate dir
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
2021-01-20 22:33:13 +08:00
Nicolas Geoffray
ed9395a929 Remove unused variables.
Test: m
Bug: 176171716
Change-Id: I203d08607688ae6f165f0d5c7eee5d13c61eeefa
2021-01-20 14:32:55 +00:00
Ulya Trafimovich
7f8b7a1123 Do not suppress compilation of boot images because of TARGET_BUILD_APPS.
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
2021-01-20 14:04:30 +00:00
Yo Chiang
865fd0c010 Merge "Specify --ramdisk_name for vendor ramdisks for vendor_boot v4" 2021-01-20 08:50:30 +00:00
Treehugger Robot
b45217bdc4 Merge "Includes recovery resources into vendor_boot-debug.img" 2021-01-20 02:06:10 +00:00
Inseob Kim
890f84fe71 Merge "Implement directed vendor snapshot" 2021-01-20 01:17:23 +00:00
Ryan Prichard
39ac1faf76 Merge "Switch platform EH unwinder to prebuilt LLVM libunwind" 2021-01-20 00:10:58 +00:00
Kelvin Zhang
239a79ae19 Emit virtual_ab_compression prop to dynamic_parttiion_info.txt
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
2021-01-19 16:11:32 -05:00
Yo Chiang
68ab626aac Specify --ramdisk_name for vendor ramdisks for vendor_boot v4
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
2021-01-19 18:58:43 +08:00
Bowgo Tsai
ceaa411fcb Includes recovery resources into vendor_boot-debug.img
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
2021-01-19 17:07:45 +08:00
Bill Peckham
e3cf60911a Enable prebuilt hiddenapi CSV files.
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
2021-01-16 22:07:40 +00:00
Yabin Cui
462c12dfae Disable unsigned-shift-base by default.
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
2021-01-14 14:14:08 -08:00
Treehugger Robot
d041e4babf Merge "Make ro.product.cpu.abilist.* to be fetched dynamically" 2021-01-14 18:34:22 +00:00