Commit Graph

6123 Commits

Author SHA1 Message Date
Jiyong Park
7d55b61783 Rust module in APEX uses stub libraries across APEX boundaries
This change fixes a bug that rust module in APEX has access to private
symbols of a native library even when the native library is outside of
the APEX.

To fix this, the stub selection logic in the cc package is exctacted as
a function ChooseStubOrImpl and is used also in the rust package.

Bug: 190767845
Test: m
Merged-In: I5c4cbdd5d27f257ab329d9dadbcd87d41a87f46a
Change-Id: I5c4cbdd5d27f257ab329d9dadbcd87d41a87f46a
(cherry picked from commit 3b5f88e091)
2021-06-24 11:27:41 +09:00
TreeHugger Robot
89f175d8c7 Merge "Propagated srcs from cc_defaults to cc_prebuilt_library_shared." into sc-dev am: ffc9ae993a
Original change: https://googleplex-android-review.googlesource.com/c/platform/build/soong/+/15084348

Change-Id: Ib6f3da05acf25c7af0bc1f4d0b36ca15759c8367
2021-06-24 00:27:51 +00:00
TreeHugger Robot
ffc9ae993a Merge "Propagated srcs from cc_defaults to cc_prebuilt_library_shared." into sc-dev 2021-06-24 00:18:56 +00:00
Yu-Chi Cheng
24b2b0fd0c Propagated srcs from cc_defaults to cc_prebuilt_library_shared.
Bug: 191185522
Test: verified on local P21 devices.
Change-Id: I3bab7144213934f6832000793ee6cbc49abd3beb
2021-06-23 15:56:39 -07:00
Treehugger Robot
46f4457c61 Merge "Disable ubsan diagnostics under HWASan." am: 31b66c76c8 am: 15102f14d9
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1744757

Change-Id: Ieb7602c1b61edc09e4a83bf22375d4ae5584ee52
2021-06-23 22:07:41 +00:00
Evgenii Stepanov
e57ca4ccc3 Disable ubsan diagnostics under HWASan.
This is a workaround for a compiler bug that makes this combination
extremely slow to build.

Bug: 191808836
Test: m net_test_btm_iso with SANITIZE_TARGET=hwaddress
Merged-In: Ide7436bbc564413cb2f29355ada5286976607205
Change-Id: Ide7436bbc564413cb2f29355ada5286976607205
(cherry picked from commit b15a564869)
2021-06-23 15:06:00 -07:00
Treehugger Robot
31b66c76c8 Merge "Disable ubsan diagnostics under HWASan." 2021-06-23 21:30:46 +00:00
satayev
09a45d755f Merge "VNDK APEX: skips VNDK-Ext" am: 17c4507dec am: 125bba00cf
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1744554

Change-Id: Ic32f9b3df65b747e5126a50d65b472f4fe3df9df
2021-06-23 20:24:59 +00:00
Evgenii Stepanov
b15a564869 Disable ubsan diagnostics under HWASan.
This is a workaround for a compiler bug that makes this combination
extremely slow to build.

Bug: 191808836
Test: m net_test_btm_iso with SANITIZE_TARGET=hwaddress
Change-Id: Ide7436bbc564413cb2f29355ada5286976607205
2021-06-23 12:57:46 -07:00
Jooyung Han
7d6e79bc63 VNDK APEX: skips VNDK-Ext
In legacy VNDK mode (DeviceVndkVesion=""), the check was missing. We
don't want VNDK-Ext in VNDK APEX in any case.

Bug: 191770320
Test: m nothing
Change-Id: I08f36a4c1696bf82d25d629841e172d2716a366d
2021-06-24 01:56:03 +09:00
Colin Cross
9ecb42dd31 Add default_shared_libs property
Building against a locally-built libc besides bionic requires setting
system_shared_libs to avoid circular dependencies, but modules all
over the tree assume that system_shared_libs only affects modules
building against bionic.  Add a new default_shared_libs property
that applies to all modules, which will generally be set in
arch-specific clauses to only affect the desired set of modules.

Bug: 190084016
Test: m checkbuild
Change-Id: Ia2349d84c70e503916f90a5d2702e135248f73df
2021-06-22 16:54:40 -07:00
Colin Cross
d1a2813063 Move default crt objects into Toolchain
Move the crt objects spread around cc/library.go and cc/binary.go
into the Toolchain.  This will simplify adding new toolchains that
have custom crt objects.

Test: m checkbuild
Test: go test ./cc/...
Change-Id: I7fdc1f53769799cb9c10e3e5816dabee0f918768
2021-06-22 16:54:40 -07:00
Colin Cross
c85446836d Add DefaultSharedLibraries to Toolchain
Move the default value for system_shared_libs out of linker.go and into
a new DefaultSharedLibraries method in Toolchain.  This will simplify
adding system_shared_libs to cc_object, and adding new toolchains with
different default system_shared_libs.

Test: m checkbuild
Test: go test ./cc/...
Change-Id: I422315f090be20719c08a4d33bd39b0b26a93d6c
2021-06-22 16:54:39 -07:00
Colin Cross
e3fee34a3d Create toolchainBionic for the various bionic-based toolchains to inherit from
Host bionic and each of the device bionic architectures will share some
new toolchain functionality in common, create a toolchainBionic and embed
it into the toolchains.  Use it to implement Bionic() once and change
the default implementation from true to false.

Test: go test ./cc/...
Test: m checkbuild
Change-Id: Ia34b80d9691edc4ab1cbdbd005d1ffc950d0881c
2021-06-22 16:54:39 -07:00
Inseob Kim
2b33796316 Add install_in_root to cc_binary am: 800d114003 am: 6fa77e896d
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1736433

Change-Id: I64bdfcae1a7d939a89e0e37f9016fd46eedaf96c
2021-06-18 18:14:53 +00:00
Pirama Arumuga Nainar
8195cdf8e3 [cc/pgo] Mark pgo.sampling property as an arch-variant
Bug: http://b/189438896

This allows disabling sampling PGO for some arches.

Test: Build this topic.
Change-Id: Ib6ddca6685c2e53092afd440ad95ec42d3a9538b
Merged-In: Ib6ddca6685c2e53092afd440ad95ec42d3a9538b
(cherry picked from commit 19a5aae35e)
2021-06-18 11:11:46 -07:00
Inseob Kim
800d114003 Add install_in_root to cc_binary
To support init_first_stage, install_in_root property is added to
cc_binary. The output is installed to {partition}, rather than
{partition}/{mount_point}/bin.

Bug: 187196593
Test: build init_first_stage
Change-Id: Ibc351645308676ed188f748972eb6312c9cbd64f
2021-06-18 05:25:44 +00:00
Pirama Arumuga Nainar
6f901fa4f4 Merge changes from topic "libbinder.stable.abi" into sc-dev am: 95a4bedc68
Original change: https://googleplex-android-review.googlesource.com/c/platform/build/soong/+/15003839

Change-Id: I0fd9c68aa671abe7a8d2e4bb2c707247c9ae314d
2021-06-17 23:03:37 +00:00
Lukács T. Berki
ed539ad624 Merge "Make the IsSdkVariant field and method the same." am: 419117ee89 am: 288dc903aa
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1738338

Change-Id: If641ea419f7458f7650085404b64da4f041c05c9
2021-06-17 12:12:56 +00:00
Lukacs T. Berki
2063a0d7b8 Make the IsSdkVariant field and method the same.
Before, the IsSdkVariant() method also checked AlwaysSdk(). Instead,
sdkMutator now sets the IsSdkVariant field to True even for the single
variation it creates when AlwaysSdk is true.

Test: Presubmits.
Change-Id: Ied8b42a3441a30484ef8c5dff5aade5fe92574bb
2021-06-17 09:32:36 +02:00
Pirama Arumuga Nainar
19a5aae35e [cc/pgo] Mark pgo.sampling property as an arch-variant
Bug: http://b/189438896

This allows disabling sampling PGO for some arches.

Test: Build this topic.
Change-Id: Ib6ddca6685c2e53092afd440ad95ec42d3a9538b
2021-06-16 22:01:41 -07:00
Colin Cross
2613002a07 Merge changes from topic "ndk_libandroid_support_late_static_libs" am: 9fb2d1fb62 am: fe6f1e6fd0
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1736360

Change-Id: Ic91c7d7085e6eb2f5387c965452afd54fe207323
2021-06-16 22:21:38 +00:00
Colin Cross
9fb2d1fb62 Merge changes from topic "ndk_libandroid_support_late_static_libs"
* changes:
  Use LateStaticLibs for ndk_libandroid_support
  Move LateStaticLibs after SharedLibs in the dependency include order
  Test include directory ordering
2021-06-16 21:54:37 +00:00
Pirama Arumuga Nainar
84dcdc819e Merge "Revert "Switch to clang-r416183d"" am: 8d24812be7 am: 8f5a60cac9
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1736920

Change-Id: If04d6fdb4e8bc7b0b9ed3d247c01681e991f8079
2021-06-16 20:42:44 +00:00
Pirama Arumuga Nainar
8d24812be7 Merge "Revert "Switch to clang-r416183d"" 2021-06-16 20:00:18 +00:00
Pirama Arumuga Nainar
e6f19467c1 Revert "Switch to clang-r416183d"
Revert submission 1737013-switch-to-clang-r416183d

Bug: http://b/191276541
Bug: http://b/189328402

Reason for revert: Breaks renderscript_mac build
Reverted Changes:
I25142ddaa:[scripts/symbol] Switch to clang-r416183d
If11e59638:Switch to clang-r416183d

Change-Id: I9e95b4823f111d4482f9fbb5da48acc62f74cc8c
2021-06-16 18:26:49 +00:00
Treehugger Robot
bd545b2aca Merge "Switch to clang-r416183d" am: 2f1b9cb86a am: 9bd077aa5e
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1737013

Change-Id: I9053c5ebb4761900b007f71740dac36e9cf1b091
2021-06-16 18:18:55 +00:00
Treehugger Robot
2f1b9cb86a Merge "Switch to clang-r416183d" 2021-06-16 17:46:24 +00:00
Colin Cross
cc351c4b48 Merge "Use a linker script for host bionic embedded linker sections" am: 956e32c1be am: ca1129695e
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1735344

Change-Id: I7d03c244965df18361a93ba37b81bd1ab7106849
2021-06-16 17:18:30 +00:00
Colin Cross
e32bfdbbf4 Merge changes Ie384089d,Ie2e954cd am: baf4f0c30a am: d701a34838
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1735343

Change-Id: I8e9df129e07529835e47475e8683447fc5d6dd51
2021-06-16 17:18:24 +00:00
Colin Cross
4f184811cc Stop injecting symbols into host bionic binaries am: f04eb99acc am: dc6e968a3f
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1735453

Change-Id: Ic03ee4f716e558af4d9d3d5223ae4385eb6627bb
2021-06-16 17:17:33 +00:00
Colin Cross
dc6e968a3f Stop injecting symbols into host bionic binaries am: f04eb99acc
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1735453

Change-Id: Iad472fd7acfca99e5da994429fb62a66c1d6b719
2021-06-16 17:03:59 +00:00
Colin Cross
956e32c1be Merge "Use a linker script for host bionic embedded linker sections" 2021-06-16 16:51:10 +00:00
Colin Cross
baf4f0c30a Merge changes Ie384089d,Ie2e954cd
* changes:
  Support genrules as CrtBegin and CrtEnd
  Support multiple CrtBegin and CrtEnd files
2021-06-16 16:50:59 +00:00
Colin Cross
f77d3804fc Merge changes from topic "host_bionic_no_inject"
* changes:
  Give extracted linker sections pretty names
  Stop injecting symbols into host bionic binaries
2021-06-16 16:50:05 +00:00
Jingwen Chen
f5e7cf3d04 Merge "Make SharedLibraryInfo comment clearer." am: d51502d238 am: b93952e849
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1736516

Change-Id: I11d6463bdffa6221d7bce0051dc879565254e6c5
2021-06-16 12:38:55 +00:00
Jingwen Chen
d51502d238 Merge "Make SharedLibraryInfo comment clearer." 2021-06-16 12:01:21 +00:00
Jingwen Chen
915b71d51d bp2build: group shared/static attrs into a struct. am: c4dc9b4f08 am: 7fc226d257
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1733748

Change-Id: I60e3fe1b4ddc4f4f25231c71a68aa95df8b4dd86
2021-06-16 07:41:11 +00:00
Jingwen Chen
c4dc9b4f08 bp2build: group shared/static attrs into a struct.
This makes bp2build generate these attrs into a Starlark dictionary,
passed into the cc_library macro directly. This makes the BUILD target
representation more similar to the Android.bp one, and also makes
it more legible.

Test: TH
Change-Id: I42b427cc4b22c6376d3d24e40b9af1692bb0c692
2021-06-16 05:40:37 +00:00
Jingwen Chen
702963e74d Make SharedLibraryInfo comment clearer.
Nit from aosp/1727935

Test: TH
Change-Id: I4cf6d63fb3b1f0bd1762d5e4ea261aa8f5a4b580
2021-06-15 23:44:13 +00:00
Treehugger Robot
da1ece0279 Merge changes I0aee679a,I7fb380a3 am: 3420b834d8 am: ffa60aa20f
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1728214

Change-Id: I91d664dadd6c9f33439dc51daa96faebb1ed3427
2021-06-15 23:34:56 +00:00
Treehugger Robot
3420b834d8 Merge changes I0aee679a,I7fb380a3
* changes:
  Add systemapi as an APEX synonym for stub maps.
  Refactor tag handling code in stub generator.
2021-06-15 22:59:10 +00:00
Treehugger Robot
e3c81a5f93 Merge "Don't enforce ordering for ABI validation." am: 45d7289e7c am: d4bca70a75
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1737316

Change-Id: I0fab89e1a416bfaac1d413c4a374d3954371bbb5
2021-06-15 22:19:47 +00:00
Pirama Arumuga Nainar
9b9d4ba696 Merge "Mark more fields in BaseLinkerProperties as arch variant" am: f9d141ee9a am: 9375585937
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1737314

Change-Id: Icd2bde982e369deae368dcedee752007c199f4e8
2021-06-15 21:44:37 +00:00
Treehugger Robot
45d7289e7c Merge "Don't enforce ordering for ABI validation." 2021-06-15 21:41:57 +00:00
Pirama Arumuga Nainar
28bc9698ef Mark more fields in BaseLinkerProperties as arch variant
Bug: http://b/189438896

This allows setting a different version script for vendor and
platform variants.

Test: The following blueprint snippet builds:
      target: { android_arm64: {
        target: vendor: {
            version_script: "..." } } }
(cherry picked from commit 250c5217a2)
Change-Id: Id0df2e89f87fb2b19e71d529cf00727e6b80b1c7
Merged-In: I47e7afeaee3c9124f4231bf0eece7b6844b5313d
2021-06-15 14:28:26 -07:00
Pirama Arumuga Nainar
f9d141ee9a Merge "Mark more fields in BaseLinkerProperties as arch variant" 2021-06-15 21:14:14 +00:00
Dan Albert
4922703e86 Don't enforce ordering for ABI validation.
We care that these run, but they don't need to complete before we use
the sysroot.

Test: mm in CTS, saw ABI dump run
Bug: None
Change-Id: Iff1961d1ff03430d808caa83b3ca1fc1eceecfcd
2021-06-15 13:26:55 -07:00
Pirama Arumuga Nainar
250c5217a2 Mark more fields in BaseLinkerProperties as arch variant
Bug: http://b/189438896

This allows setting a different version script for vendor and
platform variants.

Test: The following blueprint snippet builds:
      target: { android_arm64: {
        target: vendor: {
            version_script: "..." } } }
Change-Id: I47e7afeaee3c9124f4231bf0eece7b6844b5313d
2021-06-15 11:03:48 -07:00
Lukács T. Berki
b5db5a2b42 Merge "Update some comments about the image mutator." am: 84a1601804 am: 4c8d04dcf5
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1737526

Change-Id: I275d5ef464557b5faf99fa554b28bf9749b0cdc2
2021-06-15 16:45:35 +00:00