Commit graph

62339 commits

Author SHA1 Message Date
Spandan Das
16909873a3 Merge "Register singletons in api_bp2build" am: c74bf95708
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/2322299

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

Change-Id: I63fdec1754d63249732ebc83e04a9fc3b7bd5d8e
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-12-06 00:18:11 +00:00
Spandan Das
c082eb8eac Add an api_files property in java_api_library
java_api_contribution is useful to java_api_library when the api files
are not colocated.

If they are colocated (e.g. in Multi-tree assembled api_surfaces
directory), it is useful to refer to them directly without nedding to
create a java_api_contribution module.

Test: In build/soong, go test ./java
Change-Id: I5b4e557068a1e5c71a80c76452030e72ec83a696
2022-12-05 22:27:06 +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
6830f6be7e Use relaxed check for prebuilt src
The source stub.so might not exist during Soong analysis in Multi-tree.
This will be provided by the build orchestrator in the combined ninja
execution.

Test: TH
Change-Id: I1de4b322fa8e456071630bf86c5fbaab063d44ba
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
Liz Kammer
7c5d1591bc Make more cc tests parallel
Test: go test soong cc tests
Change-Id: I5ade33b1579ae46571728e051471147e627a7d38
2022-12-05 13:43:29 -05:00
Liz Kammer
8e4f634b74 Merge changes If7b81296,I3ddc53f0 am: c03724c442
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/2279411

Change-Id: Icde055570703c486cb3e46e443b67cd6549939c8
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-12-05 14:37:35 +00:00
Liz Kammer
c03724c442 Merge changes If7b81296,I3ddc53f0
* changes:
  Add more afdo testing
  Extend lto_test
2022-12-05 13:48:46 +00:00
Jiyong Park
b0fda8f594 Fix incorrect command line from avb_add_hash_footer
This change fixes an error that the command line generated from
avb_add_hash_footer contains "a_file --prop_from_file prop_name:a_file",
which is invalid. The file should be an implicit dependency.

Bug: 256148237
Test: N/A
Change-Id: Id0a832bd552d5d79cbc79f250681928140255f91
2022-12-05 17:12:58 +09:00
TreeHugger Robot
b9baa7d914 Merge "Skip TQ1A.221205.012" into stage-aosp-master 2022-12-03 00:47:48 +00:00
MarkDacek
ad4560237e Add command line flag for extra bazel-built modules am: d06db5dd5b
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/2320576

Change-Id: I72c352247003b412abac22b611f704ccf4b167bb
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-12-02 22:29:42 +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
Xin Li
e8e045ba87 Skip TQ1A.221205.012
Bug: 255404110
Merged-In: I442e34d035da867ba36462f8e714c4d3c655af2f
Merged-In: Ic7d5d5ba55f5bba5cc2d0866a7a25f753f3428f8
Change-Id: Ie332e70b1c907dfb13b5b52507308b33fc8a9c7b
2022-12-02 20:26:46 +00:00
Mark Dacek
2c70fedb2b Merge "Add build-command arg to soong_ui." am: ea80b16cd9
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/2324335

Change-Id: Ib4237f6b37db3d82e39f5f091d84d6217c75e422
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-12-02 20:07:21 +00:00
Mark Dacek
ea80b16cd9 Merge "Add build-command arg to soong_ui." 2022-12-02 19:16:02 +00:00
Liz Kammer
6a9abc142e Merge "Disable misc ubsan Soong test on mac" am: 3b8b7803a8
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/2324499

Change-Id: I8c704176c53ddeb468c8408abf3af848ba9d0630
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-12-02 18:54:12 +00:00
Liz Kammer
3b8b7803a8 Merge "Disable misc ubsan Soong test on mac" 2022-12-02 18:06:22 +00:00
Yu Liu
548051b706 Merge "Support abi check in mixed build." am: 3f32b38cfb
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/2313458

Change-Id: I090dcf213d497082c29f475527bb7fdcaece6b4b
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-12-02 16:34:33 +00:00
Paul Duffin
b4c2b782d0 Merge "Support running bp2build tests in fixtures" am: de47ec777f
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/2281252

Change-Id: I31483e54acadf30b2444ef127ebf2b5f9cd6fa3e
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-12-02 16:34:12 +00:00
Yu Liu
3f32b38cfb Merge "Support abi check in mixed build." 2022-12-02 16:23:21 +00:00
Paul Duffin
de47ec777f Merge "Support running bp2build tests in fixtures" 2022-12-02 15:56:33 +00:00
Liz Kammer
8c8e8d5207 Add more afdo testing
Test: go test soong cc tests
Change-Id: If7b812962f5dfbf51c799225356862cbaea33e5d
2022-12-02 10:40:43 -05:00
Liz Kammer
81d0950934 Extend lto_test
Test: go test soong cc tests
Change-Id: I3ddc53f0984b7cd4b40ff17b1f93a9b4db62f94c
2022-12-02 10:39:43 -05:00
Parth Sane
22f2f9f372 Merge "Add support for AIDL traces in Priv apps" am: 0da806fe7a
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/2311647

Change-Id: I7a3407cf00910481d759d6dc290b9434a18ccac6
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-12-02 15:25:09 +00:00
Parth Sane
0da806fe7a Merge "Add support for AIDL traces in Priv apps" 2022-12-02 15:02:38 +00:00
Liz Kammer
2a109bc820 Disable misc ubsan Soong test on mac
Test: run on mac build
Change-Id: I869775ce76fd619557bf6833f99c5b924bcc5a8e
2022-12-02 09:36:01 -05:00
Treehugger Robot
1ed3a7a0f7 Merge changes Ia4016240,Iba586155 am: a36589c4ca
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/2309617

Change-Id: I14b21791d36601bc832c382391b003a1e9b4cd71
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-12-02 11:18:24 +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
9867290c71 Merge "Convert apex_available (for supported modules) to bazel tags." am: 8ec23f846d
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/2321580

Change-Id: I813778da920431fe7a46384782ffbfc19e435444
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-12-02 07:41:55 +00:00
Jingwen Chen
8ec23f846d Merge "Convert apex_available (for supported modules) to bazel tags." 2022-12-02 07:22:10 +00:00
nelsonli
3f97ea2ed9 Set the test suite for Robolectric tests
Mark Robolectric tests as belonging to the `robolectric-tests` suite
since tools expect test modules to belong to at least one suite.
Note that tests not marked with a suite implicitly get annotated with
the `null-suite`.

This is also required for Atest Bazel mode which only includes files of
test modules with a non-empty suite attribute in the Tradefed test
directory.

See aosp/2181295 for more details.

Test: m out/target/product/vsoc_x86_64/module-info.json
Bug: 222437352
Bug: 228799625
Change-Id: I9dedaf1661a351c32d2affbaf1f9b89d672acc3a
2022-12-02 14:55:57 +08:00
Sasha Smundak
4cbe83ad5e Allow choosing which soong_build invocations to run in the debugger
When `SOONG_DELVE_STEPS` enviromnment variable is set in addition
to `SOONG_DELVE`, only given soong_build invocations ('steps') are
run in the debugger.
Also, make bootstrapBlueprint code table-driven.

Test: treehugger
Change-Id: Ia4016240ca9e88c2a85c6d06851c5bba30e7b2b5
2022-12-01 21:12:11 -08: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
Kiyoung Kim
323f62701b Rename export_headers of cc_api_variant am: 62ed3dd5f8
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/2324813

Change-Id: I80d71ed7fb64b76c50a69f14b7f7fe32434cad16
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-12-02 04:46:43 +00:00
MarkDacek
b96561eed1 Add build-command arg to soong_ui.
This is a duplicate of aosp/2313558 - this failed due to
a double-commit occurring somewhere in the chain.

Test: m nothing
Test: b build libcore:all
Change-Id: Ie5f1029429fa31170d1051ca3e7fc038ef637702
2022-12-02 04:34:43 +00:00
Kiyoung Kim
62ed3dd5f8 Rename export_headers of cc_api_variant
Rename export_headers of cc_api_variant as export_include_dirs, because
the property only supports header directory.

Bug: 244244438
Test: Cuttlefish vendor build succeeded
Change-Id: I6e1468f51694150c70d3b0def2917f0ba74f7ea0
2022-12-02 10:31:48 +09:00
Treehugger Robot
7860257d28 Merge "Remove workaround for -fexceptions and stack MTE" am: a8ad378abc
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/2322242

Change-Id: Ifb154653db358f38d488d27479aaec96de70355f
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-12-02 01:23:32 +00:00
Treehugger Robot
a8ad378abc Merge "Remove workaround for -fexceptions and stack MTE" 2022-12-02 00:52:41 +00:00
Treehugger Robot
cc701fff9c Merge "Allow hwasan variant for vendor_snapshot_static modules" am: 6721ab5d40
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/2314109

Change-Id: I5256ece2e93fca05c04e45ba00a5d1d04ef8f137
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-12-02 00:49:11 +00:00
Treehugger Robot
33738d9c0e Merge "Print error code when bazel invocation fails" am: 591c5ee0fb
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/2323957

Change-Id: I9cac27c590dbd38637a7983aaae26b1516dad57c
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-12-02 00:49:00 +00:00
Treehugger Robot
6721ab5d40 Merge "Allow hwasan variant for vendor_snapshot_static modules" 2022-12-02 00:27:22 +00:00
Treehugger Robot
591c5ee0fb Merge "Print error code when bazel invocation fails" 2022-12-02 00:10:02 +00:00
Treehugger Robot
a2a80fe6df Merge "soong: add os name to cc_genrule" am: 5195178376
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/2322616

Change-Id: I84228714ba317d69272279e82d74f15d0c1a4858
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-12-01 23:42:47 +00:00
Treehugger Robot
5195178376 Merge "soong: add os name to cc_genrule" 2022-12-01 22:55:33 +00:00
Liz Kammer
f9420ac643 Merge changes Ia165e4be,I63fe74fb am: f843436455
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/2260886

Change-Id: I31b85e9060f26b168a66ade0bea8be9ff7c4e745
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-12-01 22:36:57 +00:00
Florian Mayer
06aca9b448 Remove workaround for -fexceptions and stack MTE
The upstream change was merged in https://r.android.com/2322236

Bug: 174878242
Change-Id: Ia23d4a9d6ef54ed2c286e0b1becec1f35df75160
2022-12-01 14:23:23 -08: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