Commit graph

7495 commits

Author SHA1 Message Date
Alix
1be00d4e48 filter unknown clang cflags in bp2build
filtering out no longer useful flags in bp2build conversion

Test: cc_library_shared_conversion_test
Bug: 231995978
Change-Id: I5172f6d07a8928291bbc11bd8802678b33cc5b1f
2022-07-29 12:17:25 +00:00
Mu-Le Lee
c56d40cb54 Merge "Move LLNDK ABI dumps from vndk/ to platform/" am: 6f84b7763e
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/2147824

Change-Id: Id6244f29c95d41aeb7c7207fc741fa70e74307b3
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-07-22 11:03:05 +00:00
Mu-Le Lee
6f84b7763e Merge "Move LLNDK ABI dumps from vndk/ to platform/" 2022-07-22 10:44:06 +00:00
Treehugger Robot
afa6a56bd4 Merge "Fix typo" am: 576bacae1d
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/2162377

Change-Id: I4f74dac3e4eb4ecddd72e06d0388a0f39a381af2
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-07-21 22:30:23 +00:00
Treehugger Robot
7394062b10 Merge "Add option to allow unknown warning options" am: 485127c76e
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/2161661

Change-Id: I7b659585ddf16e206a1f6e5d6abc94df87d90636
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-07-21 22:29:58 +00:00
Treehugger Robot
6d84fa2212 Merge "Update clang version to clang-r458507" am: a9eef7bd2d
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/2160498

Change-Id: I6caf51563be9c4df4f8894af4c4cb880f8fd7e0a
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-07-21 22:29:23 +00:00
Treehugger Robot
576bacae1d Merge "Fix typo" 2022-07-21 17:32:49 +00:00
jiajia tang
cd1c27b33f Fix typo
Signed-off-by: jiajia tang <tangjiajia@xiaomi.com>
Change-Id: I23bec7b08c11c33a06dd13eb7b60ea38d4f26a11
2022-07-21 18:04:37 +08:00
Yi Kong
f7f69e4992 Add option to allow unknown warning options
Some build targets pulls cflags from build/soong but has its own choice
of compiler version. This causes errors for due to unknown warning
options. This allows them to suppress such checks.

Test: presubmit
Change-Id: Ia89508d6b92481fb1ed0c90f1fdb4d8e54566349
2022-07-21 15:49:05 +08:00
Yi Kong
eb8d04e589 Update clang version to clang-r458507
Test: presubmit
Bug: 236798112
Change-Id: Iff8df2b5c7faf359d0554994586bbc984b7a1856
2022-07-21 06:43:09 +00:00
Yi Kong
f77a1a55f8 Merge "Enable -Wmisleading-indentation for 1p projects" am: 1b3d5f836c
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/2099784

Change-Id: Ifd673171b918739bb800cf9a5a8410d8a057e115
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-07-19 17:11:24 +00:00
Yi Kong
1b3d5f836c Merge "Enable -Wmisleading-indentation for 1p projects" 2022-07-19 16:53:32 +00:00
Elliott Hughes
f08a664127 Enable -Wmisleading-indentation for 1p projects
Bug: http://b/232926688
Test: treehugger
Change-Id: I7e3458f23e9b2e7a229a4a3eada5d98bdf4731d0
2022-07-19 11:51:59 +00:00
Treehugger Robot
03c590b4e1 Merge changes I0484ea34,I188e4824 am: b3f18a9f9f
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/2153678

Change-Id: I412a85473760a3dc7915984d013350edb00ad74b
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-07-19 06:44:19 +00:00
Treehugger Robot
b3f18a9f9f Merge changes I0484ea34,I188e4824
* changes:
  Distinguish # apex and # systemapi symbols
  Refactor symbolfile script
2022-07-19 06:24:04 +00:00
Jiyong Park
ffea9b3b0e #apex symbols no longer contribute to platform libraries
Bug: 239274367
Test: m
Change-Id: I7a6cd0f46071d5dbbf9510df5693a0d6b95e10c0
2022-07-19 13:47:19 +09:00
Jiyong Park
85cc35a143 Distinguish # apex and # systemapi symbols
Previously, the symbol tag `# apex` was treated the same as `#
systemapi`. With this CL, they have different meanings.

`# systemapi`: APIs that are defined in the platform (the non-updatable
part), and are exposed to unbundled system components like APEX

`# apex`: APIs that are defined in the APEX and are exposed to the
platform or other APEXes

Bug: 239274367
Test: m
Change-Id: I0484ea349656dbbd337e5fe3a5970f0ad275b807
2022-07-19 13:47:19 +09:00
Jiyong Park
3f9c41d2f5 Refactor symbolfile script
Introduce the class `Filter` which encapsulates conditions
(architecture, api level, whether llndk is included, etc.) so that we
don't need to touch many places everytime a new condition is added.

In addition, refactor test_symbolfile to reduce duplications

This CL doesn't add a new functionality.

Bug: 239274367
Test: run test_ndkstubgen and test_symbolfile
Change-Id: I188e482492d39ec18134ecc5c908f0d288a754a9
2022-07-19 13:47:15 +09:00
Treehugger Robot
dd3de9731a Merge "Move libFlags as well to the RSP file for link actions" am: e3048505c0
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/2145559

Change-Id: Ie8157ee7782841a2d4eda9719289b36f0f2faa0f
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-07-18 05:06:03 +00:00
Treehugger Robot
e3048505c0 Merge "Move libFlags as well to the RSP file for link actions" 2022-07-18 04:50:41 +00:00
Yi Kong
5cac3ca30a Merge changes from topic "llvm-stable-r458507" am: cc3ad51a36
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/2153673

Change-Id: Id62c1a0f693e22b73c96f5494f0c937df72a1cb9
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-07-15 07:46:42 +00:00
Yi Kong
cc3ad51a36 Merge changes from topic "llvm-stable-r458507"
* changes:
  [bindgen] Allow unrecognised -Wno-* flags on LLVM_NEXT
  Add extra cflags for LLVM_NEXT
2022-07-15 07:30:57 +00:00
Cory Barker
842a6c9b2f Merge "Adding support for building AFLpp Test: Build AFL fuzzers locally and ran them" am: b1c8940be1
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/2151702

Change-Id: I8872f7a563bfd04d315f4577060176a4eefee55d
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-07-14 16:45:56 +00:00
Yi Kong
b79fc584c7 Add extra cflags for LLVM_NEXT
The staging compiler update sometimes needs additional cflags to build, but those flags may not be recognised by the current compiler. Add a
new `llvmNextExtraCommonGlobalCflags` section and only append those
flags when LLVM_NEXT is set.

Test: LLVM_NEXT=true m
Bug: 236798112
Change-Id: Icc4687950acd44798b2cf09131a425ddfd919214
2022-07-13 07:47:56 +00:00
Cory Barker
a1da26fa9b Adding support for building AFLpp
Test: Build AFL fuzzers locally and ran them

Change-Id: Ie4fbd258c87663cf81d7d64d575b3da1d5febc17
2022-07-12 21:31:47 +00:00
Cory Barker
3eb2a62110 Merge "Revert "Adding support for building AFLpp Test: Build AFL fuzzer..."" am: 14058f2c4a
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/2151853

Change-Id: Iee4f2067de7dbc952d2e99672fead78e20342719
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-07-12 20:40:44 +00:00
Cory Barker
7bc91232d1 Revert "Adding support for building AFLpp Test: Build AFL fuzzer..."
Revert submission 2124256-AFLpp support in Soong

Reason for revert: It is breaking the build
Reverted Changes:
Ie07ec3368:Adding support for building AFLpp Test: Build AFL ...
I5bd6d1e9b:Adding support for building AFLpp Test: Built AFL ...

Change-Id: Id2eec1060f7532fec46293d0c207be800e6eaa03
2022-07-12 18:04:17 +00:00
Cory Barker
9f4fb94778 Merge "Adding support for building AFLpp Test: Build AFL fuzzers locally and ran them" am: 7e0b4bae8a
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/2124256

Change-Id: Idd7529a0fcd1aa3819e042015df71e65b6c6a78f
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-07-12 17:39:55 +00:00
Cory Barker
f4b1c3a7a7 Adding support for building AFLpp
Test: Build AFL fuzzers locally and ran them

Change-Id: Ie07ec336892649192a844a4d0d231196673e34a0
2022-07-12 01:20:17 +00:00
Mu-Le Lee
85155c8ada Move LLNDK ABI dumps from vndk/ to platform/
Since vndk libraries don't need to maintain Cross-Version abi
compatibility. The newly proposed Cross-Version ABi checking mechanism
is applied to only ndk/ and platform/. The reference dumps of LLNDK
libraries should get from platform/ to be benefited from this checking
mechanism.

Test: mkdir -p prebuilts/abi-dumps/platform/UpsideDownCake/64/x86_64/source-based/ && cp prebuilts/abi-dumps/vndk/32/64/x86_64/source-based/libvndksupport.so.lsdump "$_"
      make libvndksupport -j
Bug: 238383845
Change-Id: I663511d60623cd23619166d8d63fd26220a930e2
2022-07-08 08:17:29 +00:00
Kousik Kumar
01332cf3b4 Move libFlags as well to the RSP file for link actions
This is to avoid hitting command-line length issues when building with
RBE enabled for C++ links.

TESTED=ran a build with link actions and saw command-line getting
shorter in size from verbose.log
Bug: b/237480728

Change-Id: Id66165159388554bb76579080c5a6979dd670d22
2022-07-04 20:34:57 +00:00
Treehugger Robot
82a2240a5c Merge "Remove alternative stl names in bp2build" am: 281d421f41
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/2132718

Change-Id: I1b10a03236cc2e83aa627e0b7cf70bbc1a3c74b5
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-07-01 15:11:46 +00:00
Treehugger Robot
281d421f41 Merge "Remove alternative stl names in bp2build" 2022-07-01 14:54:20 +00:00
Treehugger Robot
f4da9403f3 Merge changes I93edfd61,Icd23b542,I58c84607,Icfa73a75 am: 4d2f767217
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/2139101

Change-Id: I35551b07799c29cb56e2ffdaf7c1693b23f4f8d5
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-07-01 13:10:11 +00:00
Treehugger Robot
4d2f767217 Merge changes I93edfd61,Icd23b542,I58c84607,Icfa73a75
* changes:
  Pass -fno-sanitize=vptr,function for musl
  Use musl rust prebuilts for USE_HOST_MUSL=true
  Don't package host cross modules in javaFuzzPackager
  Add rust musl arm and arm64 toolchains
2022-07-01 12:46:58 +00:00
Colin Cross
6c18d004f2 Pass -fno-sanitize=vptr,function for musl
The prebuilts for musl have the necessary symbols for vptr and function
sanitizers, but enabling them implicitly enables RTTI which causes RTTI
mismatch issues with dependencies.

Bug: 215802826
Test: m USE_HOST_MUSL=true host-native
Change-Id: I93edfd617d99efcac0eca58bb3f3c173c4fa121a
2022-07-01 02:58:25 +00:00
Trevor Radcliffe
4e99f88d41 Merge "Add support and tests for export_*_lib_headers" am: 130d98f8b2
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/2134738

Change-Id: I7573ebe34941edc361d2f5f13ad55ee9394f06e1
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-06-30 17:49:47 +00:00
Trevor Radcliffe
130d98f8b2 Merge "Add support and tests for export_*_lib_headers" 2022-06-30 17:30:16 +00:00
Xin Li
42307c80c7 Merge "Merge tm-dev-plus-aosp-without-vendor@8763363" into stage-aosp-master 2022-06-29 21:16:54 +00:00
Trevor Radcliffe
2be7f54b45 Add support and tests for export_*_lib_headers
There are 3 different properties about exporting headers in Soong:

1. export_static_lib_headers
2. export_shared_lib_headers
3. export_header_lib_headers

The static and header cases are already supported in bp2build but
do not have tests. This CL adds support for the shared case and
adds tests for all cases.

Fixes: 236268577
Test: Unit tests
Change-Id: Idfb788271e607919d4ac6bc0e4eb4e6ff8f78e8d
2022-06-29 15:25:01 +00:00
Colin Cross
88a029f710 Reland: Don't use hwasan for non-bionic arm64 targets
Don't use hwasan for non-bionic arm64 targets, including
arm64-linux-musl and arm64 darwin.

This relands I67c07f26f25a9f9807ee21ee79c113ea11f65473 which was
accidentally reverted in I47a9322929baff2492c6e8db989ece01fcbeb133.

Bug: 236052820
Test: build arm64 musl sysroot
Change-Id: I77753ecb6f07aafa1b6e00ad6bf432f9c9744f79
2022-06-28 15:15:40 -07:00
Xin Li
313fdb5812 Merge tm-dev-plus-aosp-without-vendor@8763363
Bug: 236760014
Merged-In: I1421fb0dbcdb759281259abfae7bddc9aecdaa56
Change-Id: If059be00e6bdaaa94171b456afae1d585540639c
2022-06-28 21:23:06 +00:00
Vinh Tran
dd3ea92609 Merge "Replace API level codename with number" 2022-06-28 13:39:37 +00:00
Ivan Lozano
3742d6ad9e Merge "rust: Allow rust_ffi_shared in jni_libs" 2022-06-28 12:57:05 +00:00
Treehugger Robot
8624baab51 Merge "Move global asflags to config to share with Bazel" 2022-06-28 02:34:59 +00:00
Vinh Tran
f192474a60 Replace API level codename with number
This CL fixes a bug when Soong pass `-target` with a non-digit suffix in Clang. As mentioned in b/236753843, Clang's version parsing expects to see an integer in the target string so it ignores the
S suffix.

Test: m gwp_asan_crash_handler && make sure -target is aarch64-linux-androidS instead of aarch64-linux-android31
Test: go test -run ^TestNonDigitMinSdkVersionInClangTriple$ android/soong/cc
Bug: 236753843
Change-Id: I258ecc52083dbf3471d23cf310e0ad54440f1908
2022-06-28 01:33:18 +00:00
Liz Kammer
7128d38da5 Remove alternative stl names in bp2build
Test: bp2build.sh
Change-Id: Ie2bdac79306f9a5b50331f808f00187e172e46ab
2022-06-27 17:20:17 -04:00
Ivan Lozano
7f67c2a665 rust: Allow rust_ffi_shared in jni_libs
Allow listing rust_ffi_shared modules as a jni_libs dependency
in conjunction with platform_api: true. This allows inclusion by
android_app modules.

Bug: 237304791
Test: android_app module builds with a rust_ffi_shared dependency.
Change-Id: I3a28e1baa522ad8f9c2aa86f1d23b19ce9f967e1
2022-06-27 16:00:26 -04:00
Colin Cross
2bce04f76f Merge "Add linux_musl arm+arm64" 2022-06-27 18:37:07 +00:00
Evgenii Stepanov
943cfcec8e Merge "Revert "Revert "Keep minimal abort when enabling integer overflow check""" 2022-06-27 18:04:37 +00:00
Colin Cross
a9b2aacf07 Add linux_musl arm+arm64
Add toolchains to support cross compiling to aarch64-linux-musl and
arm-linux-musleabihf.

Bug: 236052820
Test: build arm and arm64 musl sysroots
Change-Id: I47a9322929baff2492c6e8db989ece01fcbeb133
2022-06-24 13:46:36 -07:00
Evgenii Stepanov
59012814a6 Revert "Revert "Keep minimal abort when enabling integer overflow check""
This reverts commit c480fbc5ef.

When cherry-picking this change to a branch, make sure that the target:
* either DOES NOT include
  https://android-review.googlesource.com/c/platform/build/soong/+/1980451/
* or includes
  https://android-review.googlesource.com/c/platform/build/soong/+/2130354/

Bug: b/235090315
Bug: b/235181175
Bug: b/233840743
Test: libcutils.so (in symbols) includes more than 0 and less than 10 functions
      with __ubsan_handle in the name, and does not export any.

Change-Id: I4f30b5814b5460468004efcc543cc681ad0022dc
2022-06-24 13:21:40 -07:00
Yi Kong
c3977fa99b Use LLD for Darwin host binaries
Test: m adb
Bug: 236924555
Change-Id: I4c793eb93af37fd7fe16991d20fcfcc5001c5d18
2022-06-24 13:45:32 +00:00
Yi Kong
cf57a641ba Don't pass deprecated -single_module linker flag on Darwin
man ld:
> -single_module
>     This is now the default so does not need to be specified.

Bug: 236924555
Test: m adb
Change-Id: If33a5c955deca4548c57703b232a3b9c0eaa3563
2022-06-24 18:49:04 +08:00
Treehugger Robot
44c20b886f Merge "Don't use hwasan for non-bionic arm64 targets" 2022-06-23 23:51:00 +00:00
Colin Cross
438bd4af48 Don't use hwasan for non-bionic arm64 targets
Don't use hwasan for non-bionic arm64 targets, including
arm64-linux-musl and arm64 darwin.

Bug: 236052820
Test: build arm64 musl sysroot
Change-Id: I67c07f26f25a9f9807ee21ee79c113ea11f65473
2022-06-23 14:53:52 -07:00
Liz Kammer
e4d1bdaa57 Move global asflags to config to share with Bazel
Test: CI
Change-Id: Ib76bd63f9d021f581b232522d1206d968d7b1599
2022-06-22 21:02:08 +00:00
Trevor Radcliffe
58461be7d6 Merge "Remove implementation_deps from cc_library headers" am: 2923fa8bcf am: 073217461d
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/2127884

Change-Id: I21137fe037517d79e7087717b5caab1413356750
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-06-22 15:23:08 +00:00
Trevor Radcliffe
2923fa8bcf Merge "Remove implementation_deps from cc_library headers" 2022-06-22 14:45:18 +00:00
Trevor Radcliffe
fb6c522420 Remove implementation_deps from cc_library headers
Don't add implementation_deps to cc_library_headers in bp2build

Fixes: 236404654
Test: unit tests, USE_MIXED_BUILDS=1 m
Change-Id: I0f6a35c10284f261b6a8b7a4831655d5fa084977
2022-06-21 22:34:11 +00:00
Lukács T. Berki
28e86cdebd Merge "Migrate sanitizers to transition mutators." am: 5ad0185b63 am: c0d25950f2
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/2123434

Change-Id: I05b8668cd8b2b24c31bc07633e639f0492aa0cd9
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-06-18 20:17:49 +00:00
Lukács T. Berki
5ad0185b63 Merge "Migrate sanitizers to transition mutators." 2022-06-18 19:26:55 +00:00
Lukacs T. Berki
6c71676d6c Migrate sanitizers to transition mutators.
The logic is not 100% provably the same since HEAD was quite
confusing at some points, but I did make an effort to preserve
functional equivalence.

In case that effort was not enough, it should be pretty easy to
tweak the logic at HEAD since it's still quite malleable.

Bug: 231370928
Test: Presubmits.
Change-Id: I17b2efbfb5c4d0aedd922caed54ff8d857e578df
2022-06-18 06:20:28 +02:00
Treehugger Robot
f88731d0bc Merge "Reland: Fix -Wl,--exclude-libs for clang runtime libraries" am: e11164351a am: 967c9d6faf
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/2130354

Change-Id: I1d99655893c555077a7fcd12e9881d7abfb654d3
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-06-18 02:25:28 +00:00
Treehugger Robot
e11164351a Merge "Reland: Fix -Wl,--exclude-libs for clang runtime libraries" 2022-06-18 01:43:15 +00:00
Colin Cross
b6652c54e7 Merge "Revert "Fix -Wl,--exclude-libs for clang runtime libraries"" am: 3bd8c1bb3e am: 87037635da
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/2130353

Change-Id: I9bd8039dffee609b792463c3bf6dbf0d58096806
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-06-17 23:06:12 +00:00
Colin Cross
bf1ee022c4 Merge "Fix -Wl,--exclude-libs for clang runtime libraries" am: 3650bd0a0f am: f6926be3cb
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/2124262

Change-Id: Ia145365682f3a6415b6ad8a7612bb6aa511c01d4
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-06-17 23:06:02 +00:00
Treehugger Robot
9f7fa50427 Merge "Restrict IsSanitizerEnabled() to android.Config()." am: 1c6502eba2 am: 7125d5d606
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/2127446

Change-Id: Ie6b578793fa05304b869795af4e0ca4455b75d5b
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-06-17 23:05:53 +00:00
Colin Cross
3e5e778969 Reland: Fix -Wl,--exclude-libs for clang runtime libraries
The sanitize code was assuming that the names of the clang runtime
library modules were the same as their static library output files,
but that's not true after I39e2cf8ae14edf8510276dab38011afaef85822c.
Use the dependency to get the name of the library to pass to
-Wl,--exclude-libs.

This relands If6ca7838800c76f90105fb02d39e8a68cec96314 with a fix
for skipping tests that don't work on mac.
   
Bug: 235624976
Test: TestUbsan
Change-Id: I32894d10d24473ad48b6afc5663f91fa48a6a0ba
2022-06-17 22:48:22 +00:00
Colin Cross
3bd8c1bb3e Merge "Revert "Fix -Wl,--exclude-libs for clang runtime libraries"" 2022-06-17 22:16:42 +00:00
Colin Cross
567d98346c Revert "Fix -Wl,--exclude-libs for clang runtime libraries"
This reverts commit 59de280a48.

Reason for revert: Broke mac tests
Bug: 235624976

Change-Id: I358bb14ec565f106483378f4798e3fc88c491f8f
2022-06-17 22:15:00 +00:00
Colin Cross
3650bd0a0f Merge "Fix -Wl,--exclude-libs for clang runtime libraries" 2022-06-17 22:03:08 +00:00
Lukacs T. Berki
01a648afa0 Restrict IsSanitizerEnabled() to android.Config().
Turns out, the whole context is not needed and then let's not
plumb it any further than necessary.

Test: Presubmits.
Change-Id: I1a25738e5a6ca20dea0d973c2ce435b5e152399b
2022-06-17 08:59:37 +02:00
Chih-hung Hsieh
b4d031f788 Merge "Set NoWarningsAsErrorsInTidyFlags" am: 4fd41ddb4a am: 3850c88cbc
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/2122977

Change-Id: Ie41228e52143e4a24614c97e80b569c72e26c089
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-06-14 17:16:02 +00:00
Chih-Hung Hsieh
9f876e9eab Set NoWarningsAsErrorsInTidyFlags
* Reject -warnings-as-errors in the tidy_flags.
* Fix one grammar error in comment.

Bug: 229801437
Test: WITH_TIDY=1 make; make tidy-soong_subset
Change-Id: I4fae229add65131b64cd5a1d06507d27198010ed
2022-06-13 23:58:12 +00:00
Colin Cross
59de280a48 Fix -Wl,--exclude-libs for clang runtime libraries
THe sanitize code was assuming that the names of the clang runtime
library modules were the same as their static library output files,
but that's not true after I39e2cf8ae14edf8510276dab38011afaef85822c.
Use the dependency to get the name of the library to pass to
-Wl,--exclude-libs.

Bug: 235624976
Test: TestUbsan
Change-Id: If6ca7838800c76f90105fb02d39e8a68cec96314
2022-06-13 15:55:06 -07:00
Chih-hung Hsieh
88054dac68 Merge "Prepare to obsolete -warnings-as-errors in tidy_flags" am: 6ba1a7d661 am: 9096a6b0c1
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/2122976

Change-Id: I1d458e8b49f50112255dd54846e6661c5e4a4438
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-06-13 20:17:02 +00:00
Yu Liu
110f78ca8e Merge "Support cc code coverage for mixed build" am: 57c1edc4d9 am: 56868c621b
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/2103671

Change-Id: Ibe7fab143ee1ebbdbe4df73c1d173cc9c3c5a315
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-06-13 20:16:29 +00:00
Chih-hung Hsieh
6ba1a7d661 Merge "Prepare to obsolete -warnings-as-errors in tidy_flags" 2022-06-13 19:07:21 +00:00
Yu Liu
57c1edc4d9 Merge "Support cc code coverage for mixed build" 2022-06-13 18:57:50 +00:00
Chih-Hung Hsieh
794b81d9d1 Prepare to obsolete -warnings-as-errors in tidy_flags
* A follow up CL will set const NoWarningsAsErrorsInTidyFlags
  and make it an error to use -warnings-as-errors in tidy_flags.
* Append TidyGlobalNoChecks after local tidy_checks to disable some checks.
* Append TidyGlobalNoErrorChecks after local tidy_checks_as_errors
  (-warnings-as-errors) to allow some warnings globally.
* Move bugprone-signed-char-misuse and bugprone-branch-clone to
  globalNoErrorCheckList so we can find and fix some of those warnings.

Bug: 229801437
Test: WITH_TIDY=1 make; make tidy-soong_subset
Change-Id: I0128b859b7be6eb9bbda1916b89a6a471b052150
2022-06-12 20:25:43 -07:00
Treehugger Robot
139cee9521 Merge "Revert "Keep minimal abort when enabling integer overflow check"" am: 85f2c4eadc am: 288d88b244
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/2122286

Change-Id: I8050c0dea79de4f7b8b50bd4000557c642c94636
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-06-11 04:17:11 +00:00
Treehugger Robot
85f2c4eadc Merge "Revert "Keep minimal abort when enabling integer overflow check"" 2022-06-11 03:32:19 +00:00
Colin Cross
0d7bd9deb6 Merge "Use -fdebug-default-version=4 for assembly files" am: 49fc44f6b2 am: 96aad8abcf
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/2120563

Change-Id: Ib8863b915723faae69be8f11abc9b38e5f5224f6
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-06-10 20:32:39 +00:00
Chih-hung Hsieh
d84cfaf477 Merge "Disable tidy checks in TidyGlobalNoChecks" am: 6f9312127c am: eae21b5c3d
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/2120564

Change-Id: Id8a3ef4046dbb89a7b8ed3240298d76413fe5ad5
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-06-10 20:31:57 +00:00
Evgenii Stepanov
c480fbc5ef Revert "Keep minimal abort when enabling integer overflow check"
This reverts commit 34448f2430.

Reason for revert: RAM regression + something mainline related
Bug: b/235090315
Bug: b/235181175
Bug: b/233840743

Change-Id: Ia1d1b1428c19b1e297dc75618d640bdac81713b0
2022-06-10 19:47:26 +00:00
Colin Cross
49fc44f6b2 Merge "Use -fdebug-default-version=4 for assembly files" 2022-06-10 18:32:35 +00:00
Chih-hung Hsieh
6f9312127c Merge "Disable tidy checks in TidyGlobalNoChecks" 2022-06-10 18:01:08 +00:00
Yasin Kilicdere
aa02f8fc0b Revert "Disallow -warnings-as-errors in tidy_flags" am: 5a8ce13c2a am: a3cc2a6b11
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/2122465

Change-Id: Iadf24ea22c108d6c4556ce6b9758c36d6f547ebb
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-06-10 15:03:02 +00:00
Yasin Kilicdere
5a8ce13c2a Revert "Disallow -warnings-as-errors in tidy_flags"
This reverts commit 2d481842b1.

Reason for revert: b/235569235#comment4

Change-Id: I5c87b1d5a1bdf0bad7f436c397688fe3fc20d04e
2022-06-10 12:18:07 +00:00
Chih-Hung Hsieh
c650faa8e5 Disallow -warnings-as-errors in tidy_flags am: 2d481842b1 am: f3a8ef4231
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/2080669

Change-Id: I918c00e10ed94af1fefdc292464534be7cfd5faf
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-06-10 09:55:42 +00:00
Chih-Hung Hsieh
43b920e707 Disable tidy checks in TidyGlobalNoChecks
* Save repeated strings in TidyFlags of build.ninja rules.
* Some of these checks were disabled to upgrade clang-tidy.
  They could later be moved to TidyDefaultGlobalChecks and
  TidyExternalVendorChecks if not breaking the build.
  Some projects can then enable those checks locally.

Test: WITH_TIDY=1 make; make tidy-soong_subset
Change-Id: I70e4218c929e3c88f766f2c68c56c51356110e72
2022-06-09 17:58:41 -07:00
Chih-Hung Hsieh
2d481842b1 Disallow -warnings-as-errors in tidy_flags
* Also remove the undocumented complicated
  experiment to overwrite local warnings-as-errors.

Bug: 229801437
Test: WITH_TIDY=1 make; make tidy-soong_subset
Change-Id: I2fb32146b4685ab9f5198724c15c303f799b7a14
2022-06-09 11:12:10 -07:00
Colin Cross
cdcb680dbd Use -fdebug-default-version=4 for assembly files
-fdebug-default-version=5 is causing $TMPDIR to end up in the dwarf
debug data, which causes the buildbot results to be nondeterministic.
Pass -fdebug-default-version=4 for assembly files as a workaround.

Bug: 235105792
Test: lunch aosp_arm-userdebug && m libbase && llvm-dwarfdump --debug-line out/target/product/generic/symbols/system/lib/libbase.so
Change-Id: Ife04e3c898bbb1291f71b8365fbca854cd2d2b66
2022-06-09 11:08:50 -07:00
Trevor Radcliffe
d456182dd1 Merge "Enable Mixed Builds for Prebuilt Library" am: 74e8df0741 am: d6b70adce7
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/2101150

Change-Id: Ia64712d0ca085e856c569ac6d06e58299d54e34b
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-06-08 14:53:08 +00:00
Trevor Radcliffe
74e8df0741 Merge "Enable Mixed Builds for Prebuilt Library" 2022-06-08 13:51:13 +00:00
Hsin-Yi Chen
4108552615 Merge "Remove unneeded logic from sourceAbiDiff" am: 6e9225d53c am: 76e7546a6b
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/2114875

Change-Id: I5768c30f4e80a65e0bb998c0700a7210c915e19d
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-06-08 03:46:25 +00:00
Hsin-Yi Chen
6e9225d53c Merge "Remove unneeded logic from sourceAbiDiff" 2022-06-08 02:12:58 +00:00
Yi Kong
455b84363a Merge "Remove sampling profile support from pgo rule" am: 0e12680a2e am: 8067d9c871
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/2117277

Change-Id: If3ef3a3ae492057d6509e431e32cd9765d1663de
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-06-07 21:56:21 +00:00
Chih-hung Hsieh
cdcb038d47 Merge "Shorten the -checks flag in clang-tidy rules" am: 7fd85c45f8 am: 6f807b422e
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/2116278

Change-Id: I8e87c5fa1dee29dba6e999cd55ac40e79c7ea959
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-06-07 21:56:10 +00:00
Yi Kong
0e12680a2e Merge "Remove sampling profile support from pgo rule" 2022-06-07 21:20:45 +00:00
Chih-hung Hsieh
7fd85c45f8 Merge "Shorten the -checks flag in clang-tidy rules" 2022-06-07 21:14:14 +00:00
Trevor Radcliffe
5d6fa4d857 Enable Mixed Builds for Prebuilt Library
This change provides support for mixed builds for
cc_prebuilt_library modules and allowlists some such modules.

Fixes: 225938765
Test: Unit tests, run mixed builds and verify correctness
Change-Id: I04396c79661df6b9a43907859e4f96d0191e8e1b
2022-06-07 20:36:53 +00:00
Yi Kong
fe841868c2 Remove sampling profile support from pgo rule
Sampling profiles should use afdo rule instead.

Test: presubmit
Bug: 218791486
Change-Id: I6073da27d184a779be0f6796f336e6ec051beceb
2022-06-07 15:23:08 +08:00
Treehugger Robot
59d37c8bb6 Merge "Remove AIDL modules from VndkMustUseVendorVariantList" 2022-06-07 01:00:06 +00:00
Elliott Hughes
b85366e699 Merge "Revert "Disable BTI for now."" am: ba4a566e2d am: 0770744797
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/2020301

Change-Id: I9483bcf63e54ae8df300a3bef750575ac90d5aa4
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-06-06 21:14:43 +00:00
Elliott Hughes
ba4a566e2d Merge "Revert "Disable BTI for now."" 2022-06-06 20:10:56 +00:00
Yu Liu
8d82ac58b4 Support cc code coverage for mixed build
Bug: 231322627
Test: Manual tests and unit tests
Change-Id: I786042af0d612192c54c3572f63a86a47174a242
2022-06-06 12:29:25 -07:00
Liz Kammer
d9b3cf60c2 Merge "Do not hardcode default/experimental c{pp}std" am: ace70d857e am: 72627266b9
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/2106991

Change-Id: Idc6f6c058d2d1b1e5cd930adb9be52a8a33397b5
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-06-06 14:21:07 +00:00
Liz Kammer
ace70d857e Merge "Do not hardcode default/experimental c{pp}std" 2022-06-06 13:40:17 +00:00
Treehugger Robot
98306aa91c Merge "Keep minimal abort when enabling integer overflow check" am: dcec8e067b am: 48d7862515
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/2114953

Change-Id: Idbbb36f82d3198126a939e015506d5aa4fbd95da
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-06-06 10:18:47 +00:00
Treehugger Robot
dcec8e067b Merge "Keep minimal abort when enabling integer overflow check" 2022-06-06 09:45:12 +00:00
Treehugger Robot
01346ff1a6 Merge "Use single clang-tidy build rule and clang-tidy.sh" am: b12ae4f2bd am: 011e470e5e
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/2110906

Change-Id: I52e5741db934b6166c3f6a9bb75bb0c6726b4bc5
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-06-04 00:45:00 +00:00
Chih-Hung Hsieh
80e3e03aa9 Shorten the -checks flag in clang-tidy rules
* If a module defines tidy_checks with "-*",
  pass only "-*" and checks after it to clang-tidy.

Test: make tidy-soong_subset
Change-Id: I2a4a6111f67b934bc29e4e4fe8596a8dce4e7031
2022-06-03 17:17:17 -07:00
Treehugger Robot
b12ae4f2bd Merge "Use single clang-tidy build rule and clang-tidy.sh" 2022-06-04 00:06:26 +00:00
TreeHugger Robot
6f2ef6127c Merge "Remove AIDL modules from VndkMustUseVendorVariantList" into tm-dev-plus-aosp 2022-06-03 22:10:15 +00:00
Colin Cross
4ec2bf1467 Merge "Revert "Use --dependency-file when linking elf files."" am: b914e7f8c6 am: c43e5ff7cc
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/2115768

Change-Id: Ieed01217bf395e4951ff571a69b346327d584168
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-06-03 17:40:20 +00:00
Colin Cross
b914e7f8c6 Merge "Revert "Use --dependency-file when linking elf files."" 2022-06-03 16:53:54 +00:00
Jooyung Han
87f73e527c Remove AIDL modules from VndkMustUseVendorVariantList
Vendor variants of AIDL-gen CC modules are by default different from
core variants. So instead of adding them manually to the list, AIDL
builder can mark them as MustUseVendorVariant.

Bug: 233616647
Test: m
Merged-In: Ifca0eb64d60ecb49d72cd0347336b69fb332c58c
Change-Id: Ifca0eb64d60ecb49d72cd0347336b69fb332c58c
(cherry picked from commit b8d3df82ac)
2022-06-03 04:54:52 +00:00
Jooyung Han
43b2c668da Remove AIDL modules from VndkMustUseVendorVariantList
Vendor variants of AIDL-gen CC modules are by default different from
core variants. So instead of adding them manually to the list, AIDL
builder can mark them as MustUseVendorVariant.

Bug: 233616647
Test: m
Merged-In: Ifca0eb64d60ecb49d72cd0347336b69fb332c58c
Change-Id: Ifca0eb64d60ecb49d72cd0347336b69fb332c58c
2022-06-03 04:46:59 +00:00
Colin Cross
32320e89fd Revert "Use --dependency-file when linking elf files."
This reverts commit 97d87760b4.

Reason for revert: b/234772469

Bug: 137961579
Bug: 234772469
Change-Id: I478f5a2696e87144d0123e8872c9f8ac1d5f24b0
2022-06-02 23:02:01 +00:00
Hang Lu
34448f2430 Keep minimal abort when enabling integer overflow check
Cflag "-fsanitize-trap=all" will override "-fno-sanitize-trap=integer" if "-fsanitize-trap=all" is placed behind. Change the order to make minimal abort work, which will output the abort message to give user a better prompt.

Bug: 233840743
Test: "objdump -dS {CFI enabled so}" to check the instrumented abort instruction
Change-Id: Id85fa8ece3e13d1b21b4fdbf5f4b5124011890ca
2022-06-02 20:47:30 +08:00
Hsin-Yi Chen
dccddb6036 Remove unneeded logic from sourceAbiDiff
- The script creating reference dumps does not need --llndk. It can
  determine the library types automatically.
- NDK passes the ABI checks with -consider-opaque-types-different.
- All libraries checked by the ABI tools have exported headers and don't
  need -advice-only.

Bug: 232891473
Test: development/vndk/tools/header-checker/utils/create_reference_dumps.py \
      && make
Change-Id: Ia418022d6d0b46bfabefaa296fa81e80291fde32
2022-06-02 18:49:26 +08:00
Treehugger Robot
5d069fb876 Merge "Add diff_flags as a header_abi_checker property" 2022-06-02 04:14:57 +00:00
Chih-Hung Hsieh
30ab2f059f Use single clang-tidy build rule and clang-tidy.sh
* The old jobs of two build rules are now combined into
  a new clang-tidy.sh wrapper.
  The clang-tidy build rule now calls clang-tidy.sh.

Bug: 234406661
Test: WITH_TIDY=1 make; make tidy-soong_subset
Change-Id: I91961edf96e9a546f0c3088715a6f2ca8796a21b
2022-05-31 18:46:39 -07:00
Treehugger Robot
5a3b1c792c Merge "Remove -sha256 flag when calling bssl_inject_hash." am: ced67ded0b am: 7e786306df
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/2101112

Change-Id: Ied93aad59538ecae30b560265dbf63006f0e5e76
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-05-31 17:23:26 +00:00
Treehugger Robot
ced67ded0b Merge "Remove -sha256 flag when calling bssl_inject_hash." 2022-05-31 16:53:06 +00:00
Liz Kammer
a5a29de677 Do not hardcode default/experimental c{pp}std
Prevent bugs like b/232866078 by using the same values across Bazel and
Soong

Test: bp2build.sh
Change-Id: If257f9f5f8e8a70bbf3a8cf5479758c703c25c3f
2022-05-27 09:38:03 -04:00
Hsin-Yi Chen
6ad1e4b5ea Add diff_flags as a header_abi_checker property
The property allows developers to add extra flags to header-abi-diff for
specific libraries.

Bug: 232891473
Test: m libbinder.vendor
Change-Id: I203af73c784dfc7738bb64f57b224c08d5c595ce
Merged-In: I203af73c784dfc7738bb64f57b224c08d5c595ce
(cherry picked from commit 4f992b663f)
2022-05-26 15:12:37 +08:00
Hsin-Yi Chen
ab255ae347 Merge "Add diff_flags as a header_abi_checker property" into tm-dev am: 39a9db3bae
Original change: https://googleplex-android-review.googlesource.com/c/platform/build/soong/+/18482834

Change-Id: I6f53043eead9258ecc9903a3d779ed04df60aef2
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-05-26 05:24:08 +00:00
Hsin-Yi Chen
39a9db3bae Merge "Add diff_flags as a header_abi_checker property" into tm-dev 2022-05-26 04:21:54 +00:00
Trevor Radcliffe
2bb24935e4 Merge "Generate genlex rules from bp2build for cc targets" am: 5731d0fffd am: c68fbc38e7
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/2092784

Change-Id: I91cba2b4927db6e1284efcf82161f81f4216bebb
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-05-25 20:32:59 +00:00
Trevor Radcliffe
5731d0fffd Merge "Generate genlex rules from bp2build for cc targets" 2022-05-25 19:38:15 +00:00
Yi Kong
6faa9b759a Merge "Enable string-compare warning" am: f13a66adfd am: e99fbffa25
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/2098017

Change-Id: I615039bbe1d8ba084bda367b836184b4c6606475
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-05-25 08:02:30 +00:00
Yi Kong
f13a66adfd Merge "Enable string-compare warning" 2022-05-25 07:02:34 +00:00
Muhammad Haseeb Ahmad
35ca6bc67f Merge "Make IsSanitizerEnabledForJni return false" am: 53a129db89 am: e353655540
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/2105764

Change-Id: Icb9a49ce6817fe2f7fa6a6d35b6b2345cd07035c
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-05-25 06:59:42 +00:00
Muhammad Haseeb Ahmad
e6567fe56b Make IsSanitizerEnabledForJni return false
Change-Id: I5e1722bc32b63649fc9973d11e9fd5bdea72ddbe
Test: m
2022-05-25 00:13:08 +00:00
Liz Kammer
3d704c2826 Merge "Handle multiple linkages in sdk snapshots" am: 91f10eccc6 am: 1446249224
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/2097793

Change-Id: I5f428f85d998cde7a90d3cf361480a66363ae3db
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-05-24 14:55:28 +00:00
Trevor Radcliffe
ef9c900ec3 Generate genlex rules from bp2build for cc targets
This change will cause bp2build to generate genlex targets any
time a .l or .ll file is present in the srcs for a cc target and
add those genlex targets to the srcs attribute of the original
target.

Bug: 207408632
Test: unit tests
Change-Id: I1bce82c9d3c3d458eae1cef547ffae3d6e975134
2022-05-24 14:42:51 +00:00
Liz Kammer
91f10eccc6 Merge "Handle multiple linkages in sdk snapshots" 2022-05-24 14:13:19 +00:00
Yi Kong
8ecb22d402 Enable string-compare warning
Test: presubmit
Bug: 153764102
Change-Id: I6fbf7a841cb6ea7bc8433fd2fddd5a825f68aa22
2022-05-24 16:16:21 +08:00
Liz Kammer
a99444cf9d Merge "Remove library decorator for extracting headers" am: 707f65d3d5 am: f5e9440e45
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/2097186

Change-Id: Id8724a1650f87ab39809ebf5abdeb9b4034ca3dd
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-05-23 20:02:54 +00:00
Christopher Parsons
424baa8f24 Merge "cc bazel handlers: use better interface checking" am: b002f87d2e am: 6be00cbfac
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/2098663

Change-Id: I500bf1f35121d0ae51c56703928d05e4df04a53f
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-05-23 20:02:00 +00:00
Liz Kammer
707f65d3d5 Merge "Remove library decorator for extracting headers" 2022-05-23 19:36:57 +00:00
Christopher Parsons
b002f87d2e Merge "cc bazel handlers: use better interface checking" 2022-05-23 18:54:50 +00:00
Treehugger Robot
a2a665b40e Merge "Clean up some bp2build technical debt" am: 5bec8d41ea am: d5c19f1eb9
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/2075729

Change-Id: Ia782f52cc1dfb7a43cef80f8fd374160b0208526
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-05-23 18:53:44 +00:00
Treehugger Robot
5bec8d41ea Merge "Clean up some bp2build technical debt" 2022-05-23 18:01:04 +00:00
Yi-yo Chiang
b421d787b2 Merge "Add android.hardware.gnss-V2-ndk to VndkMustUseVendorVariantList" into tm-dev am: 6fc324a9e0
Original change: https://googleplex-android-review.googlesource.com/c/platform/build/soong/+/18473525

Change-Id: I10dfdeec83a8bd75fd744d9de9cf4590553794fa
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-05-23 16:43:38 +00:00
Liz Kammer
96320dfff8 Handle multiple linkages in sdk snapshots
Currently, if the same library is specified for multiple of native_libs,
native_shared_libs, and native_static_libs for different arch/oses,
there can be a few errors:

1. specifying a .so file as `srcs` within a cc_prebuilt_library rather
than being specified only for shared
2. the final type of prebuilt library is dependent on the arch/os

This change introduces:
* an ability for a member type to override the type for specified
  properties
  * checks for a library being used with incompatible member types
  * basing linkage nesting on the member type in addition to variants

  This will ensure that the correct library type is used, regardless of
  the order of iteration over oses/arches, and support nesting linkages
  where necessary but only one linkage variant exists.

Test: soong tests
Test: CI
Change-Id: I81dee013b09b99c34ca6c18f9cfcc12ee56d33d1
2022-05-23 10:51:22 -04:00
Christopher Parsons
89aeb9181b Merge "Refactor mixed builds to only take one pass" am: 489128b8ef am: 935261d614
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/2094705

Change-Id: I64c79ef138c4a5ee8e6197d2ce2b50bb7397ea7d
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-05-20 16:15:37 +00:00