Commit graph

5021 commits

Author SHA1 Message Date
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
Kevin Dagostino
3e2da94e2d Use existing BUILD files for test-related tools.
Allowlist BUILD files of test-related tools so that they appear in the final bp2build workspace. This is required for Bazel test rules that are dependent on these projects.

Test: b build //prebuilts/runtime/... //tools/asuite/atest:atest-tradefed  //tools/asuite/atest/bazel/reporter/...
Change-Id: Ie34658706efe6ca7657c935528df8daef61bfc0c
2022-11-30 06:07:59 +00:00
Cole Faust
762c2def20 Revert "Allowlist build files in external/python/absl-py"
Revert submission 2308141-colefaust_run_b_from_out_folder

Reason for revert: Breaks CI due to more instances of the bazel shutdown issue
Reverted Changes:
I51c28e232:Allowlist build files in external/python/absl-py
I9e6530d95:Cd into the bazel workspace instead of using --pac...

Change-Id: Ice47ef2baaef9976546f9562dc7dd9b19b383d59
2022-11-30 05:16:30 +00:00
Krzysztof Kosiński
4e7442326d Merge "Revert "Add tzdata do the Bazel mixed build prod mode allowlist."" am: b35b88ee82 am: d867b39f76
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/2321954

Change-Id: I5f1ab496e51c4f20df88f721712f48878357279a
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-11-30 01:09:23 +00:00
Krzysztof Kosiński
b35b88ee82 Merge "Revert "Add tzdata do the Bazel mixed build prod mode allowlist."" 2022-11-30 00:19:17 +00:00
Treehugger Robot
8594199a11 Merge "Disable bazel for riscv_64" am: 00652e7570 am: acf6f6e606
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/2322093

Change-Id: I4165f4414f82fea05adb4b84a930f0c5a7e78b41
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-11-30 00:04:42 +00:00
Krzysztof Kosiński
f8ab0321e3 Revert "Add tzdata do the Bazel mixed build prod mode allowlist."
This reverts commit ff387e55fc.

Reason for revert: breaks aosp-riscv target
https://android-build.googleplex.com/builds/submitted/9347261/aosp_riscv64-userdebug/latest/view/logs/build_error.log

Change-Id: I789d0af91ab18185fbbe68616c6e10f59be4169c
2022-11-29 23:16:13 +00:00
Treehugger Robot
00652e7570 Merge "Disable bazel for riscv_64" 2022-11-29 22:58:59 +00:00
Cole Faust
2db7d85bcd Merge "Allowlist build files in external/python/absl-py" am: 5d4f066ec9 am: 59e28e489a
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/2308367

Change-Id: Ie9f33cb39b049ece57609bbe7e6e73f7febd2fd4
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-11-29 20:51:46 +00:00
Chris Parsons
428c30f89a Disable bazel for riscv_64
This product is experimental and unsupported for Bazel at this time

Test: lunch aosp_riscv64-userdebug && m nothing
Test: lunch aosp_arm64-userdebug && m nothing
Change-Id: I761afb9524f1008f9d5472d2de19bb84342e9e29
2022-11-29 15:35:56 -05:00
Cole Faust
5d4f066ec9 Merge "Allowlist build files in external/python/absl-py" 2022-11-29 20:03:20 +00:00
Yu Liu
56ccb1aecd Support abi check in bazel.
Bug: 253498204
Test: Manual and unit test.
Change-Id: Id23c4f772f67c4ba05704eaad77322133474b42b
2022-11-29 11:25:10 -08:00