Commit graph

51753 commits

Author SHA1 Message Date
Treehugger Robot
4b1fe58b7d Merge "Don't use prebuilt rust stdlibs for linux bionic" 2022-07-01 20:17:01 +00:00
Treehugger Robot
d9cb4b746c Merge "Allowlist more cc mainline modules blockers" 2022-07-01 18:53:07 +00:00
Colin Cross
a8941ec69f Don't use prebuilt rust stdlibs for linux bionic
Linux bionic doesn't have rust stdlib prebuilts, don't use the prebuilts
when it is configured as the host os.

Bug: 216192129
Test: builds
Change-Id: I03425dee4b2e3659bf90c0a0c808cc286daa4b7f
2022-07-01 18:30:17 +00:00
Treehugger Robot
f47fe38686 Merge "Don't pass host cross linux musl modules to Make" 2022-07-01 17:11:41 +00:00
Liz Kammer
63367e1da9 Allowlist more cc mainline modules blockers
Test: mixed_droid.sh
Change-Id: Ice133b88d3420d9b976d1632da3e7e5da6bb5c3c
2022-07-01 12:33:59 -04:00
Treehugger Robot
281d421f41 Merge "Remove alternative stl names in bp2build" 2022-07-01 14:54:20 +00:00
Alexei Nicoara
f6152a161b Merge "Removing comment lines from apex_manifest.json" 2022-07-01 14:11:27 +00:00
Treehugger Robot
4d2f767217 Merge changes I93edfd61,Icd23b542,I58c84607,Icfa73a75
* changes:
  Pass -fno-sanitize=vptr,function for musl
  Use musl rust prebuilts for USE_HOST_MUSL=true
  Don't package host cross modules in javaFuzzPackager
  Add rust musl arm and arm64 toolchains
2022-07-01 12:46:58 +00:00
Colin Cross
6c18d004f2 Pass -fno-sanitize=vptr,function for musl
The prebuilts for musl have the necessary symbols for vptr and function
sanitizers, but enabling them implicitly enables RTTI which causes RTTI
mismatch issues with dependencies.

Bug: 215802826
Test: m USE_HOST_MUSL=true host-native
Change-Id: I93edfd617d99efcac0eca58bb3f3c173c4fa121a
2022-07-01 02:58:25 +00:00
Colin Cross
567d342ed8 Use musl rust prebuilts for USE_HOST_MUSL=true
Building rust code with musl enabled can load proc macro crates built
against musl into rustc, so we have to use a version of rustc also
built against musl.

Bug: 216192129
Test: m USE_HOST_MUSL=true host-native
Change-Id: Icd23b542a4b64a975850a8a4bb4b69183cc6c2c6
2022-07-01 02:58:14 +00:00
Sasha Smundak
e3cf1abefc Reformat the test to make them more readable.
Test: treehugger
Change-Id: I28ccd531a5dadcee3cbdebd5f5ba6db1605662d9
2022-06-30 14:20:55 -07:00
Trevor Radcliffe
130d98f8b2 Merge "Add support and tests for export_*_lib_headers" 2022-06-30 17:30:16 +00:00
Alexei Nicoara
ee4b633627 Removing comment lines from apex_manifest.json
Allowing comments in apex_manifest.json by stripping all the lines which
start with //

Test: presubmit
Bug: 237532860
Change-Id: Iec8c9987edf19b763b2b87df7d125c006ffb217a
2022-06-30 16:34:28 +01:00
Usta Shrestha
86363835ae Merge "null build upon repeated mixed build" 2022-06-30 14:11:20 +00:00
Sasha Smundak
9d46dcf908 Fix config string for the generic target.
For the generic target (i.e, arch == "common" and os == Device), the config
 string should be "target|common", not "x86_64|common".
 Also renamed local variable from `os`.

Bug: 232085015
Test: treehugger
Change-Id: I36e696203f207dd295ed7f109b7c07b576ebf3c2
2022-06-29 18:30:36 -07:00
Kousik Kumar
9c4216a4c9 Merge "Add a broad warning about missing LOAS creds" 2022-06-29 22:40:36 +00:00
Kousik Kumar
7bc781949a Add a broad warning about missing LOAS creds
This is to generally warn Google devs about lack of LOAS creds.

Given the switch to RBE, lack of LOAS creds will start resulting in build
failures, so adding a warning message ahead of time to all builds. Will
convert this to a build failure after a week.
We need LOAS creds to be able to even fetch the CDPush config file to
determine whether to use RBE in a build a not, which is why I'm making
this a broad error message across builds.

Test: ran "m nothing" build with / without gcert and with / without
"stubby" in $PATH and confirmed appropriate error message.
Bug: b/235985591

Change-Id: I15cbaf372b0a7b79f868a06c7d5ede19b49ae687
2022-06-29 17:48:52 +00:00
Trevor Radcliffe
2be7f54b45 Add support and tests for export_*_lib_headers
There are 3 different properties about exporting headers in Soong:

1. export_static_lib_headers
2. export_shared_lib_headers
3. export_header_lib_headers

The static and header cases are already supported in bp2build but
do not have tests. This CL adds support for the shared case and
adds tests for all cases.

Fixes: 236268577
Test: Unit tests
Change-Id: Idfb788271e607919d4ac6bc0e4eb4e6ff8f78e8d
2022-06-29 15:25:01 +00:00
Paul Duffin
e7b1f5b0a5 Avoid modifying Compile_dex property
Previously, the code would modify the Compile_dex property to set it to
true if the module was part of an APEX as the APEX needs the dex file.
That lost information about whether the Compile_dex property was
specified in the .bp file and also meant that the APEX variant had
different properties to other variants which could result in unexpected
differences in behavior between them.

One of those differences can occur in the sdk snapshot generation code
which uses the Compile_dex property to determined whether to write a
compile_dex property in the generated snapshot. If it uses an APEX
variant then it will always add compile_dex: true but if it used a non
APEX variant then it would depend on the setting of compile_dex in the
source. That leads to the generated snapshot being affected not just
by the set of modules that are included but also how they were
specified.

This change stops modifying the properties and just uses a local
variable to store the updated value. All the other (4) uses of the
Compile_dex property were checked and 1 accesses the property before
it is updated, 2 access the property from a module type (Import) that
does not update the property and the other is in the sdk snapshot
generation code which accesses it after it has been modified but needs
to access the unmodified value.

This is needed for the follow up change that allows an sdk module to
reference an apex to automatically add exportable parts of the apex
contents to the sdk snapshot avoiding duplication which can lead to
errors.

Bug: 232401814
Test: m nothing
Change-Id: Ibc80d93473a266dc9f9900ec1cb175b51460b5e9
2022-06-29 10:15:52 +00:00
Treehugger Robot
114ad30d76 Merge "Refactor apexBundle code." 2022-06-29 07:36:33 +00:00
Sasha Smundak
6f9e91d5e9 Refactor apexBundle code.
Move dependency walker out of GenerateAndroidBuildActions, reduce IDE
warnings.

Test: treehugger
Change-Id: I520c59772b1da7102d2a2364b2c56789455ea7fb
2022-06-28 22:47:43 -07:00
Treehugger Robot
f04c8b671a Merge "Add build/bazel_common_rules to mock bazel directories." 2022-06-29 00:50:24 +00:00
Yifan Hong
82799f2b7f Add build/bazel_common_rules to mock bazel directories.
Test: build/soong/tests/run_integration_tests.sh
Change-Id: I647d122b5fc530b5a26bd69c141d3fdc9cca7424
2022-06-28 16:25:56 -07:00
Colin Cross
9a027be6bc Don't pass host cross linux musl modules to Make
Make doesn't understand host cross linux musl modules, don't pass
them to make.  Continue passing them to make when USE_HOST_MUSL=true
is set.

Bug: 236052820
Test: builds with linux musl arm64 host cross configured
Change-Id: Id8b90ca0fa698fdf658156b458cc385387768414
2022-06-28 15:16:15 -07:00
Colin Cross
39a1814f24 Don't package host cross modules in javaFuzzPackager
Normally the host cross OS is windows, which only builds a few opted-in
modules.  When the host cross OS is set to linux_musl it builds all
modules that haven't explicitly opted out, producing linux_musl_common
variants of java modules.  Filter these out of javaFuzzPackager to
avoid conflicts with the linux_glibc_common modules.

Host cross common variants targets were missing the HostCross flag,
so also set it in getCommonTargets.

Bug: 236052820
Test: builds with linux_musl arm64 host cross enabled
Change-Id: I58c846076091bee7df50016c240a176c039c42e9
2022-06-28 15:16:15 -07:00
Colin Cross
1faf82305a Add rust musl arm and arm64 toolchains
Add rust toolchain configurations for arm-linux-musleabihf and
aarch64-linux-musl.

Bug: 236052820
Test: builds with linux musl arm64 host cross configured
Change-Id: Icfa73a75eac710e955f71a073cb4b7bb1cdfcc7a
2022-06-28 15:16:15 -07:00
Colin Cross
88a029f710 Reland: Don't use hwasan for non-bionic arm64 targets
Don't use hwasan for non-bionic arm64 targets, including
arm64-linux-musl and arm64 darwin.

This relands I67c07f26f25a9f9807ee21ee79c113ea11f65473 which was
accidentally reverted in I47a9322929baff2492c6e8db989ece01fcbeb133.

Bug: 236052820
Test: build arm64 musl sysroot
Change-Id: I77753ecb6f07aafa1b6e00ad6bf432f9c9744f79
2022-06-28 15:15:40 -07:00
Usta Shrestha
ef92225a67 null build upon repeated mixed build
no implicit deps on bazel-tools

Test: USE_BAZEL_ANALYSIS=1 ../bazel/ci/incremental_mixed_build.sh
Bug: b/216194240
Change-Id: Ibbd87c6a6cc2fddf21fba37a6bb4e72adc209576
2022-06-28 15:37:12 -04:00
Vinh Tran
dd3ea92609 Merge "Replace API level codename with number" 2022-06-28 13:39:37 +00:00
Ivan Lozano
3742d6ad9e Merge "rust: Allow rust_ffi_shared in jni_libs" 2022-06-28 12:57:05 +00:00
Paul Duffin
23477d79f6 Merge "Add protected_properties support in defaults modules" 2022-06-28 12:02:01 +00:00
Treehugger Robot
8624baab51 Merge "Move global asflags to config to share with Bazel" 2022-06-28 02:34:59 +00:00
Vinh Tran
f192474a60 Replace API level codename with number
This CL fixes a bug when Soong pass `-target` with a non-digit suffix in Clang. As mentioned in b/236753843, Clang's version parsing expects to see an integer in the target string so it ignores the
S suffix.

Test: m gwp_asan_crash_handler && make sure -target is aarch64-linux-androidS instead of aarch64-linux-android31
Test: go test -run ^TestNonDigitMinSdkVersionInClangTriple$ android/soong/cc
Bug: 236753843
Change-Id: I258ecc52083dbf3471d23cf310e0ad54440f1908
2022-06-28 01:33:18 +00:00
Liz Kammer
7128d38da5 Remove alternative stl names in bp2build
Test: bp2build.sh
Change-Id: Ie2bdac79306f9a5b50331f808f00187e172e46ab
2022-06-27 17:20:17 -04:00
Vinh Tran
8d4ae9cbf5 Merge "Deprecate depfile in gensrcs" 2022-06-27 21:17:27 +00:00
Ivan Lozano
7f67c2a665 rust: Allow rust_ffi_shared in jni_libs
Allow listing rust_ffi_shared modules as a jni_libs dependency
in conjunction with platform_api: true. This allows inclusion by
android_app modules.

Bug: 237304791
Test: android_app module builds with a rust_ffi_shared dependency.
Change-Id: I3a28e1baa522ad8f9c2aa86f1d23b19ce9f967e1
2022-06-27 16:00:26 -04:00
Colin Cross
2bce04f76f Merge "Add linux_musl arm+arm64" 2022-06-27 18:37:07 +00:00
Evgenii Stepanov
943cfcec8e Merge "Revert "Revert "Keep minimal abort when enabling integer overflow check""" 2022-06-27 18:04:37 +00:00
Cole Faust
745ae265c2 Merge "Allowlist bazel-built partition directories" 2022-06-27 17:20:38 +00:00
Vinh Tran
140d588a3d Deprecate depfile in gensrcs
All existing gensrsc modulePartners who use the property can use BUILD_BROKEN_DEP_FILE to bypass the error

Test: CI
Bug: 179452413
Fix: 179452413
Change-Id: I7cd39484b43eba693d79188b9a374f192198f90f
2022-06-27 12:07:27 -04:00
Treehugger Robot
baa2b239ae Merge "More helpful error message in test" 2022-06-27 15:30:56 +00:00
Ian Zerny
750986db96 Merge "Use R8 wrapper target and flags." 2022-06-27 08:30:11 +00:00
Lukács T. Berki
034206cb90 Merge "Add godoc for TransitionMutator." 2022-06-27 06:52:42 +00:00
Lukacs T. Berki
0e691c1119 Add godoc for TransitionMutator.
Test: Presubmits.
Change-Id: I4f2e40afe1f16f4020403d2a03930b0f51fee71d
2022-06-27 08:52:08 +02:00
Usta Shrestha
1c4a3ea497 More helpful error message in test
Test: run aquery_test.go
Bug: N/A
Change-Id: I47920d536cb81d148bf6aa6f9c340e21d1f5be86
2022-06-24 23:03:05 -04:00
Yi Kong
08b63c3886 Merge "Use LLD for Darwin host binaries" 2022-06-25 01:19:56 +00:00
Treehugger Robot
8f509bc89f Merge "Change experiments config fetch log to be a verbose log" 2022-06-24 21:00:24 +00:00
Colin Cross
a9b2aacf07 Add linux_musl arm+arm64
Add toolchains to support cross compiling to aarch64-linux-musl and
arm-linux-musleabihf.

Bug: 236052820
Test: build arm and arm64 musl sysroots
Change-Id: I47a9322929baff2492c6e8db989ece01fcbeb133
2022-06-24 13:46:36 -07:00
Evgenii Stepanov
59012814a6 Revert "Revert "Keep minimal abort when enabling integer overflow check""
This reverts commit c480fbc5ef.

When cherry-picking this change to a branch, make sure that the target:
* either DOES NOT include
  https://android-review.googlesource.com/c/platform/build/soong/+/1980451/
* or includes
  https://android-review.googlesource.com/c/platform/build/soong/+/2130354/

Bug: b/235090315
Bug: b/235181175
Bug: b/233840743
Test: libcutils.so (in symbols) includes more than 0 and less than 10 functions
      with __ubsan_handle in the name, and does not export any.

Change-Id: I4f30b5814b5460468004efcc543cc681ad0022dc
2022-06-24 13:21:40 -07:00
Treehugger Robot
cfe991d262 Merge changes I9bad2cec,I7a570894
* changes:
  cosmetic: go warnings
  paths in depfiles are relative to $OUT_DIR
2022-06-24 18:02:07 +00:00