Commit graph

45740 commits

Author SHA1 Message Date
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
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
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
Ivan Lozano
94e8a651fa Merge changes I26198187,Ia904d07b
* changes:
  rust: Support MTE memtag_heap sanitizer
  rust: Support global sanitizers
2021-11-12 19:26:04 +00:00
Cole Faust
4220a61349 Merge "Convert soong scripts to python 3" 2021-11-12 19:04:31 +00:00
Colin Cross
152911f807 Merge "Revert "Move apex module installation into Soong"" 2021-11-12 19:02:30 +00:00
Cole Faust
80374405df Merge "Make handleSimpleStatement also handle if statements" 2021-11-12 19:01:41 +00:00
Colin Cross
ccba23db44 Revert "Move apex module installation into Soong"
This reverts commit e3d156a622.

Reason for revert: b/206119621

Bug: 204136549
Change-Id: I380223b86660c27bea8f5dcc2d61f32df2704c02
Fixes: 206119621
2021-11-12 19:01:29 +00:00
Ivan Lozano
d06cc748c1 Use new soong_cc_rust_prebuilt.mk
soong_{cc,rust}_prebuilt.mk has been merged. Use the new file.

Bug: N/A, clean-up
Test: m
Change-Id: I3f03e866815f6394aacd8cb0deba04f381b78c29
2021-11-12 13:27:58 -05:00
Colin Cross
45bce85fc9 Mark vndkLibrariesTxt modules as device modules
vndkcorevariant.libraries.txt needs to be installed onto the device,
mark the vndkLibrariesTxt module type as a device module so that
PathForModuleInstall returns a path in the system partition.

Bug: 204136549
Test: m checkbuild
Change-Id: Ic2aadff27cee6a5e6352ceaf61b707ad3e5b531f
2021-11-12 09:12:22 -08:00
Colin Cross
4e278e5f68 Merge "Move apex module installation into Soong" 2021-11-12 17:06:08 +00:00
Ivan Lozano
fba2aa255c rust: Support new rust_stdlib_prebuilt_host type
Refactor Rust prebuilts to support the new rust_stdlib_prebuilt_host
module type, and change the format for depending on the prebuilt host
stdlibs.

Bug: 140642453
Test: m
Change-Id: Ifbc4741818777934e917631c788b20911856c44a
2021-11-12 08:58:17 -05:00
Colin Cross
8432238aa0 Merge "Add .PHONY for dist-for-goals targets" 2021-11-12 07:13:17 +00:00
Alexander Smundak
51977fca61 Merge "Display diagnostic message for each conversion error." 2021-11-12 02:34:39 +00:00
Colin Cross
e3d156a622 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.

Bug: 204136549
Test: m checkbuild
Change-Id: If65d283abc86f18ad266da0bf16fe95971a0bf9c
2021-11-11 17:44:42 -08:00
Treehugger Robot
09104df494 Merge "Add hardware/interfaces/security to rust allow list." 2021-11-12 00:55:52 +00:00
Colin Cross
b5399c84ff Add .PHONY for dist-for-goals targets
Mac builds don't include build/make/core/tasks/general-tests.mk
which causes the general-tests target not to be marked phony.  Have
Soong mark all dist-for-goals targets as phony so it doesn't rely
on other makefiles being present.

Bug: 205928834
Test: forrest
Change-Id: I9394c9c794fc83cde9649aa12a3039526d8206f3
2021-11-12 00:36:58 +00:00
Sasha Smundak
7d934b9c47 Display diagnostic message for each conversion error.
Also, use better names for the error handling entities.

Bug: 204062171
Test: manual
Change-Id: I65869120ed08fc40d9ec6267c882e53aaedde9ed
2021-11-11 15:14:20 -08:00
Chris Parsons
393002a913 Remove modules from denylist after host C++ support
Test: mixed_droid
Change-Id: If9b04625b0ad4fce52283eb683f1342e24bb97f2
2021-11-11 13:56:56 -05:00
Christopher Parsons
4f5b548e74 Merge "Support host platform cc builds" 2021-11-11 17:18:15 +00:00
Trevor Radcliffe
347e5e4307 Document possible values of sdk_version
Fixes: 205166295
Test: Look at docs
Change-Id: Ice6cf61b8628c529dc28c3b02e83bec93e952461
2021-11-11 15:36:53 +00:00
Treehugger Robot
45da465ef6 Merge changes I9e38ac73,I9412147f
* changes:
  Honor PreventInstall for APKs and dexpreopt files
  Add dependency from hostdex installed module to Make intermediates
2021-11-11 06:10:26 +00:00
Treehugger Robot
008d17612a Merge "Dump deps for native and java to json files." 2021-11-11 04:48:16 +00:00
Treehugger Robot
2a8105d19e Merge "Flag 'override' directives." 2021-11-11 03:17:11 +00:00
Colin Cross
fa9bfcd0d2 Honor PreventInstall for APKs and dexpreopt files
Native coverage builds create a second variant of APKs and set
PreventInstall on the non-coverage variant.  Skip calling
ctx.InstallFile for APKs and in dexpreopt when PreventInstall
is set.

Fixes: 205865567
Test: m EMMA_INSTRUMENT=true EMMA_INSTRUMENT_FRAMEWORK=true CLANG_COVERAGE=true NATIVE_COVERAGE_PATHS="*" NATIVE_COVERAGE_EXCLUDE_PATHS="art bionic/libc device external/compiler-rt external/clang external/llvm external/swiftshader/third_party/llvm-10.0"
Change-Id: I9e38ac737315db12475e8f9bfb3e0e7c0327fc06
2021-11-10 16:42:38 -08:00
Matthew Maurer
739edbc0bc Merge "Update the Rust prebuilt version number to 1.56.1" 2021-11-10 23:57:44 +00:00
Cole Faust
591a1fe158 Make handleSimpleStatement also handle if statements
This simplifies its usage, as it can now handle
virtually any Make node.

Bug: 201700692
Test: go test
Change-Id: I1786a441a706304673ea4a2973a21f93b95b945a
2021-11-10 15:09:39 -08:00
Colin Cross
3108ce17b0 Add dependency from hostdex installed module to Make intermediates
The art tests rely on a dependency existing from
out/host/linux-x86/framework/core-oj-hostdex.jar to
out/host/common/obj/JAVA_LIBRARIES/core-oj-hostdex_intermediates/classes.jar,
override LOCAL_SOONG_INSTALLED_MODULE for the hostdex modules so that
soong_java_prebuilt.mk adds the dependency.

Test: art/tools/buildbot-build.sh --host && art/tools/run-libcore-tests.sh '--mode=host' '--variant=X64' --debug
Change-Id: I9412147fc66d5e5f0dae52d522868a37251f781e
2021-11-10 14:38:50 -08:00
Chris Parsons
494eef3dc8 Support host platform cc builds
This involves handling of linux-* platforms (identifying them
appropriately as host), disabling unsupported Windows platform, and
denylisting of still-problematic modules.

Test: mixed_droid, with verification that shared library artifacts
originate from bazel-out

Change-Id: Ib52db49a2d2a3c1ff9b76af23fd4f22cfc9182d0
2021-11-10 21:57:15 +00:00
Cole Faust
c41dd72d3b Convert soong scripts to python 3
Except manifest_utils, which is used by
apexer.

Tests run:
m construct_context_test manifest_check_test manifest_fixer_test test_config_fixer_test
out/host/linux-x86/testcases/construct_context_test/x86_64/construct_context_test
out/host/linux-x86/testcases/manifest_check_test/x86_64/manifest_check_test
out/host/linux-x86/testcases/manifest_fixer_test/x86_64/manifest_fixer_test
out/host/linux-x86/testcases/test_config_fixer_test/x86_64/test_config_fixer_test

Bug: 203436762
Test: Tests listed above + presubmits
Change-Id: Ife75b3af1efc871a2d8521d26153a262573bb706
2021-11-10 13:49:27 -08:00
Ivan Lozano
aa1a9e4086 Merge "rust: Refactor stripped output file path" 2021-11-10 21:34:21 +00:00
Cole Faust
f8ff9cf68c Merge "Enable mk2rbc warnings/errors by default" 2021-11-10 21:29:26 +00:00
Sasha Smundak
ea3bc3a953 Flag 'override' directives.
Bug: 201087531
Test: internal
Change-Id: I2e08b126d769b1595172b04a3539e99b3e72cb2b
2021-11-10 13:19:01 -08:00
Ivan Lozano
fe700e19c8 Merge "rust: Add missing variation -D flags to bindgen." 2021-11-10 20:47:39 +00:00
Cole Faust
18e7785f26 Merge "Translate soong_config_get calls to rbc" 2021-11-10 19:46:48 +00:00
Janis Danisevskis
a9029d1f7e Add hardware/interfaces/security to rust allow list.
Test: N/A
Bug: 205626417
Change-Id: I3a648063c8380074713ce58957e4ac062a331e40
2021-11-10 10:59:46 -08:00
Colin Cross
02ce1e7833 Merge changes Ib3f4ee14,Iac22c9fd,Ibd78758c,I40d8696c,I2a2b10e4, ...
* changes:
  Fix InstallBypassMake symlink dependencies
  Add tests for ctx.InstallFile
  Fix OutDir vs SoongOutDir in tests
  Fix go vet error
  Add missing os.MkdirAll to WriteFileToOutputDir
  Use pathtools.WriteFileIfChanged in translateAndroidMk
2021-11-10 18:49:08 +00:00
Ivan Lozano
e950cdad6d rust: Add missing variation -D flags to bindgen.
rust_bindgen calls are missing a large set of -D cflags which control
how headers are interpretted for certain variations (such as
-D__ANDROID_VNDK__). This CL introduces the full set of these flags.

Bug: 205609024
Test: rust_bindgen vendor variant builds correctly.

Change-Id: Id781c1f88352e9c238c49619f0dce20f804cfc77
2021-11-10 13:28:55 -05:00