Commit Graph

8070 Commits

Author SHA1 Message Date
Yi Kong
88b94eac7c Move PGO profiles to its own subdir
This separates out AFDO profiles from PGO profiles.

Test: presubmit
Change-Id: I2c0b710199cae31773bd6c3b29a0ca7a4e338b47
2022-04-07 23:54:28 +08:00
Alex Hong
88a40df94e Add android.hardware.dumpstate-V1-ndk to vndkMustUseVendorVariantList
aidl libs need to be differentiated because they explicitly set
different system/vendor stabilities.

Test: make
Bug: 223118410
Change-Id: I5b6e3de9ae2630fea146d97f3de89edf5545ba50
2022-04-07 22:41:55 +08:00
Treehugger Robot
e6b2e97bed Merge "Enable deprecated-enum-enum-conversion warning" am: 2c3999050b am: 4fef0e2167 am: 99977a6b57
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/2057428

Change-Id: I01f022b8e9682b0c52939f3d75cbf68011f16662
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-04-07 13:03:24 +00:00
Yi Kong
25c1c005cf Enable deprecated-enum-enum-conversion warning
Test: presubmit
Bug: 153746563
Change-Id: Id54685056c4e6280dd2962527e11fb7efb840660
2022-04-06 16:34:41 +00:00
Sam Delmerico
7f88956c16 refactor Bazel variable export
Most of the variable export code for cc modules can be re-used for
exporting variables for java modules. Refactor this code into a more
composable structure for reuse.

Test: build/bazel/bp2build.sh
Test: manual comparison of
  out/soong/soong_injection/cc_toolchain/constants.bzl
  with previous output
Change-Id: Ie5a6fee08cc888b7dc69c3e324e5c3f8aa269a8f
2022-04-06 14:48:32 +00:00
Treehugger Robot
4017fc08c4 Merge "Enable enum-enum-conversion warning" am: 54f45e5c17 am: ec6b500e4d am: 33fbb89b4c
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/2057447

Change-Id: I54e4a62d8a5dc62bf6de7b970b5c79bf7ea22f1c
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-04-06 13:51:15 +00:00
Yi Kong
128b608f3c Enable enum-enum-conversion warning
Test: presubmit
Bug: 154138986
Change-Id: I1076e732118c138774ab377adc3273a41f7dde08
2022-04-06 14:32:02 +08:00
Treehugger Robot
421421ac43 Merge "Enable enum-float-conversion warning" am: ccba7e76bb am: 1dab0b06f1 am: 75fc9e2884
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/2054169

Change-Id: I24a6177eaad7ee197d2d830e602e9ccc70cac43a
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-04-05 21:53:04 +00:00
Trevor Radcliffe
e9b72c8800 Merge "Add support for test_suites to cc_test_library" am: 85b935eff2 am: 030b1e4dc0 am: 45841bca8c
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/2042844

Change-Id: I4a7dad94a83aba289aa15c19a3b664e49e89750e
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-04-05 16:30:04 +00:00
Yi Kong
4e309eebe8 Enable enum-float-conversion warning
Test: presubmit
Bug: 154255917
Change-Id: Ib419dbbf0f512551c35c618d2af69a29853f01ae
2022-04-06 00:02:13 +08:00
Trevor Radcliffe
85b935eff2 Merge "Add support for test_suites to cc_test_library" 2022-04-05 15:34:53 +00:00
Treehugger Robot
9f0ca9f3f2 Merge "Enable int-in-bool-context warning" am: 34f3673f54 am: 94d3cfa385 am: a8da9b10ad
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/2001832

Change-Id: Ifb364e9220065398fd1c62fca103ee502ffa1307
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-04-05 02:40:29 +00:00
Treehugger Robot
34f3673f54 Merge "Enable int-in-bool-context warning" 2022-04-05 01:21:10 +00:00
Trevor Radcliffe
f389cb4e35 Add support for test_suites to cc_test_library
Some cc_test_library modules will need to be installed for
compatibility test. This CL adds the capacity to use the
test_suites property to enable this behavior.

Fixes: 226402757
Test: Wrote unit tests, confirmed installation to proper dirs,
      and verified conversion that necessitated this change
Change-Id: I7313d4927d28aacad9e444962fd2a7efc6c3bc1f
2022-04-04 19:10:13 +00:00
Yi Kong
2baf2cf2bd Merge "Update to clang-r450784b" am: 07d9ca7de3 am: 2643d6fff3 am: 6be0db7381
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/2053446

Change-Id: I7b8be2da2a04fb2e058747c9cb2a008112c540cf
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-04-04 18:17:16 +00:00
Yi Kong
3f0358bfda Update to clang-r450784b
Test: presubmit
Bug: 219872355
Change-Id: I2ea4855dfcbe9dd297bbd3cf96a451c35038498d
2022-04-03 04:26:03 +08:00
Yi Kong
df95b3448f Enable int-in-bool-context warning
Test: presubmit
Bug: 148287349
Change-Id: I7916c8aec1fd014ef666df430574c6108ab1c01a
2022-03-31 07:12:59 +00:00
Colin Cross
652dbcaa9a Merge changes from topic "musl_clang_runtimes" am: 0f2a718ce4 am: e3f28d26a6 am: c068a7d423
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1980450

Change-Id: I45f717f96780715af04c0c4eef61bd4db763cc63
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-03-30 04:51:05 +00:00
Colin Cross
a152356349 Switch to libunwind to remove dependency on libgcc for musl am: 441898c285 am: b7ea2f5c7e am: d1b5f338e5
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1983628

Change-Id: I015e1b22dbcc2dbfdd9c2eb053d8ae94bfd8fcd7
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-03-30 04:51:00 +00:00
Colin Cross
441898c285 Switch to libunwind to remove dependency on libgcc for musl
The libgcc dependency is only used for _Unwind* symbols, remove
it now that libc_musl.so embeds libunwind.a.

Bug: 215802826
Test: m USE_HOST_MUSL=true host-native
Change-Id: I1ad4c1435fc0090c6df2d50d542d2203dfb94d7b
2022-03-29 13:35:17 -07:00
Colin Cross
ed12a04a3e Enable sanitizers for musl
Now that we provide runtimes built for musl, enable the sanitizers
when targeting musl.

Bug: 215802826
Test: m USE_HOST_MUSL=true host-native
Change-Id: Id17513ee305274874c31e9c99ce4faeff4a1c057
2022-03-29 13:35:17 -07:00
Elliott Hughes
ab5e4c63e8 Try to bump the C default to C11.
Even the Linux kernel's moved, so let's see if we can too...

Test: treehugger
Change-Id: Ic8ceb3b6e7a83acc5defee46618a9345a366d87d
2022-03-28 16:58:22 -07:00
Treehugger Robot
2f9953b7ee Merge "Dedupe libraries in both static and whole static" am: 6876d5aa5f am: 0c576c591f am: 509c730ec9
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/2032378

Change-Id: Iead517d8e7d92144ed625b2f0b2b04f7808acfac
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-03-26 01:06:56 +00:00
Treehugger Robot
6876d5aa5f Merge "Dedupe libraries in both static and whole static" 2022-03-26 00:32:01 +00:00
Mitch Phillips
b6194c08cd Merge "[HWASan] Enable zero-initialization." am: c6ea944e18 am: ab50a4f910 am: 2c491d8302
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/2037383

Change-Id: I25593c51078fcbdc5705aa0b588b8e0d29790183
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-03-25 21:46:28 +00:00
Mitch Phillips
c6ea944e18 Merge "[HWASan] Enable zero-initialization." 2022-03-25 20:53:02 +00:00
Yi Kong
6233591d63 Merge "Update to clang-r450784" am: 846a25912d am: 5c1c1cc020 am: 8b5f050b64
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/2027885

Change-Id: I9fc50c9978723c4198e94c647c1f3dea56a6d7a2
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-03-25 06:47:08 +00:00
Yi Kong
846a25912d Merge "Update to clang-r450784" 2022-03-25 05:49:48 +00:00
Yi Kong
75ce5d3320 Update to clang-r450784
Test: presubmit
Bug: 219872355
Change-Id: I3cd5f42d887b07929906e08d7d9f1a677b8a4403
2022-03-25 04:30:53 +00:00
Mitch Phillips
597605603a [HWASan] Enable zero-initialization.
Previously, we use to fill memory with 0xbe bytes. This caused a lot of
problems that necessitated disablement. For example, 0xbe-filled mutexes
are apparently locked, and there were a few instances of
uninitialized-mutex use.

Given that zero-fill is now the default behaviour, enable zero-init in
HWASan as well.

For now, only fill the first page. It would be preferable to fill the
whole allocation, but I don't want to spin for too many cycles filling
huge secondary pages. In future, we might change the behaviour to have
an explicit "zero initialize" option that completely fills the primarily
allocations, and knows it's unnecessary for the secondary.

Bug: 226078464
Test: Boot w/ HWASan (done by presubmit robot)

Change-Id: I7de3a7f9fa2fdeb5116e5bf6586babe4d06fcb91
2022-03-22 18:38:34 +00:00
Liz Kammer
cc2c1efc9a Dedupe libraries in both static and whole static
In Soong, libraries can appear in both static and whole static libs;
however, in Bazel, this results in errors due to duplicate libraries.

Test: bp2build.sh
Change-Id: I9dda4f7a7812340d28a6160d0e25f421c9db6612
2022-03-21 09:03:29 -04:00
Yu Liu
6b9500730d Merge "Support tailoring clang --target flag based on min sdk version." am: ba4638f529 am: 41b4e249ce am: 0db78356ba
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/2011702

Change-Id: I3567734c306f7f2659a879fc2b2d95e610bca1b9
2022-03-19 16:41:20 +00:00
Yu Liu
fc603167f4 Support tailoring clang --target flag based on min sdk version.
Bug: 215748260
Test: Tested using aquery to verify the --target flag; add added unit

Change-Id: Ifb13509db7d1e110316aa44d55ec9cccaa4b83d1
2022-03-18 01:16:52 +00:00
Elliott Hughes
7c30653fa2 Revert "Disable BTI for now."
This reverts commit c75994d623.

Reason for revert: BTI shipped in S, and we're going to work on app compat outreach rather than regress this security feature.

Bug: https://issuetracker.google.com/216395195
Change-Id: Ic7143d756907ceb574a686258751840ce62c920f
2022-03-10 18:09:51 +00:00
Colin Cross
325def643b Merge changes Iac0f4ca9,I4a56efb2 am: ce73506a85 am: 6d21a821d1 am: 4dcc4aece0
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/2017057

Change-Id: I814cd0807409721ce057c39cb6daf9b8a1c31d15
2022-03-09 17:04:11 +00:00
Treehugger Robot
f77f1df236 Merge changes from topic "vsdk_ramdisk" am: 86ac783d8e am: 849a844f04 am: ab80ba5b4c
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/2012416

Change-Id: Id7d484877e21f07ec3cfa9fd0e882c8414c9e816
2022-03-09 10:49:10 +00:00
Colin Cross
7e2092a274 Support BUILD_HOST_static=1 for musl and linux_bionic builds
BUILD_HOST_static=1 is useful for musl and linux_bionic builds to
produce standalone static binaries.

Bug: 179809553
Test: m USE_HOST_MUSL=true BUILD_HOST_static=1 apexer deapexer
Change-Id: Iac0f4ca92c3ffb27bccd4cac15a6ef9fa5924471
2022-03-08 15:15:56 -08:00
Treehugger Robot
86ac783d8e Merge changes from topic "vsdk_ramdisk"
* changes:
  Add InstallInRoot property to snapshot binary json file.
  Fix for duplicate modules across vendor and ramdisk snapshots.
2022-03-08 17:10:54 +00:00
Treehugger Robot
ce2d8950a0 Merge "Memory mapped coverage (take 2)" am: c8a6487153 am: 079c381504 am: 4a759d5b33
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/2009378

Change-Id: I29ebf63aad871a4c569d399ef54e69ebc459f117
2022-03-08 07:54:54 +00:00
Treehugger Robot
4a759d5b33 Merge "Memory mapped coverage (take 2)" am: c8a6487153 am: 079c381504
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/2009378

Change-Id: If280e01532aef4a703d0ffc3038ef4773526f8ef
2022-03-08 07:31:50 +00:00
Colin Cross
3c66771c62 Merge "Use single module for clang runtime libraries" 2022-03-08 06:51:43 +00:00
Colin Cross
4c4c1be915 Use single module for clang runtime libraries
The clang prebuilts now provide a single module with per-architecture
variants instead of a module per architecture.

Bug: 220019988
Test: m checkbuild
Change-Id: I39e2cf8ae14edf8510276dab38011afaef85822c
Merged-In: I39e2cf8ae14edf8510276dab38011afaef85822c
2022-03-07 14:56:32 -08:00
Jose Galmes
c1a56bcbe9 Add InstallInRoot property to snapshot binary json file.
Bug: 215295121
Test: Generated snapshot and verified InstallInRoot property is present.
Change-Id: I4f20a454477d1263e9c16e98468d659f89e1e4f1
2022-03-07 14:49:46 -08:00
Pirama Arumuga Nainar
b37ae58a3d Memory mapped coverage (take 2)
Add a build variable, CLANG_COVERAGE_CONTINUOUS_MODE, instead of
selecting based on paths.

Test: CLANG_COVERAGE_CONTINUOUS_MODE=true m and verify continuous mode works

Change-Id: I731172fc1f00e1cabff8efcf8b99f9a48210b446
2022-03-04 14:07:53 -08:00
Liz Kammer
bdd24b1ea3 Merge "Export variant/features via soong_injection" am: 6e4cd27bec am: a1b33112b1 am: 1bf0a42c98
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/2000396

Change-Id: I361123ce6d7c1dc4400fac67b13373c022a800b8
2022-03-03 19:22:59 +00:00
Liz Kammer
1bf0a42c98 Merge "Export variant/features via soong_injection" am: 6e4cd27bec am: a1b33112b1
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/2000396

Change-Id: I6b403e30a36113a4bda62eef6d94f58c5f79e9ed
2022-03-03 18:59:55 +00:00
Liz Kammer
6e4cd27bec Merge "Export variant/features via soong_injection" 2022-03-03 18:11:25 +00:00
Treehugger Robot
787bf8a5f4 Merge "Revert "[cc_fuzz] Revert 'disable LTO' patches."" am: 5c8693f5d7 am: 3807ca1cdf am: eafe37dfb7
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/2004383

Change-Id: I3d5f6c2a9e539d0a9942d5c50471987dc4e887d7
2022-03-02 06:29:00 +00:00
Treehugger Robot
eafe37dfb7 Merge "Revert "[cc_fuzz] Revert 'disable LTO' patches."" am: 5c8693f5d7 am: 3807ca1cdf
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/2004383

Change-Id: Ifa0e8a069b09edc4ba9a6988306291c1df5fd4de
2022-03-02 06:05:40 +00:00
Treehugger Robot
5c8693f5d7 Merge "Revert "[cc_fuzz] Revert 'disable LTO' patches."" 2022-03-02 05:08:27 +00:00