Commit Graph

5596 Commits

Author SHA1 Message Date
Liz Kammer 3c05ed947b Merge "Consolidate cc-specific cqueries." am: 41cca851d9 am: b50de53589 am: 3b3c5a1a12
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1672347

Change-Id: Ice69a3d4523b9cdc0cbc17cb59e6c27791d51dd1
2021-04-13 19:12:15 +00:00
Liz Kammer 41cca851d9 Merge "Consolidate cc-specific cqueries." 2021-04-13 17:11:34 +00:00
Treehugger Robot f6a7a92384 Merge "Add a test to check the intall partitions" am: 4a39669a27 am: 68336c71aa am: 274e65dd7a
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1671530

Change-Id: I17f8dade5ffe4bffeb5b2a6e97b576f18b3d1753
2021-04-13 00:54:39 +00:00
Treehugger Robot b1b535cfce Merge "Install device_specific cc_prebuilt to ODM" am: dff81fa7d8 am: 7f0ceb9440 am: 0e0bd37556
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1672246

Change-Id: I6ab9896ecc259c87bb8b002042f5c3d768867060
2021-04-13 00:54:33 +00:00
Treehugger Robot b15d86a8bf Merge "cpp output of an AIDL file is together with the headers" am: 3bc51dfc72 am: 8ac5437359 am: eacc8eaf1d
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1666828

Change-Id: I2892cce913870b9e10fbd4fa32937ecc6d1b70db
2021-04-13 00:54:25 +00:00
Treehugger Robot 4a39669a27 Merge "Add a test to check the intall partitions" 2021-04-13 00:15:38 +00:00
Treehugger Robot dff81fa7d8 Merge "Install device_specific cc_prebuilt to ODM" 2021-04-13 00:14:40 +00:00
Treehugger Robot 3bc51dfc72 Merge "cpp output of an AIDL file is together with the headers" 2021-04-12 23:42:29 +00:00
Treehugger Robot 05067de372 Merge "Add test for building cc_object with Bazel." am: c8c4bf4c98 am: 9b8e4d6b26 am: 432139a416
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1670172

Change-Id: Id0561e0a5a18a80aac4a8770411a6c4169550c8c
2021-04-12 20:59:57 +00:00
Liz Kammer b71794d8e6 Consolidate cc-specific cqueries.
There is little overlap at this point, but we expect these to converge
more over time, to handle exported includes, libs, etc., this will allow
those changes to be handled in one place and allow more consolidation of
code.

Test: bp2build generate & sync; mixed build libc
Change-Id: I51685dad9f4fc11a634965a3c9e84f4a0e279ecb
2021-04-12 15:59:08 -04:00
Treehugger Robot c8c4bf4c98 Merge "Add test for building cc_object with Bazel." 2021-04-12 19:40:47 +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 02e40d0589 Merge "bp2build: refactor compiler/linker prop function." 2021-04-12 09:22:30 +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 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
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
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
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
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
David Srbecky 2af7a1b5ff Merge "Revert^2 "[strip.sh] Move remaining GNU binutils usage to llvm binutils"" 2021-04-09 11:58:00 +00:00
Jingwen Chen 107c0de80e bp2build: refactor compiler/linker prop function.
This changes the return value into a compiler/linker attr struct to
standardize callsites and make it easier to retrieve the parsed attrs.

Test: TH
Change-Id: I1e3956e7cb5d924ce8472ece940faea459beef37
2021-04-09 10:45:48 +00:00
Jingwen Chen 6393098ecf bp2build: cc_library converter for //bionic/libdl:libdl_android
This CL contains the converter for libdl_android, a cc_library that
expands into a cc_shared_library and a regular cc_library.

Test: TH
Test: bp2build; bazel test //build/bazel/tests/...

Change-Id: If70641a538211b0d6b2aac0e4d0d06912318304d
2021-04-09 09:42:53 +00:00
Treehugger Robot ab11387b28 Merge changes I86d0600b,Id77f1ce9 am: 2198adce8f am: 4808948409 am: ac244e2b14
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1669726

Change-Id: I40a338803f4afe9f9138a905bc076092ae291502
2021-04-09 01:30:42 +00:00
Treehugger Robot 2198adce8f Merge changes I86d0600b,Id77f1ce9
* changes:
  Use old unwinder for R cc modules
  Redirect memtag libraries to snapshot
2021-04-09 01:12:12 +00:00
Tri Vo 6eafc36e60 Export CC HWASan sanitizer type
We need this so that HWASan sanitizer mutator in CC can sanitize Rust.

Bug: 180495975
Test: m nothing
Change-Id: I2c9eb248df4e55a33f5d45083e91588f4c8e3e94
2021-04-08 14:24:06 -07:00
Rupert Shuttleworth 99f726e28b Merge "Be more explicit about headers in cc_library_static targets." am: a18b3b66cd am: d970597f59 am: fd415679bf
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1664504

Change-Id: I4e5ab5575583bb869f790d447190d939fb07183d
2021-04-08 18:43:24 +00:00
David Srbecky 789fe0fdeb Revert^2 "[strip.sh] Move remaining GNU binutils usage to llvm binutils"
This reverts commit 33dfba1d9c.

Bug: 141010852
Test: art/test.py -t 137-cfi
Test: llvm-objcopy --dump-section=.gnu_debugdata=mdi.xz libhwui.so && \
      unxz -fk mdi.xz && readelf -a mdi | less
Change-Id: I751b51274a961194647ec11fd3fd49886df1e1b3
2021-04-08 18:31:46 +01:00
Inseob Kim d4c9f55468 Use old unwinder for R cc modules
Modules linking against VNDK R have been using libgcc_stripped and
libunwind_llvm as their unwinder. This change uses those old unwinder
libraries if current module's VNDK version is R.

Bug: 178470649
Test: soong test
Change-Id: I86d0600b2fb09cd9828c0a5b1157558711b0ec86
2021-04-08 19:28:28 +09:00
Rupert Shuttleworth c58d3d214e Be more explicit about headers in cc_library_static targets.
Test: bp2build-sync.py write; bazel build //bionic/...
Change-Id: I253b55f4d3cbe76805691b32e761016950871601
2021-04-08 09:43:04 +00:00
Inseob Kim 253f521dbc Redirect memtag libraries to snapshot
memtag sanitizer libraries are vendor available and can be captured as
snapshots. This change adds a redirection logic for memtag libraries.

This is just a workaround, just like other SnapshotInfoProvider calls.
In the future we need to refactor these codes. So TODO is added to
remind refactoring.

Bug: 178470649
Test: soong test
Change-Id: Id77f1ce94255b56a68f3e1d7446a68189c45ac54
2021-04-08 17:10:31 +09:00
Rupert Shuttleworth 2e845e53af Merge "Support arch variations for export_system_include_dirs in cc_library_headers bp2build converter." am: 64a90286c4 am: 197a03958b am: 4f95eb9f95
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1665920

Change-Id: I81dd1f49fabd9ca42fd0faaa4aef213551c052e5
2021-04-08 07:46:05 +00:00
Jose "Pepe" Galmes 93362b658e Merge changes from topic "vendor_snapshot_remove_suffix" am: 37ab310920 am: a490d18c10 am: d8440291d4
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1666002

Change-Id: I1536b75d199114c3ff8c5971bd8a41e221aeeb8f
2021-04-08 07:45:57 +00:00
Inseob Kim e06620c33a Automatically set Androidmk suffix of snapshot am: 1b6fb87654 am: 12cdfcba72 am: defa512778
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1664300

Change-Id: I79fd78a8ac7903295ea6fe731a3a25f8c7699078
2021-04-08 07:45:56 +00:00
Rupert Shuttleworth 64a90286c4 Merge "Support arch variations for export_system_include_dirs in cc_library_headers bp2build converter." 2021-04-08 00:54:47 +00:00
Rupert Shuttleworth b815168474 Support arch variations for export_system_include_dirs in cc_library_headers bp2build converter.
Test: Added unit test
Test: bp2build-sync.py write; bazel build //bionic/... works for more cc_library_static targets (in a parent CL)
Change-Id: Ib487216a4bcbc52958ff948722dae347b0d8b606
2021-04-07 16:05:44 +00:00
Liz Kammer 3f9e155f83 Handle simple prebuilt static libraries from bazel
Test: generate & sync BUILD files via bp2build && mixed build droid
Bug: 184192619
Change-Id: I27f0d76c88cbff25f3c7a805f3dfbb1eeaf8e771
2021-04-07 11:07:36 -04:00
Jiyong Park c7e592cdef cpp output of an AIDL file is together with the headers
For an AIDL file, five files are generated for the CPP backend: cpp
output, depfile, and three headers. Previously, the cpp output and the
dep file were created at <module_out>/gen/<abs_path_to_input_aidl>.cpp,
while the headers were at <module_out>/gen/aidl/<package_name>/*.h.

This not only looks inconsistent, but more critically makes it difficult
for the aidl compiler to infer the path to the headers that the build
system registered as implicit outputs. Inferring the implicit outputs
by the aidl compiler is needed because otherwise users will see the
error message from sbox just saying that some of the expected files are
not created. This can happen when the input AIDL file is put directly
into the srcs property without specifying the base directory, e.g.
some/subdir/android/foo/IFoo.aidl where the pacakge is actually
android.foo.

In order to make it easy for developers to fix such an error,
I0f23b6027ba3a4755cc2901f4a7f7fc70bffd0ef introduces a check in the aidl
compiler which is triggered earlier than the sbox error. The compiler
now enforces that the cpp output is at
<out_dir>/<package_name>/<type>.app. When the check fails, it suggests
to fix that by correctly feeding the AIDL file via filegroup and the
path property.

This change in Soong is required to satisfy aidl compiler when the base
directory is correctly set. The cpp output is now at
<module_out>/gen/aidl/<pacakge_name>/<type>.cpp.

Bug: 184586092
Test: aidl_unittests
Change-Id: I172180a40bded4f6c08679a2d862b086998be1e1
2021-04-07 21:49:34 +09:00
Jose Galmes f9523ed579 Fix arch in snapshot DepsMutator.
Suffixes attached to snapshot modules are based on the main architecture
(e.g. "arm64" for aosp_cf_x86_64_phone-userdebug), not the architecture
of arch variants.

Bug: 184588077
Bug: 184695066
Test: Run unit tests using:
Test: source build/envsetup.sh
Test: m -j nothing
Change-Id: Id8d002d45864a6fb12d642b60011e7a9eaf29e07
2021-04-07 11:45:25 +00:00
Inseob Kim 1b6fb87654 Automatically set Androidmk suffix of snapshot
Androidmk_suffix has been captured with "m vendor-snapshot". But the
suffix is to avoid collision with core variants, so the suffix should be
based on the existence of core variants. This change sets the suffix by
using OtherModuleDependencyVariantExists. This way we can also avoid
mutators and global states.

Bug: 179665538
Test: m nothing (soong test)
Change-Id: I35343aa2c4c07782057b82e6dd0e705a786e55fc
2021-04-07 17:24:08 +09:00
Ryan Prichard a467ea4870 Merge "Remove libgcc toolchain libs for Android" am: 3f3bb83f81 am: f72c6f2e44 am: a5934e3408
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1663859

Change-Id: Ia4b0f7de3bac88ab90a3ca0a6dd647117275aa7c
2021-04-07 00:15:50 +00:00
Ryan Prichard 3f3bb83f81 Merge "Remove libgcc toolchain libs for Android" 2021-04-06 21:43:33 +00:00
Christopher Parsons 6c025c3929 Merge "Fix note_memtag bionic libraries in mixed builds" am: b7c6a7ef36 am: 27798cb5d6 am: ff2a9c6ada
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1663541

Change-Id: I0d248d953a3a9463c5eb87ed37e5c9e4dd156c7b
2021-04-06 19:54:54 +00:00
Christopher Parsons b7c6a7ef36 Merge "Fix note_memtag bionic libraries in mixed builds" 2021-04-06 17:57:59 +00:00
Jingwen Chen 14ac490b34 Merge "Add target/os configurable string_list attrs." am: 8f8029a92b am: 695b00f3fc am: c72347401b
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1664303

Change-Id: I6775cb20a8e62c98591ba18fb8c2870236eef9b5
2021-04-06 11:48:35 +00:00
Jingwen Chen 8f8029a92b Merge "Add target/os configurable string_list attrs." 2021-04-06 09:47:24 +00:00
Treehugger Robot dd62393313 Merge changes Id33bf640,I4d67b9b9 am: 8c56183fb7 am: b17e061ae9 am: a7fe23c458
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1663139

Change-Id: Ic1434fc150e802f3a6e8b58a9a6f3e16e93da146
2021-04-06 05:29:49 +00:00