Commit graph

49948 commits

Author SHA1 Message Date
Martin Stjernholm
60da7cf31e Mark implementation variant of prebuilts with stubs as not installable am: 5bdf2d589c
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1974259

Change-Id: I51f0c05a736a78051ba3453bad554f25cd4b3571
2022-02-23 16:56:19 +00:00
Jooyung Han
73b6303f05 Merge "sh_test: Support per-testcase directories" am: 62192b883b
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1994090

Change-Id: I5cbaa43f0945c4539794323f0f7d749801c34fe8
2022-02-23 16:56:03 +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
Jooyung Han
62192b883b Merge "sh_test: Support per-testcase directories" 2022-02-23 01:56:13 +00:00
Treehugger Robot
119decff9b Merge "Move functionality to test install rules into testing.go." am: 489be090e7
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1980966

Change-Id: I0911fa11b0ddac5235deb2effdf69650fb82a4ae
2022-02-22 21:14:18 +00:00
Treehugger Robot
489be090e7 Merge "Move functionality to test install rules into testing.go." 2022-02-22 20:41:23 +00:00
Treehugger Robot
16e222bc2a Merge "typos fixed" am: 92a21ddb41
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1991433

Change-Id: Iddd5f8ee11f39262dfca8bf7ae6dceb083808170
2022-02-22 14:42:14 +00:00
Treehugger Robot
92a21ddb41 Merge "typos fixed" 2022-02-22 14:17:13 +00:00
Anton Hansson
df4ea086a4 Merge changes from topics "extdir", "threadvars" am: d2149e6a81
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1988355

Change-Id: I8b8360f24b65a8dbc6d8ad144271508772b46403
2022-02-22 14:10:16 +00:00
Anton Hansson
d2149e6a81 Merge changes from topics "extdir", "threadvars"
* changes:
  Add support for sdk extensions in prebuilt_apis
  Refactor prebuilt_apis.go
  Add base sdk extension version to the config
2022-02-22 13:46:47 +00:00
Yi Kong
38d0106dad Merge "Turn on Unique Internal Names for AFDO" am: e69b021758
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1977996

Change-Id: I0e2499621c2edf71110477a154d5f170fdfd4eec
2022-02-22 12:34:00 +00:00
Yi Kong
e69b021758 Merge "Turn on Unique Internal Names for AFDO" 2022-02-22 12:07:55 +00:00
Jooyung Han
3ae4cca6e1 sh_test: Support per-testcase directories
Similar to cfb0f5e102

Bug: n/a
Test: add a new CTS sh_test_host module with duplicate 'data';
Change-Id: Ie7d183bb5703d616d61d7dcb7c8b44502de429bb
2022-02-22 16:33:24 +09:00
Anton Hansson
3a3f169b56 Add support for sdk extensions in prebuilt_apis
This makes it possible to pass an extensions_dir containing finalized
module APIs to prebuilt_apis. The extension versions are compared to the
api level versions to figure out what the "latest" finalized API is for
each module. This is done using the base_sdk_extension_version, such
that any extension higher than than base_sdk_extension_version is
assumed to be finalized after any of the existing api level versions.

Bug: 220086085
Test: prebuilt_apis_test.go
Test: existing module in prebuilts/sdk
Change-Id: Ib792f84202d436f594ba5e8716c6a187f9cd60dc
2022-02-21 16:43:43 +00:00
Anton Hansson
0c5f8233e5 Merge "Sort the list of hidden warnings" am: ca0ca60502
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1990717

Change-Id: I0d3f2fee19c546b699eced5a629634e49057129d
2022-02-21 14:45:00 +00:00
Anton Hansson
ca0ca60502 Merge "Sort the list of hidden warnings" 2022-02-21 14:19:31 +00:00
Usta Shrestha
0b52d83b60 typos fixed
Bug: N/A
Test: m nothing
Change-Id: Ia3abc4b9db2b811bf589447e32a7f29f341f2307
2022-02-18 22:19:12 -05:00
David Anderson
6a3b60969e Merge "Add an __ANDROID_RAMDISK__ preprocessor define." am: 7309742728
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1989090

Change-Id: Ie5bde3262b38612c1a3c9bfac8a8e366a416de38
2022-02-18 23:59:11 +00:00
David Anderson
7309742728 Merge "Add an __ANDROID_RAMDISK__ preprocessor define." 2022-02-18 23:29:27 +00:00
Anton Hansson
8d0b528a3c Merge "Improve error message for dupe srcs in genrule" am: a5969bec06
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1850000

Change-Id: I9a71dc9959dac54bb2792280be01944fde604a9a
2022-02-18 21:16:12 +00:00
Treehugger Robot
01ec0a21d2 Merge "Add tidy_timeout_srcs property" am: 72518f45e9
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1991252

Change-Id: Ibf98bbaa3c088ff0fc13ceb7878ebdbc6a49e0bc
2022-02-18 21:16:02 +00:00
Colin Cross
6ef7afc9fe Merge "Export sanitizer paths to Make" am: 2e91786932
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1990671

Change-Id: I8b27dbcaedded11cc053aa13653241c14c3519ab
2022-02-18 21:15:22 +00:00
Colin Cross
6be81464b8 Merge "Add SortedStringValues and SortedUniqueStringValues" am: a00cb70910
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1990670

Change-Id: I68c03e568b8f821e4d2e8d0a851c4f064edb7634
2022-02-18 21:15:05 +00:00
Treehugger Robot
ceb712dfe5 Merge "Propagate data_bins from Soong to Make" am: 309ee8d398
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1981828

Change-Id: I90a034143281e439737b21d8d6dfa38d0a690f43
2022-02-18 21:14:53 +00:00
Anton Hansson
3c0779a6b1 Sort the list of hidden warnings
The list was difficult to read.

Test: m nothing
Change-Id: I55c55033e411f891083264942c543dcd45540c75
2022-02-18 19:24:30 +00:00
Anton Hansson
a5969bec06 Merge "Improve error message for dupe srcs in genrule" 2022-02-18 15:40:19 +00:00
Anton Hansson
377318b33f Refactor prebuilt_apis.go
Improve code re-use and improve the names and data types of various vars
and functions. This makes it easier to extend it for the new use-case of
also supporting sdk extension versions on top of the current api level
versions.

This change is intended to be a noop.

Bug: 220086085
Test: m nothing (existing soong tests)
Change-Id: Icf4b320285f791e3b335f71f3c8b1ac52129dbc9
2022-02-18 15:34:37 +00:00
Yu Liu
ea1aae2889 Merge "Enable cc_binary in mixed build." am: 9d7d9810e2
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1983488

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

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

Change-Id: I506471529facfb3772bb7d68a7c55a73d86d2ddb
2022-02-18 09:44:18 +00:00
Pirama Arumuga Nainar
c31610cbce Merge "Reland "Switch to clang-r445002"" am: 2b31fbb805
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1985009

Change-Id: I36bd855b7257ac52ba3834a097f49c1b38fee34c
2022-02-18 09:42:03 +00:00
Treehugger Robot
178dc9a276 Merge "Revert^2 "Remove the primary boot image from the ART APEX."" am: 59060e093d
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1988866

Change-Id: Ib8c528c4d73d071fdedc7c8fe66a2f73e35408e1
2022-02-18 09:35:47 +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
Colin Cross
a00cb70910 Merge "Add SortedStringValues and SortedUniqueStringValues" 2022-02-18 03:39:10 +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
Colin Cross
9eb853bcf2 Add SortedStringValues and SortedUniqueStringValues
Add SortedStringValues and SortedUniqueStringValues that return the
values of a string-valued map.  Also make the SortedStringKeys
function use a similar implementation with MapRange, which avoids
iterating over the keys twice, once in MapKeys to build the list
of key reflect.Values and once over the reflect.Values to convert
them to strings.

Test: util_test.go
Change-Id: I4fc990a5036421e8926094ee158fafe606d0f10b
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
Treehugger Robot
e6c30dbc01 Merge "Discard PT_INTERP in embedded linker linker script" am: e1b9e95ddd
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1989248

Change-Id: Ie97fa781768cd25654b28c5af29a41dca3c8c7b1
2022-02-17 21:44:00 +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
Anton Hansson
97d0bae750 Add base sdk extension version to the config
So that it can be used by prebuilt_apis in follow-up CLs.

Bug: 220086085
Test: m nothing && inspect soong.variables
Change-Id: If987b8aef9802c52a751ea5351cab2a3df6f2e00
2022-02-17 11:17:21 +00:00
Treehugger Robot
59060e093d Merge "Revert^2 "Remove the primary boot image from the ART APEX."" 2022-02-17 10:31:42 +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
Treehugger Robot
e1b9e95ddd Merge "Discard PT_INTERP in embedded linker linker script" 2022-02-17 04:08:58 +00:00