Commit Graph

64002 Commits

Author SHA1 Message Date
Yi Kong
6a0f506f3a Allow "-mllvm foo" cflags
LLVM backend flags are a pair of flags beginning with "-mllvm". Teach
Soong to allow these flag pairs.

Test: presubmit
Change-Id: Ib2b9cb8ce8704338e14dbd1f1a656e10b86c0ee3
2023-03-12 16:31:10 +09:00
Liz Kammer
eeeb952b27 Revert "Add protected_properties support in defaults modules"
This reverts commit 799962789a.

Test: m nothing
Change-Id: Ia43c2ee216dc42ae5cf3e4d138aa9d0e05a9ee60
2023-03-10 18:53:59 -05:00
Treehugger Robot
e5f1a96ac6 Merge "Use Sec as well as Usec in ProcResInfo" am: bb7c61ff61
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/2471944

Change-Id: I0636cde135bdf5c529e1e3b5e814e95834a423b7
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-03-10 22:51:07 +00:00
Treehugger Robot
bb7c61ff61 Merge "Use Sec as well as Usec in ProcResInfo" 2023-03-10 22:19:33 +00:00
Alex Márquez Pérez Muñíz Díaz Puras Thaureaux
c353abdd53 Revert "Revert "Produce _alwayslink sibling targets through bp2b..."
Revert submission 2473787-revert-2467901-b/267214124-TLTTMLWFDS

Reason for revert: Fixed compilation errors

Reverted changes: /q/submissionid:2473787-revert-2467901-b/267214124-TLTTMLWFDS

Test: TOLIST
Bug: 271943047
Bug: 267214124

Change-Id: Ib08440377f6645cf26de4bda748d82c4dcd0b43a
2023-03-10 22:14:29 +00:00
Iván Budnik
85b9f6e7b2 Merge "Revert "Export non-apex variants of modules to make"" am: ff8c95b610
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/2481059

Change-Id: I9ac9ed805315c80175e038b6f7298a183d6874eb
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-03-10 16:47:30 +00:00
Spandan Das
9415d14b9a Merge changes I1ff171b9,Id64085d6 am: 5625e2214e
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/2481576

Change-Id: I71b6b46c091000baf78f252204d8dac841bfbec3
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-03-10 16:47:01 +00:00
Iván Budnik
ff8c95b610 Merge "Revert "Export non-apex variants of modules to make"" 2023-03-10 16:30:32 +00:00
Wei Li
cba64e4cf1 Revert "Revert "Add integration test for testing generated SBOM with .im...""
This reverts commit 68101fad40.

Reason for revert: fixed the build error and try to commit again.

Change-Id: Iec8afa95a59dc1c7ce9b48911a85667f2956fbce
2023-03-10 16:21:31 +00:00
Iván Budnik
295da16b95 Revert "Export non-apex variants of modules to make"
Revert submission 2462194-androidmk_for_apex_dependencies

Reason for revert: DroidMonitor-triggered revert due to breakage https://android-build.googleplex.com/builds/quarterdeck?branch=aosp-master&target=full-eng&lkgb=9723453&lkbb=9724944&fkbb=9723508, bug b/272663333.

Reverted changes: /q/submissionid:2462194-androidmk_for_apex_dependencies

Bug: 272663333
Change-Id: I847fa910a8d54de19954f56fe92a80a9bcd0ee18
2023-03-10 16:11:26 +00:00
Spandan Das
5625e2214e Merge changes I1ff171b9,Id64085d6
* changes:
  Add an integration test for API export from another bazel package
  Generate a BUILD file for every Android.bp file in api_bp2build workspace.
2023-03-10 16:01:23 +00:00
Liz Kammer
f92b583027 Merge "Allowlist missing dependency" am: 58f85e328b
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/2480298

Change-Id: I16aa00f734919507576ffe9940d92b3ecbd1bbbd
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-03-10 14:25:30 +00:00
Liz Kammer
58f85e328b Merge "Allowlist missing dependency" 2023-03-10 13:58:43 +00:00
Wei Li
22174e2736 Merge "Revert "Add integration test for testing generated SBOM with .im..."" am: aacfacd967
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/2480154

Change-Id: I990c345e8557c4c1fc2f2dac18bd1d3cb1f4cef4
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-03-10 07:04:34 +00:00
Cole Faust
6167240026 Merge "Make using python 2 an error" am: 944053e52d
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/2212957

Change-Id: I5a475da6231b8e43aa188592d7977390ae916be2
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-03-10 07:04:02 +00:00
Cole Faust
f183fc5413 Merge "Export non-apex variants of modules to make" am: f42c21d5f8
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/2462194

Change-Id: I9e0170a7c44dd1cd966132948c23ecd16a7a45aa
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-03-10 07:03:35 +00:00
Wei Li
aacfacd967 Merge "Revert "Add integration test for testing generated SBOM with .im..."" 2023-03-10 06:40:54 +00:00
Cole Faust
944053e52d Merge "Make using python 2 an error" 2023-03-10 06:37:24 +00:00
Cole Faust
f42c21d5f8 Merge "Export non-apex variants of modules to make" 2023-03-10 06:36:03 +00:00
Android Culprit Assistant
68101fad40 Revert "Add integration test for testing generated SBOM with .im..."
This revert was created by Android Culprit Assistant. The culprit was identified in the following culprit search session (http://go/aca-get/5b65d203-d364-4ade-aabb-1330fe45236a).

Change-Id: I10231bc624a15a2ba477712b3a5950f5fc9113e8
2023-03-10 06:18:01 +00:00
Wei Li
48a9563f77 Merge "Add integration test for testing generated SBOM with .img files." am: d48644177a
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/2453072

Change-Id: I5ab2d43deb9486d40ab541d2573d105a93f417db
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-03-10 04:59:41 +00:00
Wei Li
d48644177a Merge "Add integration test for testing generated SBOM with .img files." 2023-03-10 04:47:47 +00:00
Spandan Das
80ec5d3fb6 Merge "Convert filegroups in api_bp2build" am: 3b965d4bb0
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/2481335

Change-Id: Ia28da77f7582b02b3203b05fc878edeeea134c36
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-03-10 03:03:37 +00:00
Jooyung Han
ebd9c5907c Merge changes I0de79b6e,Idc482f94 am: f1214133ce
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/2479496

Change-Id: Ic2d398cccb0c7136fa0b8f9e4ce1ea58cc57deca
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-03-10 03:03:15 +00:00
Spandan Das
3b965d4bb0 Merge "Convert filegroups in api_bp2build" 2023-03-10 02:45:12 +00:00
Spandan Das
68bcbb588a Add an integration test for API export from another bazel package
This test ensures that API export works ok if the api file exists in a
different directory (precisely, package) than the *_api_contribution
target.

Test: tests/run_integration_tests.sh
Change-Id: I1ff171b93773b514a9a081f962606f4c28abe42e
2023-03-10 02:32:18 +00:00
Jooyung Han
f1214133ce Merge changes I0de79b6e,Idc482f94
* changes:
  Add tests for conv_linker_config
  Fix conv_linker_config with multiple input json files
2023-03-10 02:26:59 +00:00
Spandan Das
98cb85624c Generate a BUILD file for every Android.bp file in api_bp2build
workspace.

This is necessary to solve bazel package boundary issues where the api
file might exist in a different directory

Test: m api_bp2build && build/bazel/bin/bazel build --config=android
--config=api_bp2build //build/orchestrator/apis:system
Test: multitree_build system/nothing (in multitree)

Change-Id: Id64085d65a1943bdb394ea80c875db96ca373839
2023-03-09 23:15:34 +00:00
Spandan Das
bd52ea9ecf Convert filegroups in api_bp2build
api providing modules (droidstubs, cc_library etc.) can refer to the api
file via a separate filegroup module. Therefore these modules should be
generated in the api_bp2build workspace as well

Test: m api_bp2build && build/bazel/bin/bazel build
--config=api_bp2build --config=android //build/orchestrator/apis:*

Change-Id: I77371bd94a2794770b01b98aaf84b1bc42810841
2023-03-09 23:03:07 +00:00
Liz Kammer
ad1d8cb1d6 Allowlist missing dependency
Test: b build --config=android
//frameworks/av/media/audioaidlconversion/...
Fixes: 272576906
Change-Id: I8f60e6d84995db46be95a091bba45c1abdc97b47
2023-03-09 22:09:08 +00:00
Cole Faust
edc4c505f9 Make using python 2 an error
Except if BUILD_BROKEN_USES_SOONG_PYTHON2_MODULES is set, and except for
some core py2 modules that can't be removed until python2 is fully gone.

Bug: 203436762
Test: m nothing
Change-Id: I62ccb6f5687eab1e79c372ffc234a90ca5b566ac
2023-03-09 11:56:04 -08:00
Cole Faust
ad222f271a Export non-apex variants of modules to make
Currently, non-apex variants of modules that are in apexes are not
exported to make unless they're apex_available to the platform. This
means that you can't `m` those modules directly.

However, there is a workaround in the apex androidmk implementation that
emits make rules for the removed modules, but just redirects them to
build the apex itself. We want to remove that, but one of the problems
with doing so is that you can no longer `m` many modules afterwards.

To fix that, unhide the apex's dependencies from make. To ensure they're
not installed, call SkipInstall() on them, and update SkipInstall() to
be more strict by setting `LOCAL_UNINSTALLABLE_MODULE := true`.

Bug: 254205429
Test: Presubmits
Change-Id: Ib094feb2c437ad50d8319c58caa997759e7ce32f
2023-03-09 11:20:10 -08:00
Zi Wang
fccda10b92 Merge "Sort expectTargets and actualTargets by name in bp2build test" am: 5c12bdfdd3
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/2476196

Change-Id: I77bdcb2fa61d806c87244be2ecccfd0f972fc7f9
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-03-09 18:55:33 +00:00
Spandan Das
dc3f27f7b6 Merge changes Ib004c2c3,I6b63d9d0 am: d14a70d7ed
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/2475621

Change-Id: I70c01922b3d6d7d0f4f7c8ceb547acc0f6dd9b68
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-03-09 18:54:44 +00:00
Zi Wang
5c12bdfdd3 Merge "Sort expectTargets and actualTargets by name in bp2build test" 2023-03-09 18:17:51 +00:00
Spandan Das
d14a70d7ed Merge changes Ib004c2c3,I6b63d9d0
* changes:
  Create aliases for stubs in build/bazel/api_surfaces
  Add a method in bp2build to create aliases in another directory
2023-03-09 18:14:13 +00:00
Romain Jobredeaux
81771ec3d5 Merge "Call ResolveExcludes after arch-based sources computation in java.go" am: 8062140a16
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/2478276

Change-Id: Ide5af35c8e87f94fb26ba1f09e701f094272a3bb
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-03-09 15:38:51 +00:00
Romain Jobredeaux
8062140a16 Merge "Call ResolveExcludes after arch-based sources computation in java.go" 2023-03-09 14:40:58 +00:00
mattgilbride
9d6cf7e598 Disable new lint checks from Android Studio
PermissionImpliesUnsupportedChromeOsHardware
is ChromeOS specific and does not apply to the
Android tree, thus disabled.

UnsafeImplicitIntentLaunch surfaces false
positives and crashes in a specific corner case.
Disable until the related detector can surface
errors only when it is certain the intent will
get launched.

InvalidId gives false positives due to the package
name that is used in several places in platform.

Bug: 264608708
Test: TH
Change-Id: I441ba27a6fa97ed674145a051944dce4280692cd
2023-03-09 14:11:47 +00:00
Zijun Zhao
8991ae255f Merge "Revert "Revert "Enable -Wformat-insufficient-args globally""" am: add695f784
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/2478737

Change-Id: I4740c1623afde3eb67e56d503d22b8dcc5c29f20
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-03-09 08:25:13 +00:00
Zijun Zhao
add695f784 Merge "Revert "Revert "Enable -Wformat-insufficient-args globally""" 2023-03-09 07:57:15 +00:00
Jooyung Han
fba49bbf56 Add tests for conv_linker_config
to cover the recent features.
- conv_linker_config proto with empty input
- conv_linker_config proto with existing output
- conv_linker_config proto with --append
- conv_linker_config proto with --force

Bug: n/a
Test: conv_linker_config_test
Change-Id: I0de79b6e05c2608e0e2f30dfbf04d8289672f362
2023-03-09 07:46:25 +00:00
Jooyung Han
f6fd4c2823 Fix conv_linker_config with multiple input json files
`conv_linker_config proto -s` should work with multiple json input
files, but ParseDict() overwrites list fields (e.g. provideLibs), not
appending elements.

Also added a test.

Bug: 264330513
Test: conv_linker_config_test
Change-Id: Idc482f941201f15e5fc276c0ffc0dfeaa09d0cc2
2023-03-09 07:46:00 +00:00
Peter Collingbourne
ebc290c758 Respect Clang version override env vars.
Bazel fails to respect the environment variables $LLVM_PREBUILTS_VERSION
and $LLVM_RELEASE_VERSION, which are commonly used by LLVM developers
to build using a custom compiler. Fix it.

Bug: 272408039
Change-Id: I3cf18e7814ff52d526017e4fe34b17ab3d8f1080
2023-03-08 22:28:20 -08:00
Cole Faust
21b35cc1f6 Merge "Use product variables from the overridden apex" am: ae3e4cc2fd
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/2477957

Change-Id: I30240a9e42aa4a1ce671af59b2ea05b86c76bee5
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-03-09 00:46:44 +00:00
Cole Faust
ae3e4cc2fd Merge "Use product variables from the overridden apex" 2023-03-09 00:13:14 +00:00
Treehugger Robot
6ee94678b0 Merge "conv_linker_config handling existing output file" am: 36d1cd0189
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/2475245

Change-Id: Ibe2b1e1128617a4766d393e6a6cf06e36d060ffc
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-03-08 23:53:28 +00:00
Zijun Zhao
d156908820 Revert "Revert "Enable -Wformat-insufficient-args globally""
This reverts commit fa6b6843a7.

Reason for revert: Bug fix: https://googleplex-android-review.git.corp.google.com/c/platform/vendor/google/whitechapel/audio/+/21912759

Change-Id: I1c95f8d813171b500fa48c809bcffb0af7179f9a
2023-03-08 23:48:45 +00:00
Treehugger Robot
36d1cd0189 Merge "conv_linker_config handling existing output file" 2023-03-08 23:19:59 +00:00
Treehugger Robot
bac9372357 Merge "Remove slice_internals from features allow list" am: 4b68649eb0
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/2472148

Change-Id: Ibb111504b21c4e902e464acfdf88f60c8f855c1e
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-03-08 22:11:28 +00:00