Commit graph

66197 commits

Author SHA1 Message Date
Dan Albert
e82234ed50 Include tags in trace data.
The tags item in the trace data is arbitrary metadata added to `build`
steps by Soong (and my Kati via `.KATI_TAGS` target-specific
variables). Include this in the perfetto trace so we can analyze it.

Bug: http://b/259130368
Test: End to end test tracing cp time in dist targets
Change-Id: I85d33f579dc40dbae616b24cd4cb150d86262470
2023-06-21 20:17:57 +00:00
Treehugger Robot
0acd271057 Merge "Remove unnecessary variable" am: 98bb2768b9
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/2628590

Change-Id: Ia9da45204dddb35ccb0cc60b69cfc40d339e928d
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-06-21 19:02:17 +00:00
Treehugger Robot
98bb2768b9 Merge "Remove unnecessary variable" 2023-06-21 18:13:38 +00:00
Nikita Ioffe
11a9c2c763 Update neverallow rules for init_first_stage
We are introducing Microdroid-specific variant of the init_first_stage,
and need to add init_first_stage_defaults and
init_first_stage.microdroid to the neverallow rule.

Bug: 287206497
Test: build com.android.virt APEX
Change-Id: I88543256ab0479d4676865ebb1d16d9d39f1f455
2023-06-21 16:51:09 +01:00
Alix
e266787aed bp2build conversion for rscript srcs in cc modules
Bazel does not support using .rscrip/.fs files as cc srcs.
For a module foo with foo srcs, Bp2build will create a bazel
target of rule class rscript_to_cpp with name foo_renderscript
which will have only the renderscript files as srcs.
Bp2build will also create a target foo with the expected cc rule class.
The foo target will have all other src files as srcs and will also
have the target foo_renderscript as another src.

Bug: 210509914
Test: bp2build testing & b build target rstest-latency
Change-Id: Ifdc55051a3595f5fcf54eab8b59e11e9351e141c
2023-06-21 14:58:10 +00:00
MarkDacek
396491eee4 Add bes-id to soong. Also renames the proto field.
This is for integration with BES for bazel test metrics.
Bug: 287102416
Test: b build libcore:all --invocation_id=`uuidgen`
Test: build/bazel/scripts/analyze_build (to verify it's set)

Change-Id: I541b2d65bfa85718fc916582e0540384ae3810d9
2023-06-21 14:48:17 +00:00
Paul Duffin
c0036491cd Remove reference to the deprecated and disabled Typo issue
Metalava no longer looks for common typos. It relies on the code
analyzers that run on Gerrit to detect them.

Bug: 288072162
Test: m checkapi
Change-Id: I08eca8008af39ebe69442db419ebd3d3378aa0de
2023-06-21 15:42:49 +01:00
Mårten Kongstad
e1a30716f8 Merge "Rename aconfig intermediate file (json -> pb)" am: 8f55732317
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/2631114

Change-Id: I33c2a5652d3224acc6150a3e0c4d5d43c9982adf
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-06-21 14:15:38 +00:00
Mårten Kongstad
8f55732317 Merge "Rename aconfig intermediate file (json -> pb)" 2023-06-21 13:30:20 +00:00
Lukacs T. Berki
200e0a8672 Handle errors from RunBlueprint(). am: c357c81f48
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/2627181

Change-Id: Icaec3e02a1bda4985bce2e03fa2d1a6295e82104
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-06-21 11:48:17 +00:00
Lukacs T. Berki
c357c81f48 Handle errors from RunBlueprint().
Bug: 244730498
Test: Presubmits.
Change-Id: I264f1e4bd989b1c219800eec3be007c3f114c6d1
2023-06-21 07:59:52 +00:00
Mårten Kongstad
c89e924ec2 Rename aconfig intermediate file (json -> pb)
aconfig's intermediate file ("the cache") has changed format from json
to protobuf. Rename the generated file accordingly.

Bug: 283910447
Test: m nothing # run soong tests
Change-Id: Iaff408774cfba4231dfb951b112b554466b8e884
2023-06-21 08:32:53 +02:00
Treehugger Robot
f0b01a78cd Merge "Remove PRODUCT_INSTALL_EXTRA_FLATTENED_APEXES" am: be24d2733c
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/2626018

Change-Id: I5692696e468a73a89fbf20bc03ed93b0f86f3ef8
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-06-21 06:08:08 +00:00
Jooyung Han
eec1b3fe26 Remove "flattened" apexes
Now soong doesn't build "flattened" apexes.

Bug: 279835185
Test: m nothing (soong tests)
Test: m && launch_cvd (cuttlefish)
Change-Id: Id3c540ece1a15cecacc185da9aa17285edd2f493
2023-06-21 14:29:26 +09:00
Treehugger Robot
be24d2733c Merge "Remove PRODUCT_INSTALL_EXTRA_FLATTENED_APEXES" 2023-06-21 05:18:58 +00:00
Usta (Tsering) Shrestha
ed1c6a1214 Merge "Disallow java_test_host dependant" am: f615e900e9
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/2631270

Change-Id: I005ba31f45faede39463e58d5d127fbeb63a5dc9
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-06-21 00:58:27 +00:00
Spandan Das
60133b3070 Symlink external/bazelbuild-rules_go in mock tests
Test: TH
Change-Id: I067bda143252c66bfac63699d51ca3b80f5a5f63
2023-06-21 00:48:05 +00:00
Usta (Tsering) Shrestha
f615e900e9 Merge "Disallow java_test_host dependant" 2023-06-21 00:28:33 +00:00
Jason Macnak
5146d553ea Remove FrontendStub_[cc|h] from SandboxingDenyModuleList
Bug: b/288170603
Test: GENRULE_SANDBOXING=true m FrontendStub_cc
Test: GENRULE_SANDBOXING=true m FrontendStub_h
Test: build/soong/tests/genrule_sandbox_test.py FrontendStub_cc
Test: build/soong/tests/genrule_sandbox_test.py FrontendStub_h
Change-Id: I863d65ce921a98b91e1aa4c5eebfcf94178f633d
2023-06-20 23:52:47 +00:00
Trevor Radcliffe
07aff97357 Merge "Explicitly disable CFI in bp2build when false" am: 8bd06008dc
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/2628495

Change-Id: I518e1d2aef6ce22f421a4fae2332cc655c4ba003
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-06-20 20:05:39 +00:00
David Duarte
97f4d8224b Merge "genrule_sandbox_test: Remove space in }generate filter" am: 6a2c54a478
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/2623216

Change-Id: I5cf3bd85ae88d1f8474863a2acfa9a2b046ef299
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-06-20 20:05:14 +00:00
Trevor Radcliffe
8bd06008dc Merge "Explicitly disable CFI in bp2build when false" 2023-06-20 19:52:17 +00:00
Usta (Tsering) Shrestha
1205d717cb Disallow java_test_host dependant
Bug: 287462798
Change-Id: I98cc7c9bb1d9fbaf3211284c02c85e0037e2059c
Test: ABTD run
2023-06-20 19:08:45 +00:00
David Duarte
6a2c54a478 Merge "genrule_sandbox_test: Remove space in }generate filter" 2023-06-20 18:36:13 +00:00
usta
49012eeacb cosmetic
ninja() is only called for soong bootstrap now

Test: NA
Bug: NA
Change-Id: Iededf601dc3bb92d8681b1e008bf20b4da406f4c
2023-06-20 14:00:44 -04:00
Elliott Hughes
02fec85409 Merge "Bump the platform default up to C17." am: 1b2a65783d
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/2626336

Change-Id: Iab415f33b90235c625dac3f2fd97bd94ea91b65b
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-06-20 17:09:42 +00:00
Christopher Parsons
1f876020cf Merge "Add -gen suffix to genrule targets with conflicts" am: bf1b88dd35
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/2626356

Change-Id: I696eaeeba8ea5c2c1be0b25ff76a6934d4add83c
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-06-20 17:09:03 +00:00
Elliott Hughes
1b2a65783d Merge "Bump the platform default up to C17." 2023-06-20 16:56:51 +00:00
Christopher Parsons
bf1b88dd35 Merge "Add -gen suffix to genrule targets with conflicts" 2023-06-20 16:32:18 +00:00
Jooyung Han
eeeda8a94c Remove PRODUCT_INSTALL_EXTRA_FLATTENED_APEXES
We will deprecate flattened apexes. In this change, GSI-specific make
variable (PRODUCT_INSTALL_EXTRA_FLATTENED_APEXES) is removed. The
variable was used to install both image/flattened apexes in the GSI, so
that it works on ro.apex.updatable devices and not-updatable devices.

Now, GSI will have only image APEXes in it.

Bug: 278826656
Test: lunch gsi_arm64-userdebug && m # no flattened apexes
Change-Id: Ie5fe505b9f2a6a1687252513788fd3e16bc147c5
2023-06-20 14:31:39 +09:00
Florian Mayer
c746619feb [hwasan] Increase BB to explore for reachability
We pass mcpu=cortex-a55 for our build, which increases BB to the point
where the LLVM default of 32 is not enough. This caused worse coverage
for use-after-scope detection, and increased stack usage.

Test: build oriole_hwasan
Bug: 229654778
Change-Id: I6ddb47d7224a9c6ddbf2641c043e3430d330c5a9
2023-06-16 17:34:59 -07:00
Florian Mayer
a998446d3e [hwasan] Also pass use-after-scope flag in LTO
Change-Id: I3df3d3047fd5aaa93e6c4b68885d39e20b12ccdb
2023-06-16 17:34:57 -07:00
Jared Duke
91f32e7ae5 Suppress resourceshrinker stdout in soong
The resourceshrinker command prints an info log for successful runs,
which we don't really need to surface in build output. Suppress stdout
for such invocations; errors will surface through stderr.

Bug: 202959019
Test: m + compare log output
Change-Id: I08ed465bb7e3a0fa8d5e967d858f6739b5ef7fad
2023-06-16 23:12:33 +00:00
Florian Mayer
2bddccd837 Reland "Re-enable stack frame size errors"
This reverts commit 25cd981362.

Reason for revert: b/274474681 is fixed.

Bug: 229654778
Change-Id: I4b975ced02ffe0d5a432a3033f05bb61868bec45
2023-06-16 22:34:41 +00:00
Chris Parsons
e1f25230df Add unit test for parsing build files in bp2build
This involves some minor changes to testing infrastructure.

Bug: 285631638
Fixes: 286545783
Test: unit test
Change-Id: If64ba29308d99e63a1cc5526feaf077f2cb14478
2023-06-16 21:09:19 +00:00
Trevor Radcliffe
523c5c6597 Explicitly disable CFI in bp2build when false
In Soong, CFI being explicitly set to false overrides presence in
CFI_INCLUDE_PATHS, so this change causes Bazel to mimic the same
precedence.

Bug: 278789968
Test: Unit tests
Change-Id: I827b3d4272eac2002031970f1e67c9321979b14b
2023-06-16 20:15:45 +00:00
Chris Parsons
b7950a93df Add -gen suffix to genrule targets with conflicts
Fixes: 224580460
Test: m nothing
Change-Id: I3af3eb0fb7f65216087482eb620484229ac7d674
2023-06-16 17:41:42 +00:00
Spandan Das
7bdea7e56d Always use the BUILD files from bazelbuild-rules_go
This repository contains the core go rules

Test: TH
Bug: 284483729
Change-Id: I4385c84140f2e41bfa5e5cd5434a212c138f456a
2023-06-16 17:16:43 +00:00
Christopher Parsons
975051cb58 Merge "Provide reason for unconverted bp2build modules" am: df9c3441aa
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/2617572

Change-Id: I75e96c59f822c1445b6e50860916550f60726f66
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-06-16 14:39:14 +00:00
Christopher Parsons
df9c3441aa Merge "Provide reason for unconverted bp2build modules" 2023-06-16 13:49:49 +00:00
Chris Parsons
39a169721c Provide reason for unconverted bp2build modules
This also changes the expectation of ConvertWithBp2build. Each
implementation must either create one or more Bazel target modules, or
mark the module as unconvertible (with a specific reason).

Manually verified no runtime hit in AOSP
In AOSP, the metrics file size increases from 252K to 1.6M

This changes some effective module counts in bp2build metrics:
 - Removes "package" modules from the module count list in
metrics, as these will not be converted like regular modules.
 - Counts Handcrafted modules as being "unconverted", as bp2build is not
   responsible for them.

Bug: 285631638
Test: Verified generated BUILD.bazel files are bit-for-bit identical
with this change
Test: Manually verified one case of each implemented reasonType

Change-Id: I308dd451d8f28379b15671dae9f931bd0446f5c1
2023-06-16 13:45:17 +00:00
Inseob Kim
e7ceeb5c35 Merge "Fix soong config hash missing for some modules" am: 55be40beb4
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/2628789

Change-Id: I823dbf8a2ec246ffb7f24843925b764c307119e3
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-06-16 12:22:47 +00:00
Inseob Kim
55be40beb4 Merge "Fix soong config hash missing for some modules" 2023-06-16 11:28:19 +00:00
Kiyoung Kim
1407c03be2 Merge "Remove symlink to the build.ninja" am: aa003b3833
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/2623890

Change-Id: If9eab5a487e39aeb3754a554b83df4df179bc22c
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-06-16 08:37:58 +00:00
Kiyoung Kim
aa003b3833 Merge "Remove symlink to the build.ninja" 2023-06-16 08:06:06 +00:00
Jooyung Han
60ecb960ba Merge "Remove --blkid_path argument" am: ee31de71c7
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/2624311

Change-Id: I6c436e49d70d9375a6f16ad7cba2c7ef03bf71a3
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-06-16 07:30:00 +00:00
Inseob Kim
8ff69de0f7 Fix soong config hash missing for some modules
Bug: 279362051
Test: see outputs of C++ modules using soong config
Change-Id: I95e41350ff17a989faf7c010a4c4ed4fcd79d66b
2023-06-16 15:52:15 +09:00
Jooyung Han
ee31de71c7 Merge "Remove --blkid_path argument" 2023-06-16 06:49:13 +00:00
Treehugger Robot
125325cc6d Merge "Add implementation whole archive deps to binaries" am: b2c6076e43
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/2628589

Change-Id: Ie19c1fa83a83c50bd59886f05921e9ae00fcb8b5
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-06-16 02:47:45 +00:00
Treehugger Robot
b2c6076e43 Merge "Add implementation whole archive deps to binaries" 2023-06-16 02:15:06 +00:00