Commit Graph

66423 Commits

Author SHA1 Message Date
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
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 e174dca416 Merge "GSI: enable dynamic partitions" 2021-02-05 18:34:38 +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
Hung-ying Tyan 4ae09765b7 GSI: enable dynamic partitions
to facilitate mixing GSI onto Cuttlefish

Bug: 178677060
Bug: 179455901
Test: build gsi_x86_64 and aosp_arm64 and check the existence of
      'dynamic_partition_list' in misc_info.txt

Change-Id: I0fd9e9645d4882e2cd7d3508a44fbcad5dce81bc
2021-02-05 18:50:28 +08: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
Martin Stjernholm c7e1bdfede Merge "Merge the module_* device.mk files into their corresponding product mk files." 2021-02-03 16:12:34 +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
Kelvin Zhang 00db3859e7 Merge "Fix test failures due to binaries not found in PATH" 2021-02-02 22:21:15 +00:00
Kelvin Zhang e9d4ddb1e0 Merge "Add releasetools_test to TEST_MAPPING" 2021-02-02 19:25:21 +00:00
Kelvin Zhang 05a3f680f7 Fix test failures due to binaries not found in PATH
Test: rm `where deapexer` && mm otapackage

Change-Id: I0b742f26ae984729b97bf796aa3ed9335b316369
2021-02-02 14:24:54 -05:00
Kelvin Zhang 553efcaae2 Add releasetools_test to TEST_MAPPING
Test: treehugger
Change-Id: I3a0f9e9e5dd8d49c22f466aa0605768fee3f4821
2021-02-02 14:24:54 -05:00
Kelvin Zhang 6c5d977b2e Merge "Add deapexer to releasetools_common" 2021-02-02 19:16:49 +00:00
Ulyana Trafimovich 8aaf4ac383 Merge "Fix typo in variable name." 2021-02-02 16:46:25 +00: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
Martin Stjernholm 4ca749cb11 Merge the module_* device.mk files into their corresponding product mk
files.

To clean up an unnecessary indirection. Instead introduce a common file
for module products.

Test: lunch module_{arm,arm64,x86,x86_64}
      inspect the build banners
Change-Id: Ia312431a664e731f5d801ee2671f62f5cd23bd51
2021-02-02 11:32:25 +00:00
Mohammad Samiul Islam f4909b4d71 Add deapexer to releasetools_common
Bug: 178726093
Test: m updatepackage
Change-Id: I74650f339ab5399c2474d7cde1d290b55dab721c
2021-02-01 21:03:58 +00:00
Ulyana Trafimovich d04a95a97f Merge "Merge <uses-library> dependency configs into dexpreopt.config files." 2021-02-01 10:16:57 +00:00
Treehugger Robot 289a0ffdaf Merge "Add top level product definitions for module_* devices." 2021-01-29 18:52:25 +00:00
Treehugger Robot 472a860bee Merge "Only add apex_info for compressed apexes" 2021-01-29 10:34:21 +00:00
Colin Cross a6f77c11e0 Merge "Add armv8-a-branchprot arch variant" 2021-01-29 01:20:08 +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
Martin Stjernholm 29c5d1a4f1 Add top level product definitions for module_* devices.
Test: lunch module_{arm,arm64,x86,x86_64}
  Inspect target arches in the banner
Bug: 176171716
Change-Id: Iba7818cfc1385d3f84dce1ef95c2bb8d279926bb
2021-01-27 20:29:19 +00:00
Nikita Ioffe 8e0c592f89 Merge "Add support for signing a compressed apex" 2021-01-27 19:45:33 +00:00
Kelvin Zhang c72718c7c5 Only add apex_info for compressed apexes
Test: mm -j dist, then make sure apex_info.pb doesn't contain
non-compressed apex

Change-Id: I6262eb97ec53de28953257d8b3b77e32ac0259be
2021-01-27 14:17:14 -05:00
Kelvin Zhang a7f2857f8b Merge "Add apex_info.pb to generated OTA" 2021-01-27 14:58:30 +00:00
Kelvin Zhang c25182c757 Merge "Fix pylint warnings on ota_from_target_files.py" 2021-01-27 01:43:05 +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
Cole Faust 2ca17745f6 Merge "Add outmod and installmod commands" 2021-01-26 21:27:58 +00:00
Kelvin Zhang 7bd09911a2 Add apex_info.pb to generated OTA
Test: generate an OTA, make sure apex_info.pb is in

Bug: 172911822

Change-Id: I13a6ef4bc1f6ed2d146922f3031ea24700ba06f4
2021-01-26 12:42:52 -05:00
Kelvin Zhang 22c687c5c3 Fix pylint warnings on ota_from_target_files.py
Test: treehugger
Change-Id: I0a2b9ebe001152f5de7dce6198139719322fd241
2021-01-26 12:42:52 -05:00
Kelvin Zhang 1cd839623e Merge "Emit apex_info to target_files META/apex_info.pb" 2021-01-26 17:38:07 +00:00
Treehugger Robot 5b62daa03c Merge "Add soong config var for library linking strategy" 2021-01-26 16:57:55 +00:00
Treehugger Robot ee7aa0906c Merge "Disable BLE_VND_INCLUDED in GSI" 2021-01-26 09:18:51 +00:00
Jeongik Cha af5fb31f1c Merge "update vndk list" 2021-01-26 03:33:15 +00:00
Cole Faust 24c36dbeec Add outmod and installmod commands
These are analogs to pathmod/gomod that find/install
the module's apk instead of cd'ing to its source
directory.

Bug: None
Change-Id: Iad750e154397f7cfcdd620f1ed6478b05c1225bb
Test: Manually, with bash and zsh
2021-01-26 01:50:18 +00:00
Jeongik Cha 3000bb809e update vndk list
AIDL interface will need to specific its version. For gradually adpating
those library is temporarily okay.
It will be cleaned up once the transition is done

Bug: 150578172
Test: m
Change-Id: I93e4f9f8e56f2f6e0e90f01a80a5c390ca49be63
Merged-In: I93e4f9f8e56f2f6e0e90f01a80a5c390ca49be63
2021-01-26 10:01:07 +09:00
Kelvin Zhang 62eea43d9b Merge "Create a function that can generate ApexInfo using target-files" 2021-01-25 17:55:53 +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