Commit graph

57688 commits

Author SHA1 Message Date
Treehugger Robot
804d04f36d Merge "Allowlist more cc mainline modules blockers" am: d9cb4b746c
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/2132795

Change-Id: Id89b82571da8dc904d254cc7f761226106ad45ed
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-07-01 19:10:12 +00:00
Treehugger Robot
d9cb4b746c Merge "Allowlist more cc mainline modules blockers" 2022-07-01 18:53:07 +00:00
Treehugger Robot
9fe821b0c6 Merge "Don't pass host cross linux musl modules to Make" am: f47fe38686
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/2139099

Change-Id: I97e79b3df1e605d20276f06c407a3ce74a1edfd8
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-07-01 17:37:55 +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
82a2240a5c Merge "Remove alternative stl names in bp2build" am: 281d421f41
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/2132718

Change-Id: I1b10a03236cc2e83aa627e0b7cf70bbc1a3c74b5
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-07-01 15:11:46 +00:00
Treehugger Robot
281d421f41 Merge "Remove alternative stl names in bp2build" 2022-07-01 14:54:20 +00:00
Alexei Nicoara
663d7560da Merge "Removing comment lines from apex_manifest.json" am: f6152a161b
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/2142072

Change-Id: I1009e2d99e417e25e48b24345810f32f5dcaf818
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-07-01 14:30:12 +00:00
Alexei Nicoara
f6152a161b Merge "Removing comment lines from apex_manifest.json" 2022-07-01 14:11:27 +00:00
Treehugger Robot
f4da9403f3 Merge changes I93edfd61,Icd23b542,I58c84607,Icfa73a75 am: 4d2f767217
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/2139101

Change-Id: I35551b07799c29cb56e2ffdaf7c1693b23f4f8d5
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-07-01 13:10:11 +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
966994af92 Reformat the test to make them more readable. am: e3cf1abefc
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/2142353

Change-Id: I5dc19256f8603101845dc56a53b87902049e3042
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-06-30 23:30:24 +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
4e99f88d41 Merge "Add support and tests for export_*_lib_headers" am: 130d98f8b2
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/2134738

Change-Id: I7573ebe34941edc361d2f5f13ad55ee9394f06e1
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-06-30 17:49:47 +00: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
5cc4165702 Merge "null build upon repeated mixed build" am: 86363835ae
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/2095253

Change-Id: I08d32ec6550688fce86631a942add1de2d243392
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-06-30 14:31:15 +00:00
Usta Shrestha
86363835ae Merge "null build upon repeated mixed build" 2022-06-30 14:11:20 +00:00
Sasha Smundak
ab8c3df31a Fix config string for the generic target. am: 9d46dcf908
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/2121034

Change-Id: I7a11aae2cab98e774696a15e8fa65ba485461e13
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-06-30 05:52:59 +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
98dcee0d82 Merge "Add a broad warning about missing LOAS creds" am: 9c4216a4c9
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/2137974

Change-Id: Iebb1fce62294e180f6885ccded90339c2f7bfb23
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-06-29 23:01:48 +00:00
Kousik Kumar
9c4216a4c9 Merge "Add a broad warning about missing LOAS creds" 2022-06-29 22:40:36 +00:00
Xin Li
42307c80c7 Merge "Merge tm-dev-plus-aosp-without-vendor@8763363" into stage-aosp-master 2022-06-29 21:16:54 +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
Paul Duffin
4edbd9f2ae Avoid modifying Compile_dex property am: e7b1f5b0a5
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/2139572

Change-Id: I23e617156f22bc8ca4c44e419cf6430f75633b5f
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-06-29 17:02:14 +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
7028b50308 Merge "Refactor apexBundle code." am: 114ad30d76
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/2138053

Change-Id: Ic377908763cc1d8ab33ae55c9fa7887facd68903
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-06-29 07:55:48 +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
948b52c27e Merge "Add build/bazel_common_rules to mock bazel directories." am: f04c8b671a
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/2139104

Change-Id: Ia98170328a8b9a0fb7206d1d591db07e180e994a
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-06-29 01:26:26 +00:00
Treehugger Robot
f04c8b671a Merge "Add build/bazel_common_rules to mock bazel directories." 2022-06-29 00:50:24 +00:00
Colin Cross
99df3a8832 Reland: Don't use hwasan for non-bionic arm64 targets am: 88a029f710
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/2139096

Change-Id: I672df301aaab7e7ce15e29799c632fbb4c1c0a90
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-06-29 00:25:52 +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
Xin Li
313fdb5812 Merge tm-dev-plus-aosp-without-vendor@8763363
Bug: 236760014
Merged-In: I1421fb0dbcdb759281259abfae7bddc9aecdaa56
Change-Id: If059be00e6bdaaa94171b456afae1d585540639c
2022-06-28 21:23:06 +00: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
61c55273cb Merge "Replace API level codename with number" am: dd3ea92609
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/2135992

Change-Id: I0765f56eae314bc392bc9470ab549bd64922a8df
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-06-28 14:12:06 +00:00
Vinh Tran
dd3ea92609 Merge "Replace API level codename with number" 2022-06-28 13:39:37 +00:00
Ivan Lozano
b3123979d2 Merge "rust: Allow rust_ffi_shared in jni_libs" am: 3742d6ad9e
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/2136889

Change-Id: Ib9d2066c0f4791b2aaa635c9775d4f7654b564de
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-06-28 13:15:19 +00:00
Ivan Lozano
3742d6ad9e Merge "rust: Allow rust_ffi_shared in jni_libs" 2022-06-28 12:57:05 +00:00
Paul Duffin
d19d88f945 Merge "Add protected_properties support in defaults modules" am: 23477d79f6
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/2085469

Change-Id: Ib4517cf12814f24082b1880e86eda5beb0943d4e
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-06-28 12:24:52 +00:00
Paul Duffin
23477d79f6 Merge "Add protected_properties support in defaults modules" 2022-06-28 12:02:01 +00:00
Treehugger Robot
f31263b447 Merge "Move global asflags to config to share with Bazel" am: 8624baab51
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/2134932

Change-Id: I45ae96d942b8ed4b582389bf50964cf9a823f405
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-06-28 03:01:13 +00:00
Treehugger Robot
8624baab51 Merge "Move global asflags to config to share with Bazel" 2022-06-28 02:34:59 +00:00