Commit graph

62339 commits

Author SHA1 Message Date
Cole Faust
8ec823cba1 Allow adding extra tradefed options in the Android.bp file
Some tests need to add custom tradefed options, but still want to
keep most of the soong autogenerated tradefed xml file.

Expose a test_options: { tradefed_options: [...] } property that
will allow tests to add more options to the autogenerated xml file.

Fixes: 184895128
Test: go test, and verified that the ninja files did not change for aosp_arm64
Change-Id: I75f7eb002c8325ce7cdc76e12e76e16195320620
2022-12-09 15:23:26 -08:00
Colin Cross
20c89f1adf Add external/musl to the bp2build allowlists
Add external/musl to the bp2build allowlists.  Disable libc_musl_sysroot,
which fails due to a $(locations) reference to a glob that is
unsupported in bazel.

Bug: 259266326
Test: //external/musl:libc_musl builds
Change-Id: Icf0ea2f89854ba3605096dcaa95c1c829af34dc3
2022-12-09 13:58:58 -08:00
Colin Cross
65ebc429e0 Add support for headers from dependencies to bazel cc_object
The libc_musl_crt* cc_object modules use header_libs to add
headers to the search path.  Propagate static_libs, shared_libs
and header_libs to includes_deps.

Bug: 259266326
Test: TestCcObjectHeaderLib
Change-Id: I8db4d6886761426d3ece38c43ac868d3248f7a9f
2022-12-09 13:58:58 -08:00
Colin Cross
c5075e917e Add bp2build support for cc_prebuilt_object
Add bp2build support for cc_prebuilt_object to allow buiiding
musl crt objects that use prebuilt clang_rt.crtbegin and
clang_rt.crtend.

Bug: 259266326
Test: //extenral/musl:libc_musl builds
Change-Id: Ic2b0375bc6e7336d31c9e2cf51bdc2ea894185aa
2022-12-09 13:58:58 -08:00
Trevor Radcliffe
682bfb2923 Revert "bp2build conversion for Sanitize.Integer_overflow"
This reverts commit f82482db31.

Reason for revert: http://b/261935841

Change-Id: I8155c2b17c6052b734efea43be06b1099ffedd32
2022-12-09 20:39:12 +00:00
Xin Li
c0f432edfd Merge Android 13 QPR1
Bug: 261731544
Merged-In: Ic5a553e1442b22ad2a57456d34cbec6a14e8a950
Change-Id: I225d7c223d7851298f376051dd7c0c21ccf614dd
2022-12-09 10:23:03 -08:00
Jason Wu
f0ec631046 Upload soong_build_metrics
Test: m nothing
Test: m --bazel-mode-dev
Test: Verified soong_build_metrics is available in local metrics tables from builds that include this CL

Bug: 257537925
Change-Id: Ic5419ecb203c9b62457e1c553d592ba593a9bfff
2022-12-09 11:48:26 -05:00
Usta Shrestha
572ecec696 scan and run test_ methods
Bug: N/A
Test: run bootstrap_test.sh
Change-Id: I3f810277763144d4a6a2f9c1d08bed3a29b7598e
2022-12-09 01:41:49 -05:00
Treehugger Robot
b0208fb5c7 Merge "Add adbd to staging allowlist" am: 3784d14404
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/2336162

Change-Id: Ib32fc309dd001c112e57c42ef2de7142b46b3208
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-12-08 22:24:54 +00:00
Treehugger Robot
3784d14404 Merge "Add adbd to staging allowlist" 2022-12-08 22:07:06 +00:00
Chris Parsons
9f0e552bb9 Add adbd to staging allowlist
Bug: 254081374
Test: lunch aosp_arm64 && m --bazel-mode-staging
Test: Manual inspection of `ninja -f out/combined-aosp_arm64.ninja -t commands com.android.adbd | grep "bazel"` after the above command
Change-Id: Ic5a553e1442b22ad2a57456d34cbec6a14e8a950
2022-12-08 14:34:32 -05:00
Usta Shrestha
b8f513ace7 cosmetic: getting rid of SC2155 warnings am: 4e17a2e503
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/2334104

Change-Id: Id835949f26154928a7a09694bda27dd8af743a4c
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-12-08 19:05:42 +00:00
Usta Shrestha
4e17a2e503 cosmetic: getting rid of SC2155 warnings
https://github.com/koalaman/shellcheck/wiki/SC2155

Bug: N/A
Test: bootstrap_test.sh
Change-Id: I3ce7ab2c7b2cf827e32c3cde0dfbcc932fc48039
2022-12-08 01:21:08 -05:00
Treehugger Robot
93ca271c21 Merge "Vendor apex sets "vndkVersion" when it uses vndk libs" am: da62908229
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/2330035

Change-Id: Ie7557b723485adc600f52e5bbd585a6ce0d4721d
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-12-08 03:24:16 +00:00
Treehugger Robot
da62908229 Merge "Vendor apex sets "vndkVersion" when it uses vndk libs" 2022-12-08 03:06:30 +00:00
Bob Badour
333304310d Merge "Add license kind for Linux-syscall-note" am: fb575f21a3
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/2323844

Change-Id: Icf19be64b094734ebc691c1a63d5065d54fd7eb7
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-12-08 01:51:04 +00:00
Bob Badour
fb575f21a3 Merge "Add license kind for Linux-syscall-note" 2022-12-08 01:23:19 +00:00
Jooyung Han
d045ebca4c Vendor apex sets "vndkVersion" when it uses vndk libs
Vendor apex with "use_vndk_as_stable:true" sets the dependency in
"requireNativeLibs: ":vndk"". But this isn't enough because the APEX
won't work if VNDK version mismatches.

Now, when a vendor apex uses VNDK libs, "vndkVersion" is set as well in
apex_manifest so that apexd can abort the installation/staging when
device's VNDK version mimatches.

Bug: 222620439
Test: VendorApexHostTestCases
Test: built vendor apex how has "vndkVersion" field in its
 apex_manifest
Change-Id: If03340c230efe854ab932cdf472c276f7646ad0c
2022-12-08 09:42:03 +09:00
Bob Badour
801000e9c8 Add license kind for Linux-syscall-note
Only to be used in contexts confirmed by lawyers where the sycall note applies.

Test: m droid dist
Change-Id: I2fa6859307a471c169273ee70583e0b7331893ca
2022-12-07 12:42:51 -08:00
Mark Dacek
c14f33e15e Merge "Add skip-metrics-upload flag to soong_ui." am: a366e48bc3
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/2324256

Change-Id: Ie50530789031e98427d191db9b42cea3b9132807
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-12-07 19:23:32 +00:00
Treehugger Robot
17d64e538a Merge "Streamline NewBazeContext code" am: 41ec4e6548
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/2331702

Change-Id: I59a2d5fc6bda7cbf4786f919d3068c8ed49e5ea5
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-12-07 19:20:53 +00:00
Mark Dacek
a366e48bc3 Merge "Add skip-metrics-upload flag to soong_ui." 2022-12-07 19:18:12 +00:00
MarkDacek
d0e7cd3d96 Add skip-metrics-upload flag to soong_ui.
Bug: b/261203925
Test: m libcore --skip-metrics-upload
Change-Id: I0b10027a0f359e682116c2ebb884808c65430dd0
2022-12-07 19:12:02 +00:00
Treehugger Robot
41ec4e6548 Merge "Streamline NewBazeContext code" 2022-12-07 19:11:49 +00:00
Treehugger Robot
53895e63d2 Merge "Create soong_injection files in ReadWrite mode" am: a0206f3d29
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/2331062

Change-Id: I08c8d1bcb6bbe9816e1bea259c296ba9bcf861cd
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-12-07 17:34:20 +00:00
Treehugger Robot
a0206f3d29 Merge "Create soong_injection files in ReadWrite mode" 2022-12-07 17:17:12 +00:00
Trevor Radcliffe
a63212031d Merge "bp2build conversion for Sanitize.Integer_overflow" am: 4fb00eea27
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/2324333

Change-Id: Iec2152be64245d9771d6fcb8858c17e82c4cf4db
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-12-07 16:09:59 +00:00
Trevor Radcliffe
4fb00eea27 Merge "bp2build conversion for Sanitize.Integer_overflow" 2022-12-07 15:47:37 +00:00
Sorin Basca
7e05636029 Merge "Remove unused rules for platform-robolectric-4.5.1-prebuilt" am: 50e007643b
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/2329898

Change-Id: If2fe9b5b93d82c27295c3e7c558d7c0001668f90
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-12-07 12:20:40 +00:00
Sorin Basca
50e007643b Merge "Remove unused rules for platform-robolectric-4.5.1-prebuilt" 2022-12-07 12:01:58 +00:00
Sasha Smundak
dc87f2db0e Streamline NewBazeContext code
Test: treehugger
Change-Id: I707636fef70d35dcb29796d3faed2168bf5adb15
2022-12-06 20:29:28 -08:00
Treehugger Robot
b607b482ca Merge "Set the test suite for Robolectric tests" am: c7e4dcf1e8
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/2308586

Change-Id: If10b40812101a971040b92b0a30b69898bc0c44c
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-12-07 01:40:51 +00:00
Spandan Das
067210f70d Create soong_injection files in ReadWrite mode
The synthetic soong_injection workspace is shared between api_bp2build
(used in API export) and bp2build (used in API domain analysis which
runs mixed builds by default). The former creates them in ReadOnly mode,
but the latter creates them in ReadWrite mode (to allow users to
edit/experiment). To prevent errors in the end-to-end builds in
multittree, make api_bp2build create these files in ReadWrite mode as
well.

Test: mulittree_build locally
Change-Id: I8766d88951a3b625739e4dc12d468450ad7322ea
2022-12-07 01:25:03 +00:00
Treehugger Robot
c7e4dcf1e8 Merge "Set the test suite for Robolectric tests" 2022-12-07 00:49:03 +00:00
Trevor Radcliffe
189faa28f2 Merge "Add test that shared libs don't propagate ubsan rt" am: 3a69f93987
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/2302617

Change-Id: I1570eb535004743a404c235defd2fb41255c4506
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-12-06 23:12:29 +00:00
Trevor Radcliffe
3a69f93987 Merge "Add test that shared libs don't propagate ubsan rt" 2022-12-06 21:29:03 +00:00
Wei Li
22c423d3f0 Merge "Add soong integration test for Bazel-built apexes of 64bit only products." am: 007d75aab0
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/2329413

Change-Id: I1712d90c4a92ed1071a5eb89b4f3d9c85cb8b9d4
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-12-06 20:14:55 +00:00
Trevor Radcliffe
f82482db31 bp2build conversion for Sanitize.Integer_overflow
and Sanitize.Misc_undefined.

This is a redo of aosp/2277186 with changes to account for issues
in mixed builds. Specifically, for now we're disabling mixed builds
for modules that use ubsan. This bug tracks enabling it:
b/261058727.

Bug: 253428057
Test: Unit tests
Change-Id: I9dbec1d99353f8cbe6751d5241283ab19592dc27
2022-12-06 20:13:21 +00:00
Wei Li
007d75aab0 Merge "Add soong integration test for Bazel-built apexes of 64bit only products." 2022-12-06 19:28:46 +00:00
Spandan Das
fb53662756 Merge changes I5b4e5570,I1de4b322 am: d53878e2f0
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/2323963

Change-Id: Ia6a2a1e821763dea43f059a06172b68502ff5163
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-12-06 17:32:29 +00:00
Spandan Das
d53878e2f0 Merge changes I5b4e5570,I1de4b322
* changes:
  Add an api_files property in java_api_library
  Use relaxed check for prebuilt src
2022-12-06 16:48:07 +00:00
utzcoz
682bc9d4c9 Remove unused rules for platform-robolectric-4.5.1-prebuilt
platform-robolectric-4.5.1-prebuilt was removed by
https://android-review.googlesource.com/c/platform/prebuilts/misc/+/2314082,
and soong's special rules for platform-robolectric-4.5.1-prebuilt
is not needed anymore.

Test: m

Signed-off-by: utzcoz <utzcoz@gmail.com>
Change-Id: I953ec775505ccd0924f5a3f7fc29bdc7e573d335
2022-12-06 21:43:17 +08:00
Treehugger Robot
612a0e28e5 Merge "Add option to override defaultManifestVersion" am: 720e0ce5e2
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/2323675

Change-Id: I254fb1d934928aa069139eaf4377e84630d34bfa
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-12-06 12:43:00 +00:00
Treehugger Robot
720e0ce5e2 Merge "Add option to override defaultManifestVersion" 2022-12-06 12:06:18 +00:00
Treehugger Robot
e420ae7d5c Merge "Add a build rule for opt-in ABI dumps" am: 218468755d
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/2306143

Change-Id: I3119939972a49046a0661c8973cfc9707602675f
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-12-06 07:56:57 +00:00
Treehugger Robot
218468755d Merge "Add a build rule for opt-in ABI dumps" 2022-12-06 07:22:56 +00:00
Sahana Rao
16ebdfdf0f Add option to override defaultManifestVersion
Add an option to override defaultManifestVersion using environment
variable. The environment variable will be used to override the apex
version locally when developing a desert release feature in
mainline-prod branch. Overriding the apex version in mainline-prod
branch allows us to install apex built in mainline-prod branch to device
running code from git_master which has a higher apex version than
mainline-prod branch.

Bug: b/233608815
Bug: b/196860838
Test: presubmit
Test: go test -v ./build/soong/apex/
Change-Id: I8ac2aae2b6b29da7f09db6edb893e0a0f0691e51
2022-12-06 07:15:44 +00:00
Wei Li
94bf3158fd Add soong integration test for Bazel-built apexes of 64bit only products.
Bug: 253223400
Test: build/soong/tests/apex_comparison_tests.sh module_arm64only
Change-Id: I3127aa2b8699f0af16c05036cab94a3054ccc5a1
2022-12-05 20:53:25 -08:00
Treehugger Robot
05e907fba2 Merge "Fix incorrect command line from avb_add_hash_footer" am: 4aa91098c2
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/2324823

Change-Id: I9c844fc9abad9a470fecf56e50ec843a8fda356a
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-12-06 02:11:47 +00:00
Treehugger Robot
4aa91098c2 Merge "Fix incorrect command line from avb_add_hash_footer" 2022-12-06 02:02:59 +00:00