Commit graph

5033 commits

Author SHA1 Message Date
Treehugger Robot
e8f7279940 Merge "Add arch variants for Intel Atom CPUs" am: 7853388422 am: 0c8d0c782c
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/2301565

Change-Id: I188dc6728fbaa9bef68d20334f9dad48a3c84f42
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-12-14 04:21:42 +00:00
Treehugger Robot
7853388422 Merge "Add arch variants for Intel Atom CPUs" 2022-12-14 03:32:13 +00:00
Treehugger Robot
a51d34e320 Merge "Workaround bazel command too long" am: b3b43822f9 am: d289dc2881
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/2351082

Change-Id: I486cfee7e1c3b01b13b62154523d43d0c649af6b
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-12-14 00:02:52 +00:00
Colin Cross
dab3e71066 Merge "Add external/musl to the bp2build allowlists" am: 7a9803cbde am: 560d8eef62
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/2337364

Change-Id: I00f0d0ea1c6aefbed0f3cd15ff57d4e15047ccaf
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-12-13 20:51:57 +00:00
Treehugger Robot
6c3f089e09 Merge "Streamline AndroidMk generation" am: 16d87f33a2 am: c8d9d50240
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/2334437

Change-Id: I80d64edb7399fc8cbf2e7c1522d6b8ae3593e15f
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-12-13 20:51:18 +00:00
Colin Cross
d5c7ddb4df Workaround bazel command too long
Write long bazel commands returned by aquery to a shell script
before executing them to work around command line length limits.

Bug: 261536423
Test: USE_HOST_MUSL=true build/bazel/ci/mixed_libc.sh
Change-Id: Id98a07800df82d1538e6b16b733488a1b9943bf3
2022-12-13 12:40:03 -08:00
Colin Cross
7a9803cbde Merge "Add external/musl to the bp2build allowlists" 2022-12-13 20:00:55 +00:00
Sasha Smundak
dcb6129269 Streamline AndroidMk generation
Add AndroidMkEmitAssignList to emit a line to assign the items from
the given list of string arrays.

Test: treehugger
Change-Id: Id5acbef38ea4e91349bd2461f226db352d4b8123
2022-12-12 18:06:49 -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
Treehugger Robot
b8422f4223 Merge "Add adbd to staging allowlist" am: 3784d14404 am: b0208fb5c7
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/2336162

Change-Id: If61f121e0b5428bea8d2b0801b66ee4c00449d4d
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-12-08 22:48:59 +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
Treehugger Robot
70d9855cfb Merge "Streamline NewBazeContext code" am: 41ec4e6548 am: 17d64e538a
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/2331702

Change-Id: Ib96d53bdafc5ac2eba7c0e60bc3f35095bfd2d0c
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-12-07 19:41:19 +00:00
Treehugger Robot
41ec4e6548 Merge "Streamline NewBazeContext code" 2022-12-07 19:11:49 +00:00
Sorin Basca
bc1cb99891 Merge "Remove unused rules for platform-robolectric-4.5.1-prebuilt" am: 50e007643b am: 7e05636029
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/2329898

Change-Id: Ieeecd4e0758c593e5c5812ebd5833f5d64fbe926
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-12-07 12:40:57 +00:00
Sasha Smundak
dc87f2db0e Streamline NewBazeContext code
Test: treehugger
Change-Id: I707636fef70d35dcb29796d3faed2168bf5adb15
2022-12-06 20:29:28 -08: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
Spandan Das
09ccdb9eaa Merge "Register singletons in api_bp2build" am: c74bf95708 am: 16909873a3
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/2322299

Change-Id: I95683c6dc38f95fcfbf99abded5df482c4dac144
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-12-06 02:03:50 +00:00
Spandan Das
c74bf95708 Merge "Register singletons in api_bp2build" 2022-12-06 00:57:06 +00:00
Spandan Das
bd7850f20e Create a new product variable to gate blueprint files am: c576383336 am: ff5b89e55d
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/2297118

Change-Id: I2da17a8f4c06a4b1bd3b1a124006ecaa1fb53b20
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-12-06 00:50:21 +00:00
Spandan Das
75e139b50e Register singletons in api_bp2build
Singleton modules are not used in this workspace (they do not implement
`ConvertWithApiBp2build`). However, we still need to add them since
there is a check in `SingletonModuleFactoryAdaptor` that depends on the
singletons being registered. We do this for bp2build as well (see
`RegisterForBazelConversion`)

This was probably always an issue in api_bp2build, but became
incompatible as a side-effect of the refactoring in aosp/2287719
that removed ctx.Register() from the newContext function.

Test: m api_bp2build --skip-soong-tests
Change-Id: I9ba1df2cc1e8ec916635e5280c66f8df68d7e79b
2022-12-05 22:27:06 +00:00
Spandan Das
c576383336 Create a new product variable to gate blueprint files
Users can use this feature by
1. Setting PRODUCT_INCLUDE_TAGS += <val> in their product mk files
2. Set
```
blueprint_packge_includes {
  match_al: ["<val>"],
}

other_module_type {name: foo}
other_module_type {name: bar}
```

bar and foo will be included if and only if <val> is set

Test: Unit tests in blueprint
Test: TH

Change-Id: I32eed4e3b5ac47fb565c62d13d8881fa984c86f4
2022-12-05 19:15:06 +00:00
MarkDacek
fe065a19f4 Add command line flag for extra bazel-built modules am: d06db5dd5b am: ad4560237e
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/2320576

Change-Id: Icbdd13a5676a4ba2681af32413e5b06eeb1f8bde
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-12-02 23:00:02 +00:00
MarkDacek
d06db5dd5b Add command line flag for extra bazel-built modules
Test: m libcore --bazel-mode-staging --bazel-force-enabled-modules=libcore and find out/bazel/ -name libcore*

Change-Id: I065696d06ce07e05300a41e133867a6e7a891b5e
2022-12-02 21:16:11 +00:00
Paul Duffin
a59846ccbd Merge "Support running bp2build tests in fixtures" am: de47ec777f am: b4c2b782d0
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/2281252

Change-Id: I74ee5cddc1dbe4b20fc7580c801f6e3feb48e1f1
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-12-02 17:04:08 +00:00
Treehugger Robot
f4c850bb1a Merge changes Ia4016240,Iba586155 am: a36589c4ca am: 1ed3a7a0f7
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/2309617

Change-Id: I43eb1f0948db5b3de6bdc3a593549df206718f7c
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-12-02 11:49:46 +00:00
Paul Duffin
4c0765a669 Support running bp2build tests in fixtures
Previously, the fixture test infrastructure was hard coded to
initialize itself in preparation for invoking the PrepareBuildActions()
method. That meant it could not be used for testing the bp2build and
apiBp2build modes which required different initialization and called a
different method.

This change extracts that behavior into a FixtureTestRunner and adds an
implementation that allows it to test the above two modes. It then uses
that to implement the runBp2BuildTestCaseWithSetup method.

The TestPrebuiltLibraryAdditionalAttrs was the only test which broke as
it supplied an invalid path to the MockFS (it does not support using a
trailing / to represent an empty build directory). So, it was modified
to add a couple of files inside those directories instead.

Test: m nothing
Change-Id: I6798a4f761160af8d1bfed81d46de9628bda3eb9
2022-12-02 11:14:17 +00:00
Treehugger Robot
a36589c4ca Merge changes Ia4016240,Iba586155
* changes:
  Allow choosing which soong_build invocations to run in the debugger
  Show module type in a module section of the Android-TARGET.mk
2022-12-02 10:36:07 +00:00
Jingwen Chen
73c3171859 Merge "Convert apex_available (for supported modules) to bazel tags." am: 8ec23f846d am: 9867290c71
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/2321580

Change-Id: I5755b47b6d486b137da60d1f2251d48737d1b49e
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-12-02 08:12:33 +00:00
Jingwen Chen
8ec23f846d Merge "Convert apex_available (for supported modules) to bazel tags." 2022-12-02 07:22:10 +00:00
Sasha Smundak
5c4729df93 Show module type in a module section of the Android-TARGET.mk
The first line of each section will be
```
include $(CLEAR_VARS)  # <module type>
...
```

Bug: 257037252
Test: treehugger
Change-Id: Iba586155b682fe4e1e5817d8397eda8f9d9c8789
2022-12-01 21:12:11 -08:00
Treehugger Robot
d405dffd7c Merge "Print error code when bazel invocation fails" am: 591c5ee0fb am: 33738d9c0e
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/2323957

Change-Id: Iccc71f415493bcd8dce337c1c6a48769e6f32828
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-12-02 01:18:36 +00:00
Treehugger Robot
591c5ee0fb Merge "Print error code when bazel invocation fails" 2022-12-02 00:10:02 +00:00
Liz Kammer
8532b38022 Merge changes Ia165e4be,I63fe74fb am: f843436455 am: f9420ac643
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/2260886

Change-Id: I7cb7bdd7d7f315741f070ec4457e6a78b8079173
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-12-01 23:05:24 +00:00
Liz Kammer
f843436455 Merge changes Ia165e4be,I63fe74fb
* changes:
  Update sanitize to not modify user properties
  Extend sanitize_test.go
2022-12-01 22:10:18 +00:00
Sasha Smundak
0e87b186cb Print error code when bazel invocation fails
Also, fix compiler warnings about deprecated ioutil.WriteFile/ReadFile
and about redundant variables

Test: treehugger
Change-Id: Iaf8f89b0e991dae8c5da403d4a1ec3a270f1ae29
2022-12-01 13:37:48 -08:00
Kevin Dagostino
e8b08ce5e3 Merge "Use existing BUILD files for test-related tools." am: dfc72a8ca2 am: 2090f1104c
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/2309887

Change-Id: I94b0128f2d992842f51bc8676cc16b3c8ab68000
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-12-01 08:32:58 +00:00
Kevin Dagostino
dfc72a8ca2 Merge "Use existing BUILD files for test-related tools." 2022-12-01 07:32:59 +00:00
Jingwen Chen
c4c34e1eab Convert apex_available (for supported modules) to bazel tags.
The tags will then be read by an aspect applied from apex attributes to
validate that the deps are explicitly opt-in to the appropriate apex.

The semantics of this is the same as the Soong apex_available property.

This also adds the "base_apex_name" attr to override_apex conversion so
that apex_available checks continue to work on the non-Google and non-Go
apex names.

Test: presubmits
Fixes: 218841706
Change-Id: I19b3637da9aa47573b252d74f62b601fbdc3784d
2022-12-01 06:25:25 +00:00
Christopher Parsons
d7e43c20d6 Merge "Revert "Revert "Add tzdata do the Bazel mixed build prod mode allowlist.""" am: e2da96f892 am: 2487ea1f52
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/2320454

Change-Id: Icd43930bb3de3e33571ad12d22a0fe6d90806643
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-11-30 20:57:11 +00:00
Sam Delmerico
043565cbde Merge "fallback to nonmixed builds for unsupported builds" am: d0b3cd0733 am: 350f6df957
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/2302774

Change-Id: I17a5db3ff57e8ed188f909ce453c52f361194ff9
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-11-30 20:24:29 +00:00
Christopher Parsons
e2da96f892 Merge "Revert "Revert "Add tzdata do the Bazel mixed build prod mode allowlist.""" 2022-11-30 20:02:52 +00:00
Sam Delmerico
d0b3cd0733 Merge "fallback to nonmixed builds for unsupported builds" 2022-11-30 19:40:59 +00:00
Yu Liu
d88efc5548 Merge "Support abi check in bazel." am: 734fefdf90 am: 67841b7226
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/2300265

Change-Id: I89680dfd0aa497c74eb483ca403967dccdfcaaea
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-11-30 18:45:27 +00:00
Treehugger Robot
f9e5636c1b Merge "Add more cases to vendor-installed module" am: d0cd326415 am: 92b787bb3f
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/2319850

Change-Id: If84c80687f795067fa6609d21f014e14f84f27ed
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-11-30 18:13:36 +00:00
Yu Liu
734fefdf90 Merge "Support abi check in bazel." 2022-11-30 17:57:42 +00:00
Treehugger Robot
d0cd326415 Merge "Add more cases to vendor-installed module" 2022-11-30 17:19:25 +00:00
Christopher Parsons
ff4cceb7bc Revert "Revert "Add tzdata do the Bazel mixed build prod mode allowlist.""
This reverts commit f8ab0321e3.

Reason for revert: Fixed underlying bugs (aosp-riscv and llvm breakages)

Change-Id: Ib7fe8e39af5bbe40bac615c815307ad9f05e83d3
2022-11-30 15:44:15 +00:00
Sam Delmerico
5150d0d309 fallback to nonmixed builds for unsupported builds
Bug: 253664931
Change-Id: I8026d0412b8dd62f55edf776f72747209ce2e955
2022-11-30 10:36:48 -05:00
Treehugger Robot
68c6270955 Merge "Revert "Allowlist build files in external/python/absl-py"" am: f219c0fc87 am: 7f61a3b638
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/2322224

Change-Id: I3825bcb5fc27cadf98174eb3a0e72c3f49455eed
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-11-30 08:50:23 +00:00
Treehugger Robot
f219c0fc87 Merge "Revert "Allowlist build files in external/python/absl-py"" 2022-11-30 07:47:26 +00:00