Commit graph

40812 commits

Author SHA1 Message Date
Treehugger Robot
518e711add Merge "Make MockBazelContext more specific to cquerys" am: c1c2352d95
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1670165

Change-Id: I78dbaeae162c362f8840682f77f08a536b7de330
2021-04-12 14:08:23 +00:00
Treehugger Robot
4fe76f5337 Merge "bp2build/mixed builds denylist note_memtag_heap_async and sync temporarily." am: 7ac4db7c3a am: d086f9f715
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1671531

Change-Id: I780d72b617f732e61a7f309f54a96dd4aa5342a6
2021-04-12 13:43:01 +00:00
Treehugger Robot
c1c2352d95 Merge "Make MockBazelContext more specific to cquerys" 2021-04-12 13:25:38 +00:00
Treehugger Robot
d086f9f715 Merge "bp2build/mixed builds denylist note_memtag_heap_async and sync temporarily." am: 7ac4db7c3a
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1671531

Change-Id: Idd1d1b9efb5573317e34d420c47be6ad0390f033
2021-04-12 13:01:37 +00:00
Treehugger Robot
7ac4db7c3a Merge "bp2build/mixed builds denylist note_memtag_heap_async and sync temporarily." 2021-04-12 12:31:29 +00:00
Treehugger Robot
be66aca8e1 Merge "bp2build: refactor compiler/linker prop function." am: 02e40d0589 am: 39c14f4112 am: e865be2ee1
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1671525

Change-Id: I7021083f52dcfec26408a036028d079dab7e5bac
2021-04-12 10:38:46 +00:00
Treehugger Robot
32797695a3 Merge "bp2build: codegen singleton lists on one line." am: 454ac1eff3 am: 777058447c am: d5683df6f0
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1669727

Change-Id: Ifd154ebcd9730e82820e288c3d73c2678338ee2f
2021-04-12 10:37:37 +00:00
Treehugger Robot
e865be2ee1 Merge "bp2build: refactor compiler/linker prop function." am: 02e40d0589 am: 39c14f4112
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1671525

Change-Id: I5238a22daa61ebd4ef78cb75993cfba5491087eb
2021-04-12 10:14:49 +00:00
Lukacs T. Berki
745380ce23 Remove the dependency on a number of env vars.
This is so that the way soong_build is invoked is simpler, which is in
turn useful so that it can be invoked multiple times within a single
build, which in turn will be used to invoke bp2build routinely (as
opposed to manually when needed)

Test: Presubmits.
Change-Id: Iddaebb05ff7bcedc0db8273192bb31284b739920
2021-04-12 12:07:44 +02:00
Paul Duffin
702210b804 Move generation of global hidden API flags to platform_bootclasspath
This change moves the generation of the global hidden API flags from
the singleton to the platform_bootclasspath module. It involves:
1. Moving the ruleToGenerateHiddenApiFlags to hiddenapi_modular.go.
2. Adding HiddenAPIAugmentationProperties to be used by the
   platform_bootclasspath type.
3. Moving the file paths into the platform-bootclasspath module
   definition in frameworks/base/boot/Android.bp.

The flagsRule is kept as a placeholder for now. The emptyFlagsRule is
also kept so that builds continue to work even when the frameworks/base
repository is not present.

Bug: 177892522
Test: verified that the out/soong/hiddenapi/... files are unchanged
      by this change
Change-Id: Idf4dd414a016831bfe04a01f93234c1c33819881
2021-04-12 11:04:24 +01:00
Paul Duffin
c6bb7cf8d7 Extract ruleToGenerateHiddenApiFlags
Extracts the code for creating the rule that creates the monolithic
hidden API flags file which is encoded into dex implementation jars.
This refactoring is in preparation for moving the functionality from
the hiddenapi_singleton into the platform_bootclasspath.

A follow up change will move the method into the new
hiddenapi_modular.go alongside the hiddenAPIAugmentationInfo as they
will both be used to perform hidden API processing for a
bootclasspath_fragment.

Bug: 177892522
Test: verified that the out/soong/hiddenapi/... files are unchanged
      by this change
Change-Id: I2729afa80cdfd2d1d4717365001648453d65632f
2021-04-12 11:04:09 +01:00
Treehugger Robot
39c14f4112 Merge "bp2build: refactor compiler/linker prop function." am: 02e40d0589
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1671525

Change-Id: Ied11887b04e072936f34269751cf8c0a4bb38053
2021-04-12 10:00:40 +00:00
Treehugger Robot
d5683df6f0 Merge "bp2build: codegen singleton lists on one line." am: 454ac1eff3 am: 777058447c
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1669727

Change-Id: I36f01824503fbbc40cdbd0d510f77439e59baff9
2021-04-12 09:53:41 +00:00
Treehugger Robot
02e40d0589 Merge "bp2build: refactor compiler/linker prop function." 2021-04-12 09:22:30 +00:00
Treehugger Robot
777058447c Merge "bp2build: codegen singleton lists on one line." am: 454ac1eff3
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1669727

Change-Id: I0c62972fbf22d4270072f9022c4bd6909163c366
2021-04-12 09:17:12 +00:00
Treehugger Robot
454ac1eff3 Merge "bp2build: codegen singleton lists on one line." 2021-04-12 08:29:18 +00:00
Jingwen Chen
cbb95c8c3c Merge "bp2build: cc_library converter for //bionic/libdl:libdl_android" am: a42c707572 am: 361061f817 am: b0441fb8ed
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1652408

Change-Id: I2ff24f1aa862cbd9e84e9d2b7a8f69681d032b94
2021-04-12 06:18:01 +00:00
Jingwen Chen
b0441fb8ed Merge "bp2build: cc_library converter for //bionic/libdl:libdl_android" am: a42c707572 am: 361061f817
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1652408

Change-Id: I6547737a15ca2b15da29600a73ae4ee14a97119a
2021-04-12 05:52:31 +00:00
Jingwen Chen
0a92ed74ad bp2build/mixed builds denylist note_memtag_heap_async and sync temporarily.
This adds the two modules to the bp2build/mixed builds denylist while we
investigate b/185079815.

Test: TH
Change-Id: I6d67c5c24502ac48bdc90a005ddef86c46eab0b7
2021-04-12 05:37:42 +00:00
Jingwen Chen
361061f817 Merge "bp2build: cc_library converter for //bionic/libdl:libdl_android" am: a42c707572
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1652408

Change-Id: I71955528c7517bb0628dd294096b4b9a72d3f692
2021-04-12 05:07:54 +00:00
Jiyong Park
dbd710c426 SdkSpec is fully using ApiLevel
Previously, SdkSpec was constructed only from the user string. It didn't
make use of the Config struct where information about the latest stable
SDK version, etc. is recorded. As a result, the build system couldn't
check if the sdk version "current" is referring to the in-development
(i.e.  not-yet-frozen) SDK version or the latest stable version.
"current" was always assumed to be in-development (IsPreview() returns
true) even when Platform_sdk_final == true.

As the first step for fixing that, this change requires
android.EarlyModuleContext to be passed when constructing SdkSpec from
the user string.

In the following changes, "current" will be mapped to either
FutureApiLevel (10000) or one of the FinalApiLevels() depending on
whether the platform SDK was finalized or not.

Bug: 175678607
Test: m
Change-Id: Ifea12ebf147ecccf12e7266dd382819806571543
2021-04-12 13:46:21 +09:00
Jingwen Chen
a42c707572 Merge "bp2build: cc_library converter for //bionic/libdl:libdl_android" 2021-04-12 04:30:27 +00:00
Justin Yun
7f99ec7c1f Add a test to check the intall partitions
cc modules have complex image variant settings. To avoid setting
wrong partitions to modules, add a test to check the install
partition.

Bug: 184885453
Test: m nothing
Change-Id: I080661335f2da7281d6e6a0d2fedd1fcecb4b2cb
2021-04-12 13:19:28 +09:00
Robin Lee
33db5cbf6e Install device_specific cc_prebuilt to ODM
In aosp/531337 support for installing prebuilts to vendor and odm
partitions was introduced.

Since aosp/1542687 allowed installing vendor variants to odm, we
started to see device_specific cc_prebuilts not installed to odm
at all.

The reason for this is the InVendor condition is true for the
device_specific module and VendorVariantToOdm is false in cases
outside the one it was designed for, so SocSpecific returns true and
the module gets installed to vendor instead of odm.

We need to check if we're specifically building a vendor variant
before triggering this VendorVariantToOdm logic.

Bug: 184885453
Change-Id: I05be06a61c5fc3f2f72599eb4746c9c0523b956e
2021-04-12 13:12:45 +09:00
Tri Vo
481890dbe2 Merge changes I46e851c8,I2c9eb248 am: eed4716def am: 77bf9bd71a am: ec0d17a613
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1662661

Change-Id: I20d8ee08433e88ec2b55fc59a170e9f48a54fd9c
2021-04-10 01:19:53 +00:00
Ivan Lozano
3eb8ba3a70 Merge "rust: Remove stack-depth sancov" am: 1285766d3b am: 82534e263b am: 28a8c7fd98
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1671669

Change-Id: I838eec90d244dd5083620b9d9bcb28f240273103
2021-04-10 01:19:41 +00:00
Tri Vo
ec0d17a613 Merge changes I46e851c8,I2c9eb248 am: eed4716def am: 77bf9bd71a
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1662661

Change-Id: Ib8ef6d35d6280c2e293f4c4f2fadac679a49e0ed
2021-04-09 23:59:47 +00:00
Ivan Lozano
28a8c7fd98 Merge "rust: Remove stack-depth sancov" am: 1285766d3b am: 82534e263b
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1671669

Change-Id: Ica3a425f2b10f0b223e206f393b7c7b1f128447b
2021-04-09 23:59:34 +00:00
Tri Vo
77bf9bd71a Merge changes I46e851c8,I2c9eb248 am: eed4716def
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1662661

Change-Id: Ia06d55924cabe34eb443e384f231b789e583bb38
2021-04-09 23:05:22 +00:00
Ivan Lozano
82534e263b Merge "rust: Remove stack-depth sancov" am: 1285766d3b
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1671669

Change-Id: I93d1a58849dc14174c1423076061d2bfd5f6f762
2021-04-09 22:55:34 +00:00
Tri Vo
eed4716def Merge changes I46e851c8,I2c9eb248
* changes:
  rust: Add HWASan build support
  Export CC HWASan sanitizer type
2021-04-09 22:31:09 +00:00
Ivan Lozano
1285766d3b Merge "rust: Remove stack-depth sancov" 2021-04-09 21:56:51 +00:00
Jeffrey Vander Stoep
b871dec0e4 Merge "Disable clippy::upper-case-acronyms" am: 3e2d4d419b am: 33b7455e9d am: 9bab99373e
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1662448

Change-Id: I57d256c3499af652c1b9c47df3b793869f772648
2021-04-09 20:04:55 +00:00
Jeffrey Vander Stoep
50c8323f78 Merge "Rust: use 1.51.0 prebuilts" am: e9fb49b555 am: 9b6d33bda9 am: 190c3d795b
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1660018

Change-Id: I226b29e33cd6e8e63f375f19f154deb7be537433
2021-04-09 20:04:52 +00:00
Jeffrey Vander Stoep
9bab99373e Merge "Disable clippy::upper-case-acronyms" am: 3e2d4d419b am: 33b7455e9d
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1662448

Change-Id: I2ff0ba6f8362ec85c7effb353ddb43bf282da9dd
2021-04-09 19:13:19 +00:00
Jeffrey Vander Stoep
190c3d795b Merge "Rust: use 1.51.0 prebuilts" am: e9fb49b555 am: 9b6d33bda9
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1660018

Change-Id: Idbe3e5ddb1c6435592890050aaddadc4f1cd1b86
2021-04-09 19:13:16 +00:00
Jeffrey Vander Stoep
33b7455e9d Merge "Disable clippy::upper-case-acronyms" am: 3e2d4d419b
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1662448

Change-Id: Ia7821bdc2bf15211a24c34fa8019d7cb86e6bc51
2021-04-09 18:33:17 +00:00
Jeffrey Vander Stoep
9b6d33bda9 Merge "Rust: use 1.51.0 prebuilts" am: e9fb49b555
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1660018

Change-Id: I6a857bed85c63347abdb2f4807564279bfbc721d
2021-04-09 18:32:46 +00:00
Tri Vo
0a74c3e06e rust: Add HWASan build support
HWASan for static Rust executables is not supported yet.

Bug: 180495975
Test: build local test app with HWASan
Change-Id: I46e851c82a16943586ec3a789f09a58651d036e3
2021-04-09 10:59:23 -07:00
Jeffrey Vander Stoep
3e2d4d419b Merge "Disable clippy::upper-case-acronyms" 2021-04-09 17:48:43 +00:00
Jeffrey Vander Stoep
e9fb49b555 Merge "Rust: use 1.51.0 prebuilts" 2021-04-09 17:48:43 +00:00
Ivan Lozano
20fcfdf489 rust: Remove stack-depth sancov
This flag causes a linkage error between rustc and our libclang_rt. We
can remove it for now and look into reintroducing it in the future.

We'd need to define 'thread_local uintptr_t __sancov_lowest_stack' to
support this. See https://reviews.llvm.org/D36839

Bug: 180495975
Test: m <fuzzer>
Change-Id: I95c9392307b5f20a0eda0fc76eb7ef79e27ae4df
2021-04-09 13:22:27 -04:00
Colin Cross
c02504edd6 Add test for globs used during bootstrapping
bootstrapping can read extra Android.bp files that could affect
soong_build.

Bug: 159845846
Test: bootstrap_test.sh
Change-Id: Ib053ff9c2ee70638419f122a36438a515640e0b4
2021-04-09 09:46:09 -07:00
Liz Kammer
07bc5f9c4e Add test for building cc_object with Bazel.
Test: go test cc tests
Change-Id: I45a341d09c92f57769d1c3b686f8abac113b3548
2021-04-09 11:50:38 -04:00
Liz Kammer
a92e844d16 Make MockBazelContext more specific to cquerys
Rather than having a single storage container, make multiple so that it
is easier to unit test building modules with bazel with MockBazelContext

Test: go test genrule_test
Change-Id: I1da85d28f096d5102ad889b9518fdda6914342b1
2021-04-09 11:49:48 -04:00
Treehugger Robot
2a35da912e Merge "Handle simple prebuilt static libraries from bazel" am: 76579e0e9a am: 70a88424ba am: 8d77e0b2fd
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1664542

Change-Id: Ib330bfb45d699a0541c12362939ad780f4057a01
2021-04-09 15:23:32 +00:00
Treehugger Robot
8d77e0b2fd Merge "Handle simple prebuilt static libraries from bazel" am: 76579e0e9a am: 70a88424ba
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1664542

Change-Id: I34bc8944f7c1b3063eab28a398f27446b9f5462d
2021-04-09 14:56:37 +00:00
Treehugger Robot
70a88424ba Merge "Handle simple prebuilt static libraries from bazel" am: 76579e0e9a
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1664542

Change-Id: I91bb2e2efe87fce428e174f3f2ff0c9a9cb9af06
2021-04-09 14:15:51 +00:00
David Srbecky
2211320bf8 Merge "Revert^2 "[strip.sh] Move remaining GNU binutils usage to llvm binutils"" am: 2af7a1b5ff am: dadf9c4fc7 am: c842453fa5
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1670068

Change-Id: I254f26a009ee3f54445b2ecaa9e9229d0f47ade3
2021-04-09 13:55:18 +00:00
Treehugger Robot
76579e0e9a Merge "Handle simple prebuilt static libraries from bazel" 2021-04-09 13:38:59 +00:00