Commit graph

7152 commits

Author SHA1 Message Date
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
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
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
Mitch Phillips
5007c4a06d Revert "[cc_fuzz] Revert 'disable LTO' patches."
Revert submission 1976512-revert-nolto-fuzzing

Reason for revert: b/222160662
Reverted Changes:
Iacee4fa29:[cc_fuzz] Revert 'disable LTO' patches.
Ic509b00a1:[cc_fuzz] Revert 'disable LTO' patches.
If85931f09:[cc_fuzz] Revert 'disable LTO' patches.

Change-Id: I84e01a4f84145e3331c2955836c8cc9bfa05c36b
2022-03-02 01:25:22 +00:00
Treehugger Robot
0e97819e91 Merge "[cc_fuzz] Revert 'disable LTO' patches." am: 6c0de9938e am: 998e34c8fd am: 29ad0112d5
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1976512

Change-Id: I77603015a36ac8583d0ea602bd37b57f5ef575bb
2022-03-02 00:55:17 +00:00
Treehugger Robot
29ad0112d5 Merge "[cc_fuzz] Revert 'disable LTO' patches." am: 6c0de9938e am: 998e34c8fd
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1976512

Change-Id: Iec08cb88461a4502c94b7d58cd4749b4fc9d1ad1
2022-03-02 00:33:57 +00:00
Treehugger Robot
6c0de9938e Merge "[cc_fuzz] Revert 'disable LTO' patches." 2022-03-01 23:43:04 +00:00
Colin Cross
655be5dba9 Merge "Use single module for clang runtime libraries" into sc-v2-dev-plus-aosp am: 135513ae65
Original change: https://googleplex-android-review.googlesource.com/c/platform/build/soong/+/17036885

Change-Id: I72d5cdd315cad007f6f6a1a1a91f8ca272014f9c
2022-03-01 01:20:47 +00:00
Colin Cross
fc0df95df5 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
(cherry picked from commit 386ee59a23)
Merged-In:I39e2cf8ae14edf8510276dab38011afaef85822c
2022-02-28 21:01:05 +00:00
Liz Kammer
e8303bd0ae Export variant/features via soong_injection
Test: build/bazel/ci/bp2build.sh
Change-Id: If70043dc9d020d5f4a243ba4b192b99c9c7e8563
2022-02-28 14:17:15 -05:00
Treehugger Robot
0b182eddff Merge "Fix snapshot symlinks" am: 97491ead9e am: abdcb636cb am: 7783beb7e8
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1998310

Change-Id: If2fa266644667de4d44927f41867dbcc3217fe98
2022-02-25 01:48:59 +00:00
Treehugger Robot
97491ead9e Merge "Fix snapshot symlinks" 2022-02-25 00:41:35 +00:00
Inseob Kim
4d945ee719 Fix snapshot symlinks
LOCAL_MODULE_SYMLINKS was enough to install symlinks for snapshot
binaries. However, Soong now requires LOCAL_SOONG_INSTALLED_SYMLINKS,
which results in broken symlink support in snapshots.

This fixes symlink problems, and then amends the Soong snapshot test.

Bug: 220639435
Bug: 220907049
Test: manually add symlinks and try building
Test: Soong test
Change-Id: Ia75ddf3aa642558e396f1d80736310c3c8d02ad1
2022-02-24 10:29:18 +09:00
Treehugger Robot
415b0d442f Merge "Fix typos in arch_list and do variant validation" am: cda344f120 am: e8815d5ebb am: 94fff59456
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1982666

Change-Id: I9f6be5cd2673b4e5e5eef52ee8132b0c31d348ba
2022-02-23 18:43:29 +00:00
Sam Delmerico
b80790ec41 Merge "convert java proto libraries with bp2build" am: bc83b504ff am: 4dc3df7be7 am: 0d8dd4692b
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1975287

Change-Id: Ie93ce69b956aedbd4999283886ef9340d88fe530
2022-02-23 17:57:13 +00:00
Martin Stjernholm
24424b5678 Mark implementation variant of prebuilts with stubs as not installable am: 5bdf2d589c am: 60da7cf31e am: 8d9cd1becc
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1974259

Change-Id: I5c30bc8038dbb40827cb052e9e454510a7899632
2022-02-23 17:56:45 +00:00
Treehugger Robot
cda344f120 Merge "Fix typos in arch_list and do variant validation" 2022-02-23 17:34:51 +00:00
Sam Delmerico
bc83b504ff Merge "convert java proto libraries with bp2build" 2022-02-23 16:13:15 +00:00
Martin Stjernholm
5bdf2d589c Mark implementation variant of prebuilts with stubs as not installable
This is necessary to avoid installing them. Previously, when install
dependencies were resolved in make, they weren't installed because they
got a .bootstrap suffix in their mk modules. However when that logic
moved into Soong by resolving transitive dependencies in
computeInstallDeps, they started to get dependencies and hence their
stubs could get installed, e.g. system/lib{,64}/libdexfile.so from
prebuilt_libdexfile.

Test: m nothing
Test: env NINJA_ARGS="-t path droid out/target/product/vsoc_x86_64/system/lib64/libdexfile.so" \
        m SOONG_CONFIG_art_module_source_build=false nothing
  verify that ninja reports no dependency path
Bug: 211770050
Bug: 220898484
Change-Id: Ifbfe31a15428926ce57b9e91b535b7ae79038fbd
2022-02-23 09:19:18 +00:00
Yi Kong
91d66d3c04 Merge "Turn on Unique Internal Names for AFDO" am: e69b021758 am: 38d0106dad am: e50f27d358
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1977996

Change-Id: Ic0f538f15c1a23febcb6257a6f4d421028f69ee0
2022-02-22 13:17:07 +00:00
Yi Kong
e69b021758 Merge "Turn on Unique Internal Names for AFDO" 2022-02-22 12:07:55 +00:00
David Anderson
a480cc78ef Merge "Add an __ANDROID_RAMDISK__ preprocessor define." am: 7309742728 am: 6a3b60969e am: 13f34bef8d
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1989090

Change-Id: Ibbd1c1130c90f28aa5822fe73c907d55bfd14df1
2022-02-19 00:56:11 +00:00
David Anderson
7309742728 Merge "Add an __ANDROID_RAMDISK__ preprocessor define." 2022-02-18 23:29:27 +00:00
Treehugger Robot
a7a2b3046b Merge "Add tidy_timeout_srcs property" am: 72518f45e9 am: 01ec0a21d2 am: 730f0b61c9
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1991252

Change-Id: I37fb415d2fcea042c45ea1b722cf0b6c596a2409
2022-02-18 22:09:14 +00:00
Colin Cross
e46bd5363e Merge "Export sanitizer paths to Make" am: 2e91786932 am: 6ef7afc9fe am: 93d5b84636
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1990671

Change-Id: I139bb27c91f857fe6df4778cac08276f90a4ed3d
2022-02-18 22:08:52 +00:00
Treehugger Robot
1b8642069a Merge "Propagate data_bins from Soong to Make" am: 309ee8d398 am: ceb712dfe5 am: 534543e608
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1981828

Change-Id: I1da27920106c36208316d3bd4bcbb375b66b22b0
2022-02-18 22:08:36 +00:00
Yu Liu
d9202b0588 Merge "Enable cc_binary in mixed build." am: 9d7d9810e2 am: ea1aae2889 am: 4d7ec99d78
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1983488

Change-Id: Idfd7f6e90ef4dc78ef6b4ec777c81d0d40a71ecb
2022-02-18 10:39:42 +00:00
Florian Mayer
56ce8e4285 Merge "Reland^2 "Enable hwasan use after scope detection."" am: 939143a862 am: a8c5d3792d am: c516ab982e
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1988614

Change-Id: Ib57f45fbb43fdd1a39536dd9b9024d867abb941b
2022-02-18 10:39:36 +00:00
Chih-hung Hsieh
d3bb913740 Merge "Do not add non-existing -Bprebuilts/gcc/.../bin" am: 70387c5d03 am: 1918a6120a am: a59f62bfdf
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1987029

Change-Id: I6086e708fab979e2f864997e087f2e5dc2e18af6
2022-02-18 10:39:27 +00:00
Pirama Arumuga Nainar
d9f0822a4e Merge "Reland "Switch to clang-r445002"" am: 2b31fbb805 am: c31610cbce am: 640d3f8587
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1985009

Change-Id: I9b8dadac0a0a7da292f3fec72d9035925219abf3
2022-02-18 10:39:18 +00:00
Treehugger Robot
72518f45e9 Merge "Add tidy_timeout_srcs property" 2022-02-18 03:57:01 +00:00
Colin Cross
2e91786932 Merge "Export sanitizer paths to Make" 2022-02-18 03:39:26 +00:00
Treehugger Robot
309ee8d398 Merge "Propagate data_bins from Soong to Make" 2022-02-18 01:26:07 +00:00
Colin Cross
dd5655b3a4 Export sanitizer paths to Make
system/core/rootdir/Android.mk writes a list of sanitizer libraries
to sanitizer.libraries.txt, and assumes that they are installed with
the same name as the module.  The next patch renames the module to
be the same for all architectures while keeping the installed name
as is.  Collect the output file names of the libraries to export
to make.

Bug: 220019988
Test: m out/target/produuct/coral/system/etc/sanitizer.libraries.txt
Change-Id: Idc51c2ad6f914977a286fe4e2fcb457bc1229339
2022-02-17 15:52:07 -08:00
Chih-Hung Hsieh
9db8a0c5b2 Add tidy_timeout_srcs property
Similar to `tidy_disabled_srcs`, a `tidy_timeout_srcs` list
can be used to include all source files that took long to compile
with clang-tidy. Files listed in `tidy_timeout_srcs` will not
be compiled by clang-tidy when `TIDY_TIMEOUT` is defined.

Bug: 201099167
Test: TIDY_TIME=90 make droid tidy-soong_subset
Change-Id: Ie0bfda66caae4445d10117ceefa1b5b8c1ecf256
2022-02-17 14:48:40 -08:00
Yu Liu
9d7d9810e2 Merge "Enable cc_binary in mixed build." 2022-02-17 21:54:04 +00:00
Florian Mayer
939143a862 Merge "Reland^2 "Enable hwasan use after scope detection."" 2022-02-17 21:19:36 +00:00
Florian Mayer
0b981f54e6 Reland^2 "Enable hwasan use after scope detection."
This CL enables HWASan to detect a new class of bugs, specifically
use-after-scope. An example for a bug like this is

int* y;
{
   int x = 1;
   y = &x;
}
*y = 2;

IF YOU FOUND THIS CL AS A POSSIBLE CULPRIT OF A TEST FAILURE:

While it is possible that there is a bug in HWASan and this CL needs
to be rolled back, please also consider that this might surface
actual problems in either the test code or the code under test. See
https://r.android.com/1956922 for an example of fix for a bug
detected by a previous rollout of this flag.

This reverts commit fd337b3963.

Reason for revert: Once https://r.android.com/1985009 is submitted the bug that caused the revert will be fixed.

Change-Id: Id9e81e8b7c26e044af00bdaeae6bb35abbbd9710
2022-02-17 20:52:15 +00:00
Yu Liu
7f3605fee1 Enable cc_binary in mixed build.
Bug: 216114082
Test: Run mixed build on adbd apex and verify the pavkaged adbd binary;
add unit test.
Change-Id: Id11549a7952a7ce5ac02988b88b747bbfe8339ff

Change-Id: If01efe076c223886278f466b65628602bff3a964
2022-02-17 11:15:59 -08:00
Chih-hung Hsieh
70387c5d03 Merge "Do not add non-existing -Bprebuilts/gcc/.../bin" 2022-02-17 18:25:38 +00:00
Pirama Arumuga Nainar
2b31fbb805 Merge "Reland "Switch to clang-r445002"" 2022-02-17 18:07:38 +00:00
David Anderson
2c8075cd6f Add an __ANDROID_RAMDISK__ preprocessor define.
There is no easy way to inform C++ targets whether they're building "not
in normal Android". In the past we used __ANDROID_RECOVERY__, but this
isn't defined for ramdisk targets, or for vendor_boot. Furthermore
there's no "target.ramdisk.cflags" option to add it.

Add a new __ANDROID_RAMDISK__ define that will be set in any ramdisk or
recovery target (since recovery by definition is in a ramdisk).

Bug: 205987817
Test: mm bootimage, vendorbootimage, recovery
Change-Id: If3cd34b07fe0e20abc5108cb338a56698d33e42e
2022-02-16 21:59:05 -08:00
yangbill
22bafec042 Propagate data_bins from Soong to Make
Write the list of a test module's data_bins value to the
`LOCAL_TEST_DATA_BINS` Makefile variable defined for each module.
This enables downstream tools to correctly set up the runtime
environment for execution. And currently only sh_test, cc_tests, and
rust_tests has this attribute in Android.bp.

Bug: 215234071
Test: m out/soong/Android-aosp_cf_x86_64_phone.mk
Change-Id: I8d47f5f9b25afdc5975c6b414405badb38dbde4b
2022-02-17 04:06:34 +00:00
Colin Cross
d42fcae75f Merge "Add --sysroot /dev/null to musl compiles" am: e4c400bef5 am: 69324f735d am: b5e24d257f
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1983627

Change-Id: Id40f845a799bc1ed8fc565ed9c909946bacbf6d2
2022-02-17 00:40:40 +00:00
Colin Cross
8e16fe0ab1 Merge "Fix transitive whole_static_libs on prebuilt static libraries" am: 4dac32ad1a am: a0c26cc3cc am: 2a102c8147
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1983626

Change-Id: I28cc4d8d706f3a58b36ecf5ef93163b6d54b7858
2022-02-17 00:40:28 +00:00
Chih-Hung Hsieh
57da82697a Do not add non-existing -Bprebuilts/gcc/.../bin
* Only prebuilts/gcc/linux-x86/host/x86_64-w64-mingw32-4.8/x86_64-w64-mingw32/bin
  exists for x86_windows_host.
* Remove config.ToolPath;
  add required -B flags into ToolchainCflags and ToolchainLdflags.

Bug: 218883919
Test: make droid tidy-soong_subset
Change-Id: I9a18bf8cc0cf84e091c7463b3bda316eaab53aa3
2022-02-16 15:49:39 -08:00
Colin Cross
e4c400bef5 Merge "Add --sysroot /dev/null to musl compiles" 2022-02-16 23:32:51 +00:00
Colin Cross
4dac32ad1a Merge "Fix transitive whole_static_libs on prebuilt static libraries" 2022-02-16 23:32:45 +00:00
Colin Cross
675695eb62 Merge "Add builtins and minimal runtime as dependencies instead of flags" am: 251d6500db am: 64ef5e9968 am: 5cf058abab
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1980448

Change-Id: Ie4790bbc44955a4762316eb2bb9657dd63af0364
2022-02-16 20:45:22 +00:00
Colin Cross
251d6500db Merge "Add builtins and minimal runtime as dependencies instead of flags" 2022-02-16 18:59:55 +00:00
Treehugger Robot
1cc29d1787 Merge "Compare tidy_disabled_srcs list by string values" am: ec76c2f072 am: 9f60d66aa9 am: 835b8ef450
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1987286

Change-Id: I57c369f5c2f457bd386d2f513857691ecb6312d4
2022-02-16 05:24:51 +00:00
Treehugger Robot
ec76c2f072 Merge "Compare tidy_disabled_srcs list by string values" 2022-02-16 03:02:37 +00:00
Chih-Hung Hsieh
8439a141a7 Compare tidy_disabled_srcs list by string values
* Cannot use android.Path as key because some srcs and
  and tidy_disabled_srcs items could have the same path
  string but different android.Paths objects.

Bug: 219783146
Test: make tidy-soong_subset
Change-Id: I82e25ec9678ce998feccf361d69ae66dae0905de
2022-02-15 15:32:57 -08:00
Liz Kammer
2c2afe26ea Fix typos in arch_list and do variant validation
Test: m nothing
Change-Id: Icfbc9f886a1e16abe02bf6c61671b8187a699942
2022-02-15 17:26:35 -05:00
Sam Delmerico
c768102bce convert java proto libraries with bp2build
Allow java_libraries that depend on protobufs to be converted with
bp2build.

Bug: 215230097
Test: build/bazel/ci/bp2build.sh
Change-Id: I3ce52389e7e4e82755605ee277c1e527a6aebc6b
2022-02-15 21:04:59 +00:00
Pirama Arumuga Nainar
8a4804f53b Reland "Switch to clang-r445002"
Bug: http://b/214080353
Bug: http://b/218805949

Reland switch to clang-r445002.  The math test failures are fixed by
disabling FMA (-ffp-contract=off).

Test: - atest -a libcore.java.math.RunCSVTestsStrict
      - select bionic tests on go/abtd
      - atest -a \
gatm_algo_test:gatm_algo_test.TestAllGatmTestData/GatmAlgoTest#VerifyOutputValues/05temporaltracing_5frames_1lux_h_drc_free
      - presubmit

Change-Id: I8383edb116caa63884507932406a5f49a223d006
2022-02-15 17:27:30 +00:00
Yi Kong
2f9bef3426 Merge "Don't reduce inline limit for afdo enabled projects" am: 1ca54b2cfd am: 10b71eb414 am: 9e56a9cb3e
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1984569

Change-Id: I84c2225a8bd74f8c784db56f1df373c562f71e45
2022-02-14 21:18:57 +00:00
Yi Kong
1ca54b2cfd Merge "Don't reduce inline limit for afdo enabled projects" 2022-02-14 20:33:40 +00:00
Yi Kong
4ef5459f7d Don't reduce inline limit for afdo enabled projects
Test: presubmit
Change-Id: Id964165c7af50da9cd5e92c25ad2c4191eb2147a
2022-02-14 20:02:04 +08:00
Chih-hung Hsieh
061c3b5234 Merge "Split the clangTidyRE rule" am: 1ead213e6d am: 44ec636d91 am: 00c541a9dc
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1980668

Change-Id: Iaca7fffc976bd0c91e5d829ec183ed2a9b8a3863
2022-02-12 05:40:11 +00:00
Chih-hung Hsieh
1ead213e6d Merge "Split the clangTidyRE rule" 2022-02-12 04:45:06 +00:00
Chih-Hung Hsieh
c74f63eeff Split the clangTidyRE rule
* Add clangTidyDepRE, which is an order-only dependent of
  the new simplified clangTidyRE rule.
* Remove escapeSingleQuotes, used only by the old bash command.
* Remove extra space when TIDY_TIMEOUT is not defined.
* In clang-tidy calls,
  use moduleFlags to match the clang/clang++ commands.

Bug: 218937424
Test: make droid tidy-soong_subset
Change-Id: I162e2318410741ab61fb2bb338725b000a3f148d
2022-02-11 17:21:56 -08:00
Colin Cross
0728720d45 Merge changes Ibd19d9a5,Icfc42ad7,Ieafdcceb am: 7b2e5cd134 am: 4a9761befe am: 14eea8f7d5
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1980449

Change-Id: I605243788a153758a9ebdddd4250d65efdf1f5ab
2022-02-11 23:57:03 +00:00
Colin Cross
7b2e5cd134 Merge changes Ibd19d9a5,Icfc42ad7,Ieafdcceb
* changes:
  Fix musl clang triple
  Add musl_<arch> and glibc_<arch> properties
  Add libc_musl as a dependency of RuleBuilderCommand.BuiltTool
2022-02-11 23:09:27 +00:00
Colin Cross
6745a8ef1d Add --sysroot /dev/null to musl compiles
Prevent linking against host glibc libraries by passing
--sysroot /dev/null to compile and link rules targeting musl.

Bug: 190084016
Test: m USE_HOST_MUSL=true host-native
Change-Id: Ief2c9507af9ae7cf5376cb874fcef0f2cbaf9994
2022-02-11 13:51:41 -08:00
Colin Cross
a2bcf2c4b8 Fix transitive whole_static_libs on prebuilt static libraries
whole_static_libs on static library usually uses the .o files from
the dependency, but on a prebuilt static library has to use the .a file.
whole_static_libs on a static library that itself has whole_static_libs
on a prebuilt static library also needs to use the .a file transitively.

Test: TestWholeStaticLibPrebuilts
Change-Id: I9d4aabf72be0941b461a72e610f2b28287251cb2
2022-02-11 13:51:41 -08:00
Treehugger Robot
ee18fb6589 Merge "Add error message for unsupported x86 arch variant" am: 104ecf6708 am: baeeb601cc am: ca7d468a5d
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1980008

Change-Id: I02dff31376d00f8912036cb89956139fee9b60d6
2022-02-11 14:38:37 +00:00
Treehugger Robot
104ecf6708 Merge "Add error message for unsupported x86 arch variant" 2022-02-11 13:55:43 +00:00
Treehugger Robot
82f65281f6 Merge "Propagate runtime_libs from Soong to Make" am: b451101f6e am: 7966092c95 am: 3489f67ca8 am: 8a5ab8baf9
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1976466

Change-Id: I2247f4ba15ced638933acc06735cbefd9a7b543f
2022-02-11 02:07:40 +00:00
Treehugger Robot
b451101f6e Merge "Propagate runtime_libs from Soong to Make" 2022-02-11 00:56:26 +00:00
Liz Kammer
f610a74f4c Add error message for unsupported x86 arch variant
Previously this would result in a Ninja variable lookup, instead, let's
error sooner in Soong.

Test: CI
Change-Id: Ib3e15dce84364e6f7a83b82cb5f0e8694ffc9d2a
2022-02-10 16:58:08 -05:00