Commit Graph

6123 Commits

Author SHA1 Message Date
Colin Cross
c1b3644e91 Remove versioned LLNDK stubs
Nothing links against the versioned LLNDK stubs, only current and the
implementation are used.  Remove the numbered LLNDK variants.

Also remove llndkStubDepTag, it is never used to add a dependency.

Test: TestLlndkLibrary
Change-Id: Idde62007d77b8e6ceee31144c05756faf9b41f23
2021-05-06 23:50:22 +00:00
Elliott Hughes
b6788c0dc5 Remove most of the remaining references to gccCmd.
Bug: http://b/185257607
Bug: http://b/147452927
Test: treehugger
Change-Id: I5d2a8530b539811b9cb8147939b6adfaac115cc8
2021-05-06 12:25:56 -07:00
Elliott Hughes
afcd339d96 Remove unused parts of the strip implementation.
The --use-gnu-strip option was removed from the shell script already,
and it no longer uses the $CROSS_COMPILE environment variable.

Bug: http://b/185257607
Bug: http://b/147452927
Test: treehugger
Change-Id: If9f7b75d52c1e9cd167d73eeba8f77054ffd63a7
2021-05-06 12:12:43 -07:00
Justin Yun
e2be70736e Merge "Define test_min_vndk_version for cc_test" am: fc7ff27992 am: 9e13c7c6de am: 08bbdb7ac8
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1695288

Change-Id: I0e109235d18bcfb791aab8a2f812436be26330da
2021-05-06 10:53:11 +00:00
Lukacs T. Berki
c72820ab33 Refactor how bp2build gets arch-specific props. am: 598dd00236 am: a2f68505af am: 94175d42b9
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1697045

Change-Id: If3bbdae1561f1835ffacfe0271ecd7b5e03fc7d9
2021-05-05 10:19:58 +00:00
Justin Yun
46f66059e9 Define test_min_vndk_version for cc_test
If a cc_test module defines test_options.test_min_vndk_version, the
test runs only if the ro.vndk.version of the device is defined as a
version code name or an integer value that is higher than or equal to
the value in the test_min_vndk_version proprety.

Also, move the existing test_min_api_level property to test_options
struct.

Bug: 186786268
Bug: 187258404
Test: manual test
Change-Id: I43f1cca5b60f102298726332d374e4b14c425948
2021-05-05 18:47:23 +09:00
Lukacs T. Berki
598dd00236 Refactor how bp2build gets arch-specific props.
Then plumb them to LabelAttribute.

This refactoring is required because the previous implementation did not
handle properties in shards other than the first one (e.g.
version_script) well. In addition, it also makes the code paths between
bp2build and analysis more similar.

Bug: 186650430
Test: Presubmits.
Change-Id: Ic4393e8ae47f4e88816bf45c89399efd61494d22
2021-05-05 09:00:01 +02:00
Treehugger Robot
7308ea3915 Merge "bp2build: build static version of libstdc++." am: ee4e7fe76f am: 5603f8daac am: 6ea1ef4dde
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1693386

Change-Id: Ib6f3b7778ab8c3dab23f5ccaa61a456af4545644
2021-05-04 09:50:55 +00:00
Treehugger Robot
ee4e7fe76f Merge "bp2build: build static version of libstdc++." 2021-05-04 08:46:37 +00:00
Jingwen Chen
179856a69d bp2build: build static version of libstdc++.
This CL adds the ability to filter cc_library modules to only generate
their static variant of their shared variant isn't ready.

For example, the libstdc++ library is buildable as a static library,
which libc depends on. However, the shared variant of libstdc++ depends
on libc, which has to come later.

This CL introduces that abstraction to break up bp2build conversion into
more atomic steps to help with conversion.

Test: TH (bazel build //bionic/... incl. libstdc++'s static variant)
Bug: 186489250
Bug: 186822597

Change-Id: I3e2fe748e4e3d3b656760da4807f342d67c8f45f
2021-05-04 02:06:41 +00:00
David Srbecky
f1a849b1d7 Merge "Use create_minidebuginfo tool instead of bash script." am: 67f8051a86 am: 140b0d8ac6 am: eb6141f003
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1690871

Change-Id: Ic6d9000fece99f04ca3583737497caaf8035b36b
2021-05-03 16:41:34 +00:00
David Srbecky
67f8051a86 Merge "Use create_minidebuginfo tool instead of bash script." 2021-05-03 15:42:01 +00:00
Treehugger Robot
9549a3b092 Merge "Add debug ramdisk variant." am: cbaef6ff0f am: 33edfca5da am: 919995fc96
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1690925

Change-Id: I9f8f5d7d65fb842879a63fcd084c1c392c806e36
2021-05-03 00:55:50 +00:00
Treehugger Robot
cbaef6ff0f Merge "Add debug ramdisk variant." 2021-05-02 23:54:40 +00:00
David Srbecky
69315e4ea7 Use create_minidebuginfo tool instead of bash script.
The behaviour is semantically identical, however,
the tool additionally sorts the symbols by address,
compresses frame unwind information more efficiently,
and improves random-accessibility for lazy decompression.

Overall, the changes balance and the output size is same,
however, libunwindstack can access the data much faster
while using less memory (due to the lazy decompression).
It will also enable further improvements in the future.

Bug: 110133331
Test: ART unwinding tests, run prefetto on the device.
Change-Id: Id48f9fe67fb67fcf2b90cc3b217b71bb8f5147ca
2021-05-01 00:06:07 +01:00
Lukács T. Berki
9dd3c62bd1 Merge "Handle the version_script property." am: dac1db044b am: 8e9c7d9212 am: 30b77b329e
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1690878

Change-Id: Ie1f640f7e1be2f99bdd9b1a7ae9aa6c472e16559
2021-04-30 15:14:32 +00:00
Lukacs T. Berki
1353e59690 Handle the version_script property.
Doesn't work when depends on arch/target/etc., but good enough for
libdl_android.

Bug: 186650430
Test: Presubmits.
Change-Id: Ib0facb41a89454717c74663e5e078aedd33d1b9c
2021-04-30 16:46:41 +02:00
Colin Cross
94ec969e9b Merge "Remove global state from vendor public libraries" am: e07056af41 am: ce7b244e33 am: 0d2aae4366
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1689271

Change-Id: I6b3fd41bf20697f6bd2226620881e2608a016eae
2021-04-29 17:08:03 +00:00
Colin Cross
e07056af41 Merge "Remove global state from vendor public libraries" 2021-04-29 16:16:42 +00:00
Inseob Kim
08758f08e9 Add debug ramdisk variant.
A module will be installed to /debug_ramdisk if debug_ramdisk is set to
true.

This is a reland of f84e9c05e2, with a fix
that removes /first_stage_ramdisk.

Bug: 184004542
Test: soong test
Change-Id: I739de63cfec6b0fec5a90f7c4741fc4d884d209c
2021-04-29 22:58:17 +09:00
Jingwen Chen
dced5fe04d Merge "bp2build: make libdl build." am: a4a930feef am: b5267deaf2 am: 5ada02a02f
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1688296

Change-Id: I477374e839bde37981135e123dc6919cd563a9a2
2021-04-29 11:23:19 +00:00
Jingwen Chen
53681ef590 bp2build: make libdl build.
This CL adds support for the static and shared props, forwarding
whole_static_libs and srcs to the underlying shared library's
static_deps and static library's srcs respectively.

Test: TH
Fixes: 186609667
Change-Id: I84f838361c7758b256b2a163af894c502de03109
2021-04-29 08:59:02 +00:00
Colin Cross
8ddd62ec7a Merge "Remove obsolete llndk_library" am: 5423a9c513 am: d9be64ea31 am: 4646975e32
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1687470

Change-Id: I2c3e45786305e3b1854c9448b89f0a82177acf13
2021-04-29 03:37:41 +00:00
Colin Cross
5423a9c513 Merge "Remove obsolete llndk_library" 2021-04-28 23:25:06 +00:00
Treehugger Robot
2e4f8b9612 Merge "Add GetEmbeddedPrebuilt and IsModulePrebuilt" am: 6065b0666a am: d6dcaa9cfd am: 3aa5cc2d5b
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1689388

Change-Id: I9a26bccb457bdba5a426ff4403d6181f41aa0e2c
2021-04-28 20:24:38 +00:00
Paul Duffin
f7c99f5983 Add GetEmbeddedPrebuilt and IsModulePrebuilt
Dedups the many repetitions of the code to obtain a *Prebuilt from a
module.

Bug: 177892522
Test: m nothing
Change-Id: I1ededbe9ee79e89ea6dd8882dfee4be0bf0b51b7
2021-04-28 14:02:04 +01:00
Colin Cross
331eb8976d Merge "Remove llndk_headers" am: 09a2a2ce3a am: e1f1e843e0 am: 2e1c620c86
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1687469

Change-Id: I82629853031a3f12cffab591e15da216a4e85788
2021-04-28 02:52:10 +00:00
Colin Cross
09a2a2ce3a Merge "Remove llndk_headers" 2021-04-28 01:53:47 +00:00
Christopher Parsons
a0cff02c76 Merge "Mixed builds: propagate includes from cc_* targets" am: 1c4621af62 am: bbd6afc3fd am: fc295efce3
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1688945

Change-Id: I91e7a4243a34eab20acef77e87b2ee35b74e9261
2021-04-28 00:22:18 +00:00
Colin Cross
5271fea26c Remove global state from vendor public libraries
Remove the global list of vendor public library modules used to rewrite
dependencies from the vendor module to the stubs for system modules,
and replace it with building the stubs directly in the system variant
of the vendor module.

Bug: 178231622
Test: vendor_public_library_test.go
Change-Id: I826e69ffd507d7e85fa3d4d85b5157428c642143
2021-04-27 16:26:00 -07:00
Pirama Arumuga Nainar
551b06d9e6 [cc/coverage] Define a macro during coverage builds
Bug: http://b/186576313

During a coverage build, pass the __ANDROID_CLANG_COVERAGE__ macro to
native compilations.  This allows tools like dalvikvm and dex2oat, which
would otherwise call _exit(), to write profiles on coverage builds by
calling exit() instead.

Test: `m CLANG_COVERAGE=true NATIVE_COVERAGE_PATHS="art" nothing`
          and check compiler flags in out/soong/build.ninja.
Change-Id: I18315b89170abdd650e4c6c55577688348c42225
2021-04-27 23:17:27 +00:00
Steven Moreland
3c42f57ec2 Merge "apex: remove use_vendor" into sc-dev 2021-04-27 22:58:47 +00:00
Chris Parsons
f60ecf081e Mixed builds: propagate includes from cc_* targets
This allows us to remove libasync_safe from the mixed builds denylist.

Test: mixed_libc.sh CI script
Change-Id: Ibafd231284864078bf30340f919d39e5098843ce
2021-04-27 15:04:37 -04: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
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