Commit Graph

5688 Commits

Author SHA1 Message Date
Steven Moreland
3c42f57ec2 Merge "apex: remove use_vendor" into sc-dev 2021-04-27 22:58:47 +00:00
Colin Cross
db4827278d Merge "Add support for cc_library_headers to replace llndk_headers" am: 8fb66f48c7 am: 2e9f993439 am: 2a1eb2b563
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1687471

Change-Id: If11311fab123d878c3bd702e7e918fcb0e480e8b
2021-04-27 17:42:55 +00:00
Colin Cross
8b4fe4fc08 Merge "Skip default dependencies for header libraries" am: 4ba70ab48e am: e125ff0d7b am: ec17b78b49
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1687468

Change-Id: Ica73f6d083258d9ced85ee4a25f6f5a7e3715aeb
2021-04-27 17:42:49 +00:00
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
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