Commit Graph

5787 Commits

Author SHA1 Message Date
Colin Cross 8fb66f48c7 Merge "Add support for cc_library_headers to replace llndk_headers" 2021-04-27 16:40:48 +00:00
Colin Cross 4ba70ab48e Merge "Skip default dependencies for header libraries" 2021-04-27 16:40:37 +00:00
Jingwen Chen 2ac07ef533 bp2build: arch-specific exclude_srcs and srcs. am: e32e9e07d7 am: ced8f4de70 am: e502413a8e
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1684590

Change-Id: Iefff3fe126f3f434f123a7ef6be157a2df863f73
2021-04-27 13:45:19 +00:00
Jingwen Chen e32e9e07d7 bp2build: arch-specific exclude_srcs and srcs.
OS-specific exclude_srcs and srcs will be done in a follow-up, due to
complexities from merging multiple select statements together.

Test: TH
Bug: 186153868
Change-Id: I01b881e9a5a7cd41b4a507f8be7e9e65eab37bdc
2021-04-27 11:02:07 +00:00
Jingwen Chen 17e6aaa1dd bp2build: remove header globs in generated srcs. am: 882bcc1c1c am: 40079e7151 am: f097636e9d
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1687508

Change-Id: I5c60454f96cfb11d00afe0c6b89b3c44b13c5e2b
2021-04-27 10:37:44 +00:00
Jingwen Chen 882bcc1c1c bp2build: remove header globs in generated srcs.
Not needed anymore for bp2build-incremental since https://android-review.googlesource.com/q/topic:no-include-check.

Not needed for mixed builds either, since cc compile actions aren't sandboxed.

Fixes: 186488830
Test: treehugger and go tests

Change-Id: Ib5d4908dcce6bf910a653c457bb251d726e717d4
2021-04-27 06:26:40 +00:00
Colin Cross b861a9a53d Merge "Fix and test vendor public libraries for product modules" am: c30d7beb8f am: 7541409e7c am: 9667ee96d5
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1687467

Change-Id: I60d18435ae4a0527342f8f968363a5e5d8c7568c
2021-04-27 04:45:29 +00:00
Colin Cross ce0d7bff69 Merge "Move TestVendorPublicLibraries into vendor_public_library_test.go" am: e3f2869573 am: 406b79a250 am: bd20e7e216
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1687466

Change-Id: Ibe80935cd00a2852b1e3800c19863b49fedfb0aa
2021-04-27 04:45:22 +00:00
Steven Moreland 2c4000c7a6 apex: remove use_vendor
Should manually cut dependencies instead. Previously, this was used to
take advantage of the limited dependencies of variant libs in some APEXes.

Fixes: 175318864
Test: m nothing
Change-Id: Id559fd1bea5c8b8696cf7ab8acc711a7c3844d14
2021-04-27 02:08:49 +00:00
Colin Cross 203b421043 Remove obsolete llndk_library
Remove llndk_library in favor of cc_library with llndk.symbol_file.

Bug: 170784825
Test: m checkbuild
Test: TestLlndkLibrary
Change-Id: I43580976589a7a2a176d7442be53fa043c0c8324
2021-04-26 18:41:00 -07:00
Colin Cross 627280f091 Remove llndk_headers
Replace llndk_headers with cc_library_headers with
llndk.llndk_headers: true.

Bug: 170784825
Test: m checkbuild
Test: compare out/soong/build.ninja
Test: TestLlndkHeaders
Change-Id: I33b411cd4d474318796c2073375176b82dd8c216
2021-04-26 18:40:53 -07:00
Colin Cross 1f3f130e29 Add support for cc_library_headers to replace llndk_headers
Set llndk.llndk_headers: true to allow a cc_library_headers
module to be used by a cc_library module with llndk.symbol_file set.

Bug: 170784825
Test: TestLlndkHeaders
Change-Id: Ib65a4b70717dc9a54ae30f2991485bb1bb9b8409
2021-04-26 18:37:44 -07:00
Colin Cross be763f7b16 Skip default dependencies for header libraries
Header libraries don't compile anything, so they don't need the
default stl and libclang_rt dependencies.  Trimming the dependencies
simplifies using header libraries for LLNDK libraries, which need
extra variants that don't exist for the default dependencies.

Test: m checkbuild
Change-Id: Ib9864c3cc7048b2cc52acf304830777b65a51877
2021-04-26 18:23:45 -07:00
Colin Cross b719c0194e Fix and test vendor public libraries for product modules
Vendor public libraries are checked for product modules, but never
reached because the VNDK check occurs first, and wouldn't work anyways
because vendor_public_library did not have the product_available
property.  Reorder the rewrite checks and add VendorProperties, and
add a test.

Bug: 178231622
Test: vendor_public_library_test.go
Change-Id: Idbd2802fbd134d22c30600762cb0465633703506
2021-04-26 18:23:45 -07:00
Colin Cross f12db530d0 Move TestVendorPublicLibraries into vendor_public_library_test.go
Bug: 178231622
Test: TestVendorPublicLibraries
Change-Id: Ic57202a7e4e186483506ceca3125f3d6a855f3ff
2021-04-26 17:43:32 -07:00
Rupert Shuttleworth c28344a852 Add support for per-target exported includes. am: 375451edfe am: 0190e56ad0 am: cb584b1731
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1686625

Change-Id: Iee0049ab7a2e129cc34ba7c3e7619dc37eab8e8c
2021-04-26 14:25:47 +00:00
Rupert Shuttleworth 375451edfe Add support for per-target exported includes.
Test: Added unit test
Change-Id: I8ab58ddc73c15d5ec0f515e43407542bd4e8081a
2021-04-26 07:49:08 -04:00
Treehugger Robot a7a7781907 Merge "Incorporate cc_library_headers into mixed builds" am: 459c532e44 am: f3a8a7aeaf am: fc49cc7de6
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1673770

Change-Id: I2234c40a8b091e82da7417de483f92624870d6f1
2021-04-23 16:05:18 +00:00
Treehugger Robot 459c532e44 Merge "Incorporate cc_library_headers into mixed builds" 2021-04-23 15:14:55 +00:00
Treehugger Robot bc2cb768b5 Merge "Revert^3 "Add debug ramdisk variant"" am: 39e03144a0 am: f842949de1 am: af0fb26f44
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1684312

Change-Id: I3eed155076e03d06e190e0262e80522fefdaea3b
2021-04-23 14:02:48 +00:00
Liz Kammer b6a55bf065 Incorporate cc_library_headers into mixed builds
Test: go soong tests
Test: bp2build generate & sync; mixed build libc; mixed build su (su is
      an Android.mk target that relies on converted a cc_library_headers)
Bug: 181552740
Change-Id: I9efd587970551fd41f642a208f0aa0a80e8694e0
2021-04-23 09:37:33 -04:00
Treehugger Robot 39e03144a0 Merge "Revert^3 "Add debug ramdisk variant"" 2021-04-23 13:09:24 +00:00
Colin Cross 9bc6905cdb Merge changes from topic "remove_llndk_library1" am: 7c6a485f64 am: c8f4b51a87 am: 5a20f23b51
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1611943

Change-Id: Ief354bff9b8593f1d27b6cd1ec729edf6089b482
2021-04-23 00:41:47 +00:00
Colin Cross 8bb1e2b2c3 Dedup include dir paths am: c82e6e2e8f am: e9b1ad346d am: 31e3f9984f
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1682925

Change-Id: If688b048d1fc233cc4ad6fa2bb4e1d45ade2a6a0
2021-04-23 00:41:44 +00:00
Colin Cross e9b1ad346d Dedup include dir paths am: c82e6e2e8f
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1682925

Change-Id: Iada0f88cd8c9609e39b749ecc42c998c8ed30f72
2021-04-23 00:01:19 +00:00
Colin Cross 7c6a485f64 Merge changes from topic "remove_llndk_library1"
* changes:
  Support cc_library as LLNDK without llndk_library
  Dedup include dir paths
2021-04-22 23:33:29 +00:00
Inseob Kim aeb6bad073 Revert^3 "Add debug ramdisk variant"
836a8f3d61

Change-Id: If59529238e26a197bc33b10245b88f538f280ed0
2021-04-22 23:14:58 +00:00
Florian Mayer 602af75c16 Merge "Revert^2 "Add debug ramdisk variant"" am: 4d48aa5255 am: 723ac288a4 am: 17c91a2916
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1683875

Change-Id: I9486725cf4cd1b49f58af62f54a4d3749d5933e9
2021-04-22 17:22:19 +00:00
Florian Mayer 4d48aa5255 Merge "Revert^2 "Add debug ramdisk variant"" 2021-04-22 16:40:24 +00:00
Florian Mayer 836a8f3d61 Revert^2 "Add debug ramdisk variant"
78ea2f5eac

Change-Id: I6a6a2ee82e2807045364bab105ec03a1934b411f
2021-04-22 16:38:47 +00:00
Treehugger Robot 0b3271220f Merge "Revert "Add debug ramdisk variant"" am: f9c6744e28 am: ae210266fd am: e6bdf43b20
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1684345

Change-Id: Ic652022b750d9aad6f88f2feb742e0b84426cf9e
2021-04-22 16:18:05 +00:00
Treehugger Robot f9c6744e28 Merge "Revert "Add debug ramdisk variant"" 2021-04-22 15:28:06 +00:00
Jingwen Chen 26cb01c4a4 bp2build: refactor/standardize cc_* bp2build converters am: ed9c17d033 am: 0a52f7276e am: 8bddaab06a
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1674326

Change-Id: I5874807a960a030a8f7367d3ce877b2542100b84
2021-04-22 11:28:47 +00:00
Jingwen Chen ed9c17d033 bp2build: refactor/standardize cc_* bp2build converters
This CL refactors the cc* bp2build converters to use the common
attribute extractors in cc/bp2build.go.

This also adds include_build_directory to be handled by the compiler
attr extractor to generate recursive headers as inputs.

This also turns include_dirs and local_include_dirs into the
execroot-relative -I flags.

e.g. if a module in  bionic/libc has "private" in local_include_dirs,
the "-Ibionic/libc/private" copt is generated for it.

Fixes: 185139955

Test: TH
Test: Forrest for mixed_clean-droid
Change-Id: Ib67056482227e62068fbbea0455035bdf5d56319
2021-04-22 08:31:24 +00:00
Bowgo Tsai 78ea2f5eac Revert "Add debug ramdisk variant"
This reverts commit f84e9c05e2.

Because this breaks the usage of boot-debug.img and
vendor_boot-debug.img

Bug: 185970130
Bug: 185990198
Test: make bootimage_debug
Change-Id: I7886c971982faae1d5bc34688643de8d94d6e201
2021-04-22 09:49:24 +08:00
Elliott Hughes 04d2dcefa2 Merge "Move some make variables from GNU binutils to LLVM equivalents." am: 7c0abf6f3c am: 6b4a5ab97b am: fd6c513703
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1683506

Change-Id: I697975ae430c2a0760434d401b0190b87f0220bf
2021-04-22 00:31:07 +00:00
Elliott Hughes 7c0abf6f3c Merge "Move some make variables from GNU binutils to LLVM equivalents." 2021-04-21 22:59:09 +00:00
Elliott Hughes a960a0d5de Move some make variables from GNU binutils to LLVM equivalents.
There are others still to look at, but this set doesn't seem to break
anything for me.

Bug: http://b/147452927
Test: treehugger
Change-Id: I794684e23eee1326deb34bb4d5ed5831a47b8fa3
2021-04-21 10:22:55 -07:00
Jiyong Park 146ca5c18b Merge "android_system_image that generates linker.config.pb" am: 08bd0dd8c5 am: f8fa18e066 am: 6038c75c3c
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1679107

Change-Id: Iea767fc21e8922bc7a921e05b1048cc6e126db6c
2021-04-21 06:05:24 +00:00
Colin Cross 0fb7fcd3a6 Support cc_library as LLNDK without llndk_library
Allow cc_library modules to configure themselves as an LLNDK library
using llndk.symbol_file instead of llndk_stubs pointing to an
llndk_library module.

Bug: 170784825
Test: TestEmbeddedLlndkLibrary
Change-Id: Id884cdada7094bbea6809a98e687e039778c5dc6
2021-04-20 22:24:11 -07:00
Jiyong Park 08bd0dd8c5 Merge "android_system_image that generates linker.config.pb" 2021-04-21 04:57:49 +00:00
Colin Cross c82e6e2e8f Dedup include dir paths
Remove duplicates from include dir paths before setting
FlagExporterInfoProvider.  Duplicates often occur, for example due to
inheriting export_include_dirs from the static variant of a library to
the shared variant of the library that also gets the same
export_include_dirs.

Test: m checkbuild
Change-Id: I71f9e841547db64cbabcd95288ee93ef21fab4fb
2021-04-20 18:22:58 -07:00
Jiyong Park fa616137a2 android_system_image that generates linker.config.pb
android_system_image module type is a specialization of the
android_filesystem module type. Currently, it adds a build rule for
creating linker.config.pb from the information about all the other files
in the filesystem and includes linker.config.pb to the filesystem as
well.

To do so, the filesystem module now provides a function pointer which
subtype modules like android_system_image can implement to pass extra
files that they want to package in the filesystem.

In addition, the linkerconfig package is revised to make it possible to
build linker.config.pb file outside of the package.

Bug: 185391776
Test: m microdroid and inspect etc/linker.config.pb in it.

Change-Id: Id89c40b519213062860d7306029b8413d8d36a2d
2021-04-21 09:11:21 +09:00
Elliott Hughes 3a0767a47c Merge "Move builder.go over to llvm-objcopy." am: 2cb4cfc593 am: 9584abf7a3 am: 110617e984
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1680365

Change-Id: I85471ee3271ab499f1443eff01542c99225b75dc
2021-04-20 22:40:26 +00:00
Elliott Hughes 2cb4cfc593 Merge "Move builder.go over to llvm-objcopy." 2021-04-20 21:30:58 +00:00
Treehugger Robot 5204451f6a Merge "Move cc_object tests to object_test.go" am: a0b235a9d9 am: a82efc51e5 am: b6f6770985
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1679687

Change-Id: Iebcf9981307b08f83d69f69d28952f383551a98b
2021-04-19 23:49:32 +00:00
Treehugger Robot a0b235a9d9 Merge "Move cc_object tests to object_test.go" 2021-04-19 22:48:15 +00:00
Chris Parsons 5db4828abb Add a denylist for specifically mixed builds am: bab4d7e3bc am: 2678212a0f am: cd40ec4e44
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1677624

Change-Id: Ie9b5de425df4cc868fb851b49fefa0039900f50c
2021-04-19 20:12:36 +00:00
Elliott Hughes 2e70f79273 Move builder.go over to llvm-objcopy.
Bug: http://b/147452927
Test: treehugger
Change-Id: I60440e44669d226ca2ef2bcd8d0dbba59f01d43f
2021-04-19 12:58:43 -07:00
Liz Kammer 25f369fdca Move cc_object tests to object_test.go
Test: go test cc tests
Change-Id: I6a138482f678b6168b06b523ddbfeb639bf70364
2021-04-19 12:44:51 -04:00
Chris Parsons bab4d7e3bc Add a denylist for specifically mixed builds
This allows us to, for certain modules, enable bp2build, but disable
mixed builds.
This facilitates easier iteration on these two features, as modules can
be incrementally "fixed" for bp2build, even if they are not ready for
mixed builds integration.

Test: USE_BAZEL_ANALYSIS=1 m libc
Test: Manually verified that note_* modules exist in bionic/libc/BUILD
Test: bazel build //bionic/....
Change-Id: I3462c8398680140cfc953443d96196143b8ad0a3
2021-04-19 12:30:02 -04:00
Treehugger Robot a211c218df Merge "Add LLNDK stubs and headers to VNDK snapshot" am: 266fcfb850 am: 04d916ba64 am: 2ed0d7346e
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1677930

Change-Id: I3143fc53087f14939126db6af6595b3e1282211b
2021-04-17 15:00:59 +00:00
Treehugger Robot 266fcfb850 Merge "Add LLNDK stubs and headers to VNDK snapshot" 2021-04-17 13:46:32 +00:00
Treehugger Robot 33accf0115 Merge changes from topic "tvts-test-host-jni" am: aef14db78a am: 3640bc3f70 am: af25c6cab8
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1560314

Change-Id: I1894a0a5bc90eba3a8151813834864344c881790
2021-04-17 05:53:34 +00:00
Treehugger Robot aef14db78a Merge changes from topic "tvts-test-host-jni"
* changes:
  Add jni_libs property to java tests
  Add Target to cc.SharedLibraryInfo
2021-04-17 04:35:24 +00:00
Pirama Arumuga Nainar 8428b29596 Merge "Switch to clang r416183b 12.0.5." am: 27b5e614c8 am: a455f80d4d am: e1f3386154
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1677305

Change-Id: If614f76a682029efe07d2b7e04138bc52f7935aa
2021-04-16 17:53:50 +00:00
Pirama Arumuga Nainar 27b5e614c8 Merge "Switch to clang r416183b 12.0.5." 2021-04-16 16:39:34 +00:00
Justin Yun 450ae72314 Add LLNDK stubs and headers to VNDK snapshot
LLNDK stubs and headers are required to build the vendor modules
against VNDK snapshot libraries. Add the LLNDK stubs and headers to
the VNDK snapshot prebuilt files.
The stub libraries will be included in shared/llndk-stub directory.

Bug: 181815415
Test: development/vndk/snapshot/build.sh --build-artifacts
Change-Id: If518f3e91080e69fa1da94af0aa27320d4e71a08
2021-04-16 23:02:04 +09:00
Treehugger Robot 3199760848 Merge "Document stubs in cc_library." am: 0b21bf60b6 am: f9851054b9 am: 22971e3562
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1538221

Change-Id: Ief99c6f0d4fdcf550d21c9d8756f4ed2bc966ed6
2021-04-16 13:08:16 +00:00
Treehugger Robot 0b21bf60b6 Merge "Document stubs in cc_library." 2021-04-16 11:57:32 +00:00
Jiyong Park cc7628c5fa Merge changes Ib07d4410,I0b306292 am: 7b4fb51919 am: 24f37728ee am: 08956ce9b5
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1675766

Change-Id: If2a5d89e4e51b6a8813daf082a910f2dea91f604
2021-04-16 00:27:39 +00:00
Treehugger Robot 2619faa441 Merge "Remove draft API support." am: 7548b1ad05 am: 0ccb169046 am: c1499a90e2
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1674968

Change-Id: I281cb957b9214fdd9d90c6ec6e95c5c69a4f5c96
2021-04-16 00:27:22 +00:00
Jiyong Park 7b4fb51919 Merge changes Ib07d4410,I0b306292
* changes:
  ApexInfo doesn't pass MinSdkVersion as string, but as ApiLevel
  Remove nativeApiLevelFromUserWithDefault
2021-04-15 23:21:55 +00:00
Treehugger Robot 7548b1ad05 Merge "Remove draft API support." 2021-04-15 22:58:15 +00:00
Pirama Arumuga Nainar 8a71786b52 Switch to clang r416183b 12.0.5.
Bug: http://b/182416735
Test: Treehugger

Change-Id: Ibc26561baaec925c2c05ae710de24aaaab18bef5
2021-04-15 20:22:01 +00:00
Treehugger Robot 3c58641466 Merge changes from topic "userdebug_plat_sepolicy.cil_Android.bp" am: 638830a5a0 am: d8a1386fba am: 7d5dc83e3b
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1674328

Change-Id: Ic6146823d24ddbfcc7706d33ee2d17bad9471325
2021-04-15 07:20:23 +00:00
Jiyong Park 4eab21d5a2 ApexInfo doesn't pass MinSdkVersion as string, but as ApiLevel
ApexInfo is not part of the properties struct. It can handle structs
having private fields.

Bug: 1663140
Test: m
Change-Id: Ib07d4410f0ce187c9de347da34b84b814b2eb537
2021-04-15 15:17:54 +09:00
Treehugger Robot 507c35d88f Merge "Fix evaluation order of (Cfi|Memtag) exclude paths." am: d820c37425 am: 6ff0d4084e am: 4182f482f4
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1672705

Change-Id: I4c10f9ccf8cbaae2dc0e3b953e7c4db0368f073a
2021-04-15 05:50:56 +00:00
Treehugger Robot 638830a5a0 Merge changes from topic "userdebug_plat_sepolicy.cil_Android.bp"
* changes:
  Add debug ramdisk variant
  Add path tests for ramdisk
2021-04-15 05:22:35 +00:00
Jiyong Park ee9b117038 Remove nativeApiLevelFromUserWithDefault
... in favor of proptools.StringDefault

Bug: 1663140
Test: m
Change-Id: I0b3062921b25179cd1bf53856973fb67fe5cfc05
2021-04-15 14:00:00 +09:00
Treehugger Robot d820c37425 Merge "Fix evaluation order of (Cfi|Memtag) exclude paths." 2021-04-15 03:49:38 +00:00
Inseob Kim f84e9c05e2 Add debug ramdisk variant
A module will be installed to debug_ramdisk (or
debug_ramdisk/first_stage_ramdisk if recovery as boot is true) if
debug_ramdisk is set to true.

Bug: 184004542
Test: soong test
Change-Id: Ic5a4d27407e506fffa462de2149e0785f11b2ac7
2021-04-15 00:56:30 +00:00
Ivan Lozano a522909a17 Merge changes from topic "rust_vendor_support" am: d466b4a1f5 am: f910744984 am: 7248ef0378
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1666565

Change-Id: Ieecd4422963df3e0350a12ec5603b6e8d637661d
2021-04-14 20:39:59 +00:00
Ivan Lozano 66d93ea7a0 Merge "cc: Create a common image mutator interface" am: e8dfbdfb59 am: fddd9f9214 am: b248e45583
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1666563

Change-Id: I63bd64f572497ac7076b266dfed43fbd6ebf000d
2021-04-14 20:39:29 +00:00
Ivan Lozano d466b4a1f5 Merge changes from topic "rust_vendor_support"
* changes:
  Add more Rust vendor image support.
  rust: Use new common image mutator interface.
2021-04-14 19:02:49 +00:00
Ivan Lozano e8dfbdfb59 Merge "cc: Create a common image mutator interface" 2021-04-14 18:53:18 +00:00
Inseob Kim 2fb95e0dc6 Merge changes from topic "reexport_vndk_from_vendor_snapshot" am: ff5cc064c2 am: 52be5348c7 am: 9295f870c5
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1671539

Change-Id: I6aeedfc71cf76e16b0c6bf0b8a8a7f85a4c9c780
2021-04-14 02:37:03 +00:00
Inseob Kim 5f06f3b36e Add flag test for cfi snapshot am: f7aadf70d8 am: 15f5c18550 am: ba6af75d83
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1674225

Change-Id: I25ea400d3c331f60da288a01711da0445ae84eea
2021-04-14 02:36:59 +00:00
Inseob Kim 15f5c18550 Add flag test for cfi snapshot am: f7aadf70d8
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1674225

Change-Id: I10650f69e17beb616eadc45c7ae7f5de02b4ff85
2021-04-14 00:31:34 +00:00
Inseob Kim ff5cc064c2 Merge changes from topic "reexport_vndk_from_vendor_snapshot"
* changes:
  Support reexporting vndk from vendor snapshot
  Add flag test for cfi snapshot
2021-04-13 23:46:13 +00:00
Dan Albert d05ba00415 Remove draft API support.
This is unused and doesn't work with our current API review process
anyway (un-drafting an API won't be flagged for API council review).

Test: treehugger
Bug: None
Change-Id: I6d8fcc9885b82dac5ada7772d9e3fb9101524ece
2021-04-13 15:55:47 -07:00
Treehugger Robot 44a782d019 Merge "Add tests for request_type ParseResult functions." am: 6bd0a19b9d am: e41f177874 am: e236eb6394
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1672428

Change-Id: I519f147c9db2e60582a7e3537b724d2f39131900
2021-04-13 21:12:59 +00:00
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
Treehugger Robot 6bd0a19b9d Merge "Add tests for request_type ParseResult functions." 2021-04-13 19:08:11 +00:00
Evgenii Stepanov 779b64ec5d Fix evaluation order of (Cfi|Memtag) exclude paths.
Before this change, exclude paths disabled sanitization of targets that
would otherwise be enabled by SanitizeDevice product variable (aka
SANITIZE_TARGET).

With this change, in addition to the above logic, exclude path disables
sanitization of targets that would otherwise be enabled by the
corresponding include path.

Effectively, this change disables sanitization of targets that are
covered by *both* include and exclude paths.

Test: build/soong/cc/cc_test.go
Bug: b/184976817
Change-Id: I96f1e2a808d88b352b92b7490fa1df5c010314c3
2021-04-13 10:29:15 -07:00
Ivan Lozano c08897c1e4 Add more Rust vendor image support.
This adds Rust vendor image support for all module types except
Rust prebuilts.

Bug: 184042776
Test: New Soong tests.
Test: Example cc_library vendor module can depend on rust_ffi_shared.
Test: Example rust_library vendor-only module compiles.

Change-Id: Iaa30ad51fdaedcbf14687da5472581f6af62ff59
2021-04-13 13:17:12 -04:00
Liz Kammer 41cca851d9 Merge "Consolidate cc-specific cqueries." 2021-04-13 17:11:34 +00:00
Ivan Lozano 3a7d000d12 cc: Create a common image mutator interface
As part of adding Vendor support to Rust, refactor the image mutator in
CC to a new common image mutator interface so this logic can be reused
across both CC and Rust.

Bug: 184042776
Test: m nothing
Change-Id: Ia55d5ad840db7cf1a64d6c65ed86487230cb8742
2021-04-13 11:04:44 -04:00
Inseob Kim dd0295d774 Support reexporting vndk from vendor snapshot
Bug: 184795475
Test: soong test
Change-Id: I0146de55e2ef54c1c8abd42f0f4d8b4db7444350
2021-04-13 10:16:49 +09:00
Inseob Kim f7aadf70d8 Add flag test for cfi snapshot
Test: soong test
Change-Id: I651120b11f5b80c4b5f04172170afc533f24c54d
2021-04-13 10:15:31 +09: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 fe23bf3eb0 Add tests for request_type ParseResult functions.
Test: go test request_type_test
Test: bp2build generate & sync; mixed build libc
Change-Id: Id0b813e9de4d02d8625e42549999659ccb005c6d
2021-04-12 16:23:53 -04: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
Treehugger Robot 8c56183fb7 Merge changes Id33bf640,I4d67b9b9
* changes:
  Don't use incorrect version names like VER or BOARD even in tests
  SdkSpec = Scope + ApiLevel
2021-04-06 03:18:16 +00:00
Chris Parsons eefc9e6a62 Fix note_memtag bionic libraries in mixed builds
Required fixes:
  - Set MakeLinkType for libraries, even in mixed build mode.
  - Set snapshot header information to empty list, which passes
        validation logic for depending modules

Fixing these libraries also requires a Starlark change to
cc_library_static.bzl, which will be submitted separately.

Additionally, this adds better error messaging in the event that
output files are missing from a mixed-build library.

Test: USE_BAZEL_ANALYSIS=1 m libc
Test: USE_BAZEL_ANALYSIS=1 m runtime-module-sdk
Change-Id: Iad2c4d46359986fb0a43263292a15ed45fabbac7
2021-04-05 15:27:55 -04:00
Liz Kammer fe562e4749 Merge "Add bazel_module properties to cc_defaults" am: 9962daec01 am: b54a6c4457 am: 2fde0e00cf
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1660764

Change-Id: If1a59dfce1534d3de561c7f6aea136dbf43fa4c4
2021-04-05 14:27:58 +00:00
Liz Kammer 9962daec01 Merge "Add bazel_module properties to cc_defaults" 2021-04-05 12:33:21 +00:00
Jingwen Chen c1c2650532 Add target/os configurable string_list attrs.
Starting with copts for cc_object, with an extracted function that can
be shared with other cc_* module types.

Test: TH
Change-Id: I9025232e83a3dcd0ca243387486fafbdbd3e2d9b
2021-04-05 11:27:19 +00:00
Jingwen Chen f69daeccb5 Merge "Add os/target configurable selects for label list attributes." am: 1a6bbbd990 am: 16795963e9 am: 13c099f82d
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1652048

Change-Id: I1ad467167b89e94aacb82db3acfa044135743b62
2021-04-05 09:09:58 +00:00
Jingwen Chen 1a6bbbd990 Merge "Add os/target configurable selects for label list attributes." 2021-04-05 07:09:48 +00:00
Jiyong Park f58c46e36f Don't use incorrect version names like VER or BOARD even in tests
All version names will go through ApiLevelFromUser which triggers an
error when the name is not a valid one.

Bug: 175678607
Test: m
Change-Id: Id33bf64085603914d45ad7942cb8908a4734493f
2021-04-05 09:32:06 +09:00
Ryan Prichard c2018e2ed4 Remove libgcc toolchain libs for Android
Remove Android-targeting gcc toolchain libraries -- libgcc,
libgcc_stripped, libatomic, and libgcov. Also remove libunwind_llvm,
which is replaced with a libunwind toolchain prebuilt.

The __atomic_* library functions are now part of the compiler-rt
builtins library:

https://android-review.googlesource.com/c/toolchain/llvm_android/+/1625025

Bug: http://b/153025717
Test: treehugger
Change-Id: I971d0a4a49f1aaeb3546e80b6d94208277a171ac
2021-04-02 21:07:35 -07:00
Steven Moreland 889dc32103 Merge "Export header check allows WholeStaticLibs" am: f42daa716c am: 3f34589233 am: ed06f3b55e
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1662670

Change-Id: I74ff6ad6a2b4aaff4fb1e01dcd896a9b543c8a76
2021-04-02 17:37:44 +00:00
Steven Moreland f42daa716c Merge "Export header check allows WholeStaticLibs" 2021-04-02 16:03:59 +00:00