Commit graph

45775 commits

Author SHA1 Message Date
Colin Cross
a8077126e8 Support response file inputs in build_license_metadata
Soong can produce very large lists of dependencies that exceed the
command line length limit when calling build_license_metadata.  Add
support for reading arguments from a response file.

Bug: 207445310
Test: m
Change-Id: I6b68e3a7468e797cfbe53ff5d9da2ec9badb000f
2021-11-30 08:08:03 -08:00
Colin Cross
d5e7af9003 Switch default for InstallBypassMake to true
Enable InstallBypassMake for all module types by switching its default
to true.

Bug: 204136549
Test: m checkbuild
Change-Id: Ied082995e74d71dee6aecea99689ac3f63600d3b
2021-11-22 21:57:36 -08:00
Colin Cross
6340ea50d4 Move apex module installation into Soong
Move apex module installation rules into Soong by overriding
InstallBypassMake.

Soong installs don't support post install commands, so move the
symlinks into separate rules and add dependencies on them.

This relands If65d283abc86f18ad266da0bf16fe95971a0bf9c with fixes
to install files into $OUT/apex and I606286e971b55d9d1fc4dcd0fbd476962de5fa79
with a fix for reversed logic.

Bug: 204136549
Test: m checkbuild
Change-Id: Ie65c53ebc7911efacdb8e11ba49059448f03c658
2021-11-19 13:37:36 -08:00
Colin Cross
50ed1f9ccb Install android_app_set modules in Soong
Add support for installing extra files from a zip file when installing
a primary file, and use it to support installing android_app_set modules,
which install a primary APK and then an unknown set of additional splits
APKs.

Test: app_set_test.go
Test: install test android_app_set
Bug: 204136549
Change-Id: Ia92f7e5c427adcef3bcf59c82a2f83450905c01d
2021-11-17 19:55:33 -08:00
Colin Cross
ffbcd1d8a0 Extract primary apk from apk set zip
Extract and install the primary apk normally, and then unzip the rest
of them as a post install command.

Bug: 204136549
Test: app_set_test.go
Change-Id: I17437ff27f49df6bc91bdbbea6173b46c7d3ec4e
2021-11-17 19:55:33 -08:00
Daniel Norman
6cfb37af56 Revert "Revert "Adds multi_install_skip_symbol_files field (defa..."
Revert submission 1893459-revert-1869814-vapex-multi-config-VKODFOVCWY

Reason for revert: Fix-forward in https://r.android.com/1894088
Reverted Changes:
I087bfe0dc:Revert "Adds a new prop context for choosing betwe...
I27a498506:Revert "Load persist props before starting apexd."...
Ib5344edc0:Revert "Allow users to choose between multi-instal...
If09bf590e:Revert "Adds multi_install_skip_symbol_files field...
I905dac14c:Revert "Demonstrate multi-installed APEXes."

Change-Id: I33210c8d3199338f9c898d719ed1797b629317af
2021-11-17 19:12:21 +00:00
Ivan Lozano
9fdba2844e Merge "rust: Add rust_toolchain_library module." 2021-11-17 16:59:15 +00:00
Treehugger Robot
c131480634 Merge "Add bp2build_metrics" 2021-11-17 16:43:26 +00:00
Treehugger Robot
88560585be Merge "Revert "Switch to clang-r437112"" 2021-11-17 15:23:44 +00:00
Martin Stjernholm
1973f4d2cc Revert "Switch to clang-r437112"
This reverts commit 0d58894613.

Reason for revert: Suspected culprit for test failure b/206716119

Change-Id: Ibdd0aa783e07df5b41fd804efd175c12a7fe6592
2021-11-17 12:23:49 +00:00
Treehugger Robot
245b1bf4dc Merge "Quote aquery commands." 2021-11-17 01:35:07 +00:00
Treehugger Robot
a7f0c39214 Merge "Update platform_apis error message" 2021-11-17 01:29:28 +00:00
Treehugger Robot
6515910b4f Merge "Switch to clang-r437112" 2021-11-16 23:03:07 +00:00
Liz Kammer
c31929962b Quote aquery commands.
Bazel run shell actions begin `bin/bash -c <command>`, without escaping,
the command can be treated as an argument to `bin/bash`.

Test: build/bazel/mixed_droid.sh
Change-Id: I423cb393da2e6ac97448ec77b2596f12670dfd31
2021-11-16 17:31:05 -05:00
Yuntao Xu
ddeab21340 Merge "Handle license conversions in androidmk" 2021-11-16 21:51:35 +00:00
Wei Li
455ba83a94 Fix the output handling of Bazel aquery for py_binary targets so soong's python_binary_host modules can be converted to py_binary and built with Bazel dependent targets in mixed build.
Test: USE_BAZEL_ANALYSIS=1 m genfunctosyscallnrs
Test: USE_BAZEL_ANALYSIS=1 m func_to_syscall_nrs
Test: USE_BAZEL_ANALYSIS=1 m libseccomp_policy
Bug: 201094425
Bug: 197135289
Bug: 204949078
Change-Id: If98630830d687ca814d6ae09c1e610f2c3a371b1
2021-11-16 20:49:28 +00:00
Alex Márquez Pérez Muñíz Díaz Púras Thaureaux
142cc2e360 Add bp2build_metrics
Through a .proto

Bug: 201539536
Test: m nothing
Test: {bp2build,mixed_{libc,droid}}.sh
Test: CI
Change-Id: I18d25eb8cd40c8a88d9ae79a85980b956194a0d4
2021-11-16 14:48:45 -05:00
Yuntao Xu
214cdaf1d4 Handle license conversions in androidmk
1. Support license conversions in the androidmk tool. More details can be
found at go/license-androidmk;
2. As usage examples, locally this functionality has been applied to
aosp/1881088 and aosp/1869664;

Bug: 202964622
Test: m androidmk
Test: manually ran androidmk <typical Android.mk files>
Test: TreeHugger
Change-Id: I7d5013d25ad8961e997109d0378f20f5085e0ecf
2021-11-16 11:41:31 -08:00
Chih-Hung Hsieh
0d58894613 Switch to clang-r437112
* to test with build 7917927

Bug: 201432564
Test: make
Change-Id: Ic21f76f238abb2727e559ece41fd6cc76fb69f85
2021-11-16 18:18:08 +00:00
Ivan Lozano
45e0e5b012 rust: Add rust_toolchain_library module.
Adds a new rust_toolchain_library module, a module which can compute the
source path from the toolchain root.

Bug: 140642453
Test: m

Change-Id: I2d90722880279533eb93d2d946ac8c31fc0b1835
2021-11-16 08:51:48 -05:00
Ivan Lozano
aed0adfee9 Merge "rust: Add Recovery Snapshot Soong tests for rust." 2021-11-16 13:47:18 +00:00
Ivan Lozano
b993a835c3 Merge "rust: Add data_libs and data_bins to rust_test" 2021-11-16 13:46:49 +00:00
Owen Kim
a10ebe60ab Merge "Revert "Adds multi_install_skip_symbol_files field (default fals..."" 2021-11-16 08:39:27 +00:00
Owen Kim
065fbeb146 Revert "Adds multi_install_skip_symbol_files field (default fals..."
Revert submission 1869814-vapex-multi-config

Bug: 206551398
Reason for revert: DroidMonitor-triggered revert due to breakage https://android-build.googleplex.com/builds/tests/view?invocationId=I55600009996329947&testResultId=TR93527797572038984, bug b/206551398
Reverted Changes:
I0cd9d748d:Adds multi_install_skip_symbol_files field (defaul...
I5912a18e3:Demonstrate multi-installed APEXes.
I0e6881e3a:Load persist props before starting apexd.
I932442ade:Adds a new prop context for choosing between multi...
I754ecc3f7:Allow users to choose between multi-installed vend...

Change-Id: If09bf590e3ad93e14fbf89299f80d497c9604a78
2021-11-16 07:08:15 +00:00
Treehugger Robot
2b244217a2 Merge "Fix CC-BY-ND licenses" 2021-11-16 06:20:34 +00:00
Treehugger Robot
59a5cb072b Merge "Refactor ProductConfigProperties to use a struct key instead of an string key with hardcoded patterns." 2021-11-16 04:55:15 +00:00
Spandan Das
60999344a2 Update platform_apis error message
The updated error message is more descriptive about the incompatibility
between platform_apis and sdk_version. Implemented as per the discussion
in b/204447559#17

Test: In build/soong, run go test ./java
Bug: 204447559
Change-Id: I826f0ce47313b337f1754a1b6bc11ce65c837a41
2021-11-16 04:15:33 +00:00
Jingwen Chen
25825ca08d Refactor ProductConfigProperties to use a struct key instead of an
string key with hardcoded patterns.

This fixes a bug with label list conditions_default attrs where the
attribute values get clobbered in a map with the keys
"conditions_default" (with a default empty list) and
"acme__feature__conditions_default" (with a non-empty list) when
generating the LabelListAttribute.

Test: CI
Change-Id: I5429e40f747b7a0ed559f8a468a4831cd32df2c0
2021-11-16 02:50:22 +00:00
Bob Badour
df6099d688 Fix CC-BY-ND licenses
Should be by_exception_only

Test: m nothing
Change-Id: Ic93eacfd7f85d2f86fe5cc8ff35cd1c51cfdb54a
2021-11-15 17:55:37 -08:00
Daniel Norman
f012790f32 Merge "Adds multi_install_skip_symbol_files field (default false) to apex." 2021-11-16 00:45:32 +00:00
Cole Faust
6d0500d556 Merge "Allow generic if statements" 2021-11-15 23:26:48 +00:00
Treehugger Robot
ae1276a2db Merge "Refactor bp2build tests" 2021-11-15 23:21:10 +00:00
Ivan Lozano
3e1bc6cc0d Merge "Use new soong_cc_rust_prebuilt.mk" 2021-11-15 22:19:46 +00:00
Ivan Lozano
4e5f07d27b rust: Add data_libs and data_bins to rust_test
Allows defining data binaries and libraries that should be installed
alongside a rust_test module, similar to cc_test.

This refactors cc_test as well so it can define rust_ffi_shared and
rust_binary modules as data.

Bug: 171710847
Test: New Soong tests pass.
Test: Example module installs data appropriately.
Change-Id: I0b56098fb475ec54f9b7a761220d260fe68cbee1
2021-11-15 17:18:42 -05:00
Ivan Lozano
c2ca1ee83d rust: Add Recovery Snapshot Soong tests for rust.
Bug: 197866992
Test: m nothing
Change-Id: I4b5401cf2ffa0dbcc6fea60f90bad4c47a9d5e6b
2021-11-15 17:11:20 -05:00
Cole Faust
f83202143a Allow generic if statements
Previously, only comparisons between strings/variable references
and other strings/variable references or certain function calls
were allowed. After this cl, any two starlark expressions can
be compared. If they have different types, they will be converted
to strings first.

Fixes: 205995738
Bug: 201700692
Test: go test
Change-Id: Ib463de7b24d3abcd032dbdcba7c3f1351c314d01
2021-11-15 11:29:29 -08:00
Ivan Lozano
92a89ed1c5 Merge "rust: Skip global 'fuzzer' sanitizer static bins" 2021-11-15 19:17:54 +00:00
Trevor Radcliffe
8dae331d4a Merge "Document possible values of sdk_version" 2021-11-15 18:28:00 +00:00
Liz Kammer
78cfdaa597 Refactor bp2build tests
Moves to specifying attributes as a map, such at it is possible to add
additional attributes conditionally. This is in particular useful once
supporting the `enabled` property which will add
`target_compatible_with`

Test: go test soong tests
Change-Id: Iade8eed1ce3acb1d1712a9ee3119d9ae59675624
2021-11-15 11:09:05 -05:00
Ivan Lozano
602227bcb5 Merge "rust: Only apply hwasan flags once to fuzz targets" 2021-11-15 16:03:31 +00:00
Ivan Lozano
6c5b8f4e02 rust: Skip global 'fuzzer' sanitizer static bins
The 'fuzzer' sanitizer enables 'hwasan', which is not supported for Rust
static binaries. Make sure we skip applying this sanitizer to those
binaries.

Bug: 204776996
Test: SANITIZE_TARGET=fuzzer m <static_rust_executable>
Change-Id: I619cfab32b46c0811590973344eb5cdbe3f1a119
2021-11-15 09:35:12 -05:00
Rupert Shuttleworth
c0d9f8bd5e Merge "Allow libbuildversion to build with Bazel, but skip its 'tests' subdir for now." 2021-11-15 09:00:12 +00:00
Sophie Zheng
7b5fa4277f Merge "Java APIs used by Mainline modules." 2021-11-15 06:40:31 +00:00
Ivan Lozano
f3e8fc3f0b rust: Only apply hwasan flags once to fuzz targets
On HWASAN global sanitized builds, fuzz targets had hwasanFlags applied
twice. Rust only allows llvm-args flags to be passed in once however, so
this broke compilation.

Bug: 204915322
Test: SANITIZE_TARGET='hwaddress fuzzer' m <fuzzer>
Change-Id: I4f6c35e04bc4c891d9c66e8a53c3dcb88e8670cf
2021-11-13 07:46:05 -05:00
sophiez
0234737f30 Java APIs used by Mainline modules.
Add scripts to generate java APIs used by Mainline modules. This is
aosp/1879177 with fixed build error that caused by dexdeps analyzing
resource only APKs which doesn't contains any .dex files. Now skip the
error generates in that case in gen_java_usedby_apex.sh

Forrest run:https://android-build.googleplex.com/builds/abtd/run/L38900000951898586

Test: TARGET_BUILD_APPS=com.android.adbd m dist apps_only
Change-Id: Id539cbe1b7306ace69c047f95ffc02265a467511
2021-11-12 23:39:35 +00:00
Colin Cross
cb16a92ee4 Merge "Mark vndkLibrariesTxt modules as device modules" 2021-11-12 23:30:51 +00:00
Daniel Norman
e19437e8f7 Adds multi_install_skip_symbol_files field (default false) to apex.
Multi-installed APEXes share the same apex_name and are installed
at the same time.

Should be set to true for all multi-installed APEXes except the singular
default version within the multi-installed group.
Only the default version can install symbol files in $(PRODUCT_OUT}/apex,
or else conflicting build rules may be created.

Bug: 199290365
Test: see https://r.android.com/1872018
Change-Id: I0cd9d748d7be3a2de40ed14f13bad71912457ddc
2021-11-12 20:45:50 +00:00
Treehugger Robot
70275c031e Merge "Allow open-dice to build tests for generatied open-dice rust bindings." 2021-11-12 20:38:53 +00:00
Janis Danisevskis
73f2104588 Allow open-dice to build tests for generatied open-dice rust bindings.
Test: N/A
Bug: 205626417
Change-Id: Iafa79f07005b9863468252828c74ee199279c457
2021-11-12 20:33:49 +00:00
Ivan Lozano
52a3e36c92 Merge "rust: Support new rust_stdlib_prebuilt_host type" 2021-11-12 19:35:03 +00:00