Commit Graph

66239 Commits

Author SHA1 Message Date
Yu Liu
b2cd6f6963 Merge "Refactor the genrule allowlists code to support internal allowlists" 2023-06-01 02:50:41 +00:00
Jeongik Cha
418e531387 Merge "NINJA_LOG option uses usesninjalogasweightlist" am: ef17be26a8
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/2597905

Change-Id: I86a623bdc4949070934eebaafc472c06502cc016
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-06-01 01:17:04 +00:00
Jeongik Cha
b5592b43fc Merge "Enable NINJA_LOG as weight list source" am: c018d84a00
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/2597605

Change-Id: Ib1f7f20a90e3727e2d8e57652f587f6dda48388d
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-06-01 01:17:01 +00:00
Jeongik Cha
ef17be26a8 Merge "NINJA_LOG option uses usesninjalogasweightlist" 2023-06-01 00:40:42 +00:00
Jeongik Cha
c018d84a00 Merge "Enable NINJA_LOG as weight list source" 2023-06-01 00:40:42 +00:00
Yi Kong
0713e336d9 Remove Full LTO support
We do not have any more projects directly depending on Full LTO (except
CFI which manages their own LTO flags), remove full LTO support from the
build system.

Test: presubmit
Bug: 169004486
Change-Id: I8d6b7999d716158b5d8fe34b2f197653d7bae8dd
2023-06-01 00:10:26 +00:00
Treehugger Robot
2fb6ca5b50 Merge "Remove the last allow-listed unstable features" am: cdaf10bb6b
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/2609436

Change-Id: I0376432c0050e31a057ade5b3bc64c70353b1d08
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-06-01 00:05:43 +00:00
Treehugger Robot
cdaf10bb6b Merge "Remove the last allow-listed unstable features" 2023-05-31 23:27:25 +00:00
Yu Liu
d0bf3477eb Merge "Tool to detect modules that generate the incorrect output in sandbox" am: 62461ea576
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/2606109

Change-Id: I3a2425364af92e589aba3b5c8a50c6a79d14cf6a
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-05-31 22:11:36 +00:00
MarkDacek
de53314d0d Add bazel_metrics to py proto export.
Test: build/bazel/scripts/analyze_build
Change-Id: Ied3e6d5a1d65ec31d704ac3cef6e7c74397333bf
2023-05-31 22:09:09 +00:00
Steven Moreland
26da122d61 Remove SepolicySplit.
Obsolete.

Bug: 257176017
Test: build&boot
Change-Id: Id639ad77f12d38507ad1a2300cb392bbfeadb9e4
2023-05-31 22:00:56 +00:00
Yu Liu
45d6af544a Refactor the genrule allowlists code to support internal allowlists
Bug: 281067655
Test: build locally
Change-Id: Iedac64c3d59fc48f1b5a1b461c53d00e92b653b5
2023-05-31 21:40:47 +00:00
Yu Liu
62461ea576 Merge "Tool to detect modules that generate the incorrect output in sandbox" 2023-05-31 21:34:49 +00:00
Yabin Cui
2c336fe5b5 Suppress performance-avold-endl clang-tidy warning
This is a new warning introduced in clang-r498229.

Bug: 285005947
Test: build
Change-Id: Ia66c1f2555e2654614137e950832070e4e8dd54f
2023-05-31 19:27:52 +00:00
Chris Wailes
547bfdd1d1 Remove the last allow-listed unstable features
This CL removes the custom_inner_attributes and mixed_integer_ops
features from the allow-list.  This also allows us to remove the `-A
stable-features` flag.

Bug: 267698452
Test: m rust
Change-Id: I4770c2e9477337f112732c354bf477a99d11a467
2023-05-31 11:53:44 -07:00
Spandan Das
f4e0d3fe15 Merge "Deprecate api bp2build of ndk_library and ndk_headers" am: 02e8a0dba1
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/2609612

Change-Id: Iea190b99d537221377e096806dcf21a854885b62
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-05-31 18:14:28 +00:00
Spandan Das
02e8a0dba1 Merge "Deprecate api bp2build of ndk_library and ndk_headers" 2023-05-31 16:01:07 +00:00
Treehugger Robot
b652378a10 Merge "Create a "current_product" named platform." am: 780ea1f8d1
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/2606989

Change-Id: Id8a9fd06cbfe21e5928ba55856c0a812f320239f
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-05-31 08:42:18 +00:00
Treehugger Robot
780ea1f8d1 Merge "Create a "current_product" named platform." 2023-05-31 08:00:12 +00:00
Spandan Das
230c312f83 Deprecate api bp2build of ndk_library and ndk_headers
To support export of NDK APIs in multi-tree, we added functionality to
generate Bazel targets of ndk related Soong module types. Since this use
case does not exist anymore, deprecate this to prevent bitrot

The removed code includes
- `ConvertWithApi2Build` implementation of these libraries, which
  generates the Bazel targets in the synthetic `api_bp2build` workspace
- (api) bp2build unit tests for these module types

Test: go build ./cc
Bug: 284029211
Change-Id: Id3278fa119e0ab87f31f39a3783197a81b655e43
2023-05-31 03:44:51 +00:00
Yi Kong
a85b5ccbfe Merge "Remove Use_clang_lld in lto" am: d5be864f81
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/2606178

Change-Id: I47e203fcdfdaff903c0d21e5aa144cc4c7a6de9b
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-05-31 01:31:17 +00:00
Yi Kong
d5be864f81 Merge "Remove Use_clang_lld in lto" 2023-05-31 00:27:53 +00:00
Spandan Das
68c17188f9 Merge "Allowlist xsdc" am: 0cb8770989
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/2601946

Change-Id: I78185cb51b0c75b0681cf27b080b5a92b3f414a8
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-05-30 21:49:06 +00:00
Spandan Das
0cb8770989 Merge "Allowlist xsdc" 2023-05-30 21:05:36 +00:00
Kousik Kumar
d93c67f64c Revert "Remove env config fetcher code"
This reverts commit 6324647bcc.

Reason for revert: This change negatively impacts users running builds on gLinux laptops. Reverting to limit impact and reland with appropriate fix.

Bug: b/284985772
Change-Id: I04a3d0107bb3ea680ba6641240620736a2ef5f17
2023-05-30 20:32:08 +00:00
Kousik Kumar
0fd348765c Merge "Remove env config fetcher code" am: 678e680a75
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/2605645

Change-Id: I8099cb9212b0b624adbf248f6eac763e6b4721f1
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-05-30 18:18:33 +00:00
Kousik Kumar
678e680a75 Merge "Remove env config fetcher code" 2023-05-30 17:28:10 +00:00
Jiakai Zhang
4f9e0d15d8 Merge "Move CLC construction to Ninja phase." am: 5324cc84ad
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/2594905

Change-Id: I5130573975d8e0993848de849c0114b1d7380f85
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-05-30 15:42:09 +00:00
Jingwen Chen
583ab219ea Create a "current_product" named platform.
This enables output paths of product agnostic targets (e.g. mainline
apex) to be identical when switching between target products, since the
product name is no longer embedded in:

1) the output path prefix in bazel-out
2) the PlatformOptions contribution to the configuration hash as part of a transition

Test: treehugger
Change-Id: I3fd0f7134209aa7eede3ed98412a1c5482689b57
2023-05-30 15:40:18 +00:00
Jiakai Zhang
5324cc84ad Merge "Move CLC construction to Ninja phase." 2023-05-30 14:58:15 +00:00
Jiakai Zhang
a449678996 Move CLC construction to Ninja phase.
Before this change, dexpreopt was often broken with optional libraries.
This was because the CLC construction was done in Soong at an early
stage, where we don't have sufficient information to determine whether
an optional library is installed or not.

For example, the "Settings" package uses an optional library called
"androidx.window.extensions". On some devices, the library is installed,
but on some other devices, it's not. Soong always adds the library to
the CLC, meaning the CLC is wrong for devices which don't have the
library. This change fixes the problem. See the tests below.

After this change, the CLC construction is done by a Python script
invoked at a very late stage. It uses product_packages.txt, which is
generated by Make, to determine whether an optional library is
installed or not, and filter out libraries that are not installed.

Note that optional libraries are still added as dependencies by Soong.
This is because dependencies have to be added at an early stage. This
means what dex2oat eventually uses will be a subset of the dependencies,
which is fine.

Bug: 282877248
Test: m
Test: atest construct_context_test
Test: -
  1. lunch aosp_cf_x86_64_phone-userdebug && m
  2. Check the .invocation file of the "Settings" package (defined in
     .bp file)
  3. See androidx.window.extensions
Test: -
  1. lunch aosp_redfin-userdebug && m
  2. Check the .invocation file of the "Settings" package (defined in
     .bp file)
  3. Don't see androidx.window.extensions
Test: Check the .invocation file of the "Dialer" package (defined in
  .mk file)
Test: -
  1. Build a Pixel 5 system image and flash it to a Pixel 5 device.
  2. adb shell pm art dump
  3. See "reason=prebuilt" instead of "reason=vdex".
     (https://diff.googleplex.com/#key=fB6Ls9q2QGSN, before: left,
     after: right)

Change-Id: Ia112bd7c2328373e68db6bffb74bf34030f683d8
2023-05-30 15:46:38 +01:00
Saagar Jha
09c00abce5 Merge "Replace prodcertstatus with gcertstatus" am: 204beb184a
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/2606110

Change-Id: Ie82601993c2bdfc98257912f6ea3cea75f545caf
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-05-30 11:57:32 +00:00
Saagar Jha
204beb184a Merge "Replace prodcertstatus with gcertstatus" 2023-05-30 11:12:43 +00:00
Kiyoung Kim
babe56a6c8 Merge "Rename build.ninja with product name" am: 5500fc89c1
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/2546570

Change-Id: Iafcb92aee2265efb880a0431990d787f7a74b255
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-05-30 07:48:35 +00:00
Kiyoung Kim
5500fc89c1 Merge "Rename build.ninja with product name" 2023-05-30 07:17:08 +00:00
Yi Kong
a7a345d55e Remove Use_clang_lld in lto
We have moved all LTO projects to LLD, this is unused.

Test: presubmit
Change-Id: I385b3302c04243be8fde80605b29df7646ec40ce
2023-05-30 15:19:06 +09:00
Jingwen Chen
30cf4bc625 mk2rbc: temporarily bump matching paths limit to 155. am: 30d48351be
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/2608628

Change-Id: I798cc60997a1b1189d292e5213959bd9beb1b9b2
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-05-30 02:57:52 +00:00
Jingwen Chen
30d48351be mk2rbc: temporarily bump matching paths limit to 155.
It was 150, but an internal change bumped up the usage to 153. Temporarily increase it to fix build break.

Bug: b/284854738

Change-Id: I23478f4c5333c5ef1ad344aadafe5803685c5d92
Test: abtd 
Test: treehugger
2023-05-29 16:01:34 +00:00
Yu Liu
fb458e9255 Tool to detect modules that generate the incorrect output in sandbox
Bug: 281067655
Test: Test locally
Change-Id: Ie38e3658eee4d577d1f871c9ed8129b4ac7d7d07
2023-05-26 14:45:12 -07:00
Dan Shi
ec7314336a Support test runnner option in auto generated test configs
Bug: 284179405
Bug: 236980335
Test: unittest
Change-Id: Ifae3d556ff79153ca6c3067347fc259b665fb2e1
2023-05-26 21:34:22 +00:00
Spandan Das
ab5f1c56c8 Allowlist xsdc
This is a java_binary_host that is used to generate .cpp/.java files
from .xsd file.

Test: TH
Bug: 211678537
Change-Id: I62ae9f1dc7c531fc59778a5a043bffc9960c12db
2023-05-26 16:53:04 +00:00
Alix Espino
a9e00d1728 Merge "bp2build java_resources that only contain a filegroup" am: e5641c51b9
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/2596186

Change-Id: Ibdd3518bedfdf7fd921008913dbdd8421af0396d
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-05-26 14:21:31 +00:00
Treehugger Robot
42846627f0 Merge "Use hashed subdir for soong_config modules" am: 8321c1a8fb
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/2596606

Change-Id: I6f2853f8157280fab01ce49a3632339fd5f521c9
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-05-26 14:21:21 +00:00
Ivan Lozano
f241ae4d06 Merge "rust: Support sanitizers in rust_ffi modules" am: 979dee31e3
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/2605345

Change-Id: Iefaf6fb1b40c343b0b98eaf263241968a7b7ee85
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-05-26 14:21:12 +00:00
Alix Espino
e5641c51b9 Merge "bp2build java_resources that only contain a filegroup" 2023-05-26 13:59:42 +00:00
Treehugger Robot
8321c1a8fb Merge "Use hashed subdir for soong_config modules" 2023-05-26 12:50:42 +00:00
Ivan Lozano
979dee31e3 Merge "rust: Support sanitizers in rust_ffi modules" 2023-05-26 12:41:23 +00:00
Inseob Kim
81b00a8db7 Use hashed subdir for soong_config modules
This is to differentiate soong intermediate directories for soong config
modules. This will help incremental build across different
devices.

Test result of building panther, building cheetah, and building panther
again:

Before this change
- build time: 02:57
- # of tasks: 31044

After this change
- build time: 01:48
- # of tasks: 1694

Build time includes build.ninja generating time (which is more than 1
minute), so the overriden artifacts become far fewer.

And "NINJA_ARGS='-n -d explain' m" only gave 4 "command line changed"
nodes.

Bug: 279362051
Test: see above
Change-Id: I4891cbe823ae21628465e5c6eb26a4837ccdd202
2023-05-26 18:07:05 +09:00
Anton Hansson
d522475780 Merge "ensure that privapp_allowlist is installed before android_app" am: 0c6ae56eea
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/2606205

Change-Id: Iada36bd10b81eee49eec583ff8f0b669d5a37708
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-05-26 07:52:18 +00:00
Anton Hansson
0c6ae56eea Merge "ensure that privapp_allowlist is installed before android_app" 2023-05-26 07:17:37 +00:00