Commit graph

4718 commits

Author SHA1 Message Date
Chris Parsons
216e10a0f6 Install data_libs using relative_install_path property
Test: Added to data_libs tests
Test: Manually verified with bionic-unit-tests
Test: Treehugger
Change-Id: I28a8e08e3409f1e7c7bb72f4351310b57f35f513
2020-07-20 13:59:24 -04:00
Treehugger Robot
5df3439377 Merge "Add compile_multilib properties to all native prebuilts (reland)." 2020-07-20 15:19:33 +00:00
Kiyoung Kim
b0aa8515b9 Deprecate VNDK-Lite
Android S would not support upgrade from O-MR1 devices, so VNDK Lite
configuration is no more valid. This change removes all VNDK-lite
variables from soong.

Bug: 158719241
Test: m -j passed
Change-Id: I54093fd4ee37ceddfc33a0b216b7069372040a0c
Merged-In: I54093fd4ee37ceddfc33a0b216b7069372040a0c
2020-07-20 05:46:11 +00:00
Dan Willemsen
2019658b86 Support per-module MakeVars
This allows setting per-module make variables earlier in the build,
particularly for prebuilt_build_tool users like LEX/M4/BISON. I moved
filegroup over because it's a simpler common interface, but it doesn't
strictly need it.

With this, the last user of the hardcoded cc.m4Cmd variable is gone.

Test: Inspect out/soong/make_vars-*.mk, out/soong/late-*.mk
Test: treehugger
Change-Id: I195b688131feac0c100c338a0749368aa5d50f4f
2020-07-17 20:07:33 -07:00
Dan Willemsen
d2e291ae5c Switch cc's use of bison and flex to prebuilt_build_tool
Test: treehugger
Change-Id: I6150f0f39151e8073d5d59fe189f614140fed57b
2020-07-17 20:07:16 -07:00
Dan Willemsen
453b4e1235 Merge "Add support for macOS 11 SDK" am: 59415ca60d am: 92601afd91
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1360927

Change-Id: I0eb2c3eb8638f02e14757e0f3079043400cf4664
2020-07-17 22:12:35 +00:00
Dan Willemsen
59415ca60d Merge "Add support for macOS 11 SDK" 2020-07-17 21:33:26 +00:00
Martin Stjernholm
89238f4703 Add compile_multilib properties to all native prebuilts (reland).
There was a special case in cc_prebuilt_binary only, which resulted in
prebuilt libraries getting both 32 and 64 bit variants even when their
sources only had one of them, and the other variant would be defunct
since it wouldn't get any prebuilt artefact.

This moves the handling of compile_multilib completely to the common
update code, so that SDK members don't need to deal with it. It doesn't
take SDK member defaults into account, which means a bit more
boilerplate in the snapshots, but it's simpler and less error prone
(different SDK member types have different defaults).

This relands https://r.android.com/1359962 after disabling the SDK
tests on mac once and for all.

Bug: 151303681
Test: `go test -v ./sdk` in build/soong on mac and linux
Change-Id: I05f6603b2ac9b8676b25c3e297165ca23284e9cc
2020-07-17 14:32:15 +01:00
Martin Stjernholm
c280e57374 Merge "Add support for SDK tests with LinuxBionic OS type." am: 3044394329 am: 586854a699
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1360539

Change-Id: Ic1d9d7a8e6d06ba77bab6738f714ad0adae27178
2020-07-17 12:13:39 +00:00
Martin Stjernholm
3044394329 Merge "Add support for SDK tests with LinuxBionic OS type." 2020-07-17 11:46:12 +00:00
Treehugger Robot
12822092eb Merge "Fix non-determinism in tests." am: e34e5b5442 am: 087e9ef59b
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1347982

Change-Id: I28d775699333c041c04dffd08983a5e1e36aa54b
2020-07-16 23:19:53 +00:00
Dan Albert
d7bee6347a Merge changes I2ac22f7c,I7fc9d55a am: 4fea65086f am: 88f85ae3af
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1347763

Change-Id: Ic25e2e89be3f598b167c5c738fc7a4516298850d
2020-07-16 23:19:33 +00:00
Treehugger Robot
e34e5b5442 Merge "Fix non-determinism in tests." 2020-07-16 23:17:14 +00:00
Dan Albert
4fea65086f Merge changes I2ac22f7c,I7fc9d55a
* changes:
  Get NDK python script tests running.
  Fix pylint issues in gen_stub_libs.
2020-07-16 23:06:12 +00:00
Martin Stjernholm
7feceb2354 Add support for SDK tests with LinuxBionic OS type.
Break apart test helpers a bit to make it possible to enable
LinuxBionic in a single test, and add LinuxBionic support to
cc.GatherRequiredDepsForTest.

Test: m nothing
Bug: 160349757
Change-Id: Iace1024c964cee2308c130c945daef9e46c18c66
2020-07-16 21:55:15 +01:00
Dan Albert
38a224dc7e Fix non-determinism in tests.
The stdlib's xml apparently cares about ordering but also doesn't
preserve it. There are a number of different recommendations of other
ways to do this, but they all depend on packages we don't have
available (lxml or xml.dom.ext, in particular).

Test: pytest
Bug: None
Change-Id: I07108d8977c302404e7c90ca75a4bf7a1144750f
2020-07-16 13:23:33 -07:00
Dan Albert
06f58afd81 Get NDK python script tests running.
Imports weren't working in tests because the package had been created.
The Python "binaries" built by Soong don't seem to take their own
pkg_path into account, so I split the separate pieces of code here out
into their own packages.

Note that the ndk_api_coverage_parser tests do not actually pass
before or after this change (seems like it might be a
non-deterministic ordering issue in the attributes of the generated
output?), but they can at least be run now.

Test: pytest ndkstubgen
Test: pytest symbolfile
Test: pytest ndk_api_coverage_parser
Test: out/host/linux-x86/nativetest64/test_ndkstubgen/test_ndkstubgen
Test: out/host/linux-x86/nativetest64/test_symbolfile/test_symbolfile
Test: out/host/linux-x86/nativetest64/test_ndk_api_coverage_parser/test_ndk_api_coverage_parser
Bug: None
Change-Id: I2ac22f7ced7566e4808070f2f72fd04355846e0b
2020-07-16 13:23:29 -07:00
Dan Albert
802cc82af6 Fix pylint issues in gen_stub_libs.
Test: pylint scriptlib
Bug: None
Change-Id: I7fc9d55a033bab98c318cfb4db1af4eda7187af3
2020-07-16 13:21:43 -07:00
Jakub Pawlowski
d1a49ebe46 Merge "Revert "Add compile_multilib properties to all native prebuilts."" am: ca7b2c3eb7 am: eaa37aec1e
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1362483

Change-Id: I32774a84f4891c4c950e00931076f3fc71d9fd7b
2020-07-15 10:54:48 +00:00
Jakub Pawlowski
ca7b2c3eb7 Merge "Revert "Add compile_multilib properties to all native prebuilts."" 2020-07-15 10:33:41 +00:00
Charles Chen
29936ae5a7 Revert "Add compile_multilib properties to all native prebuilts."
This reverts commit 1e9c2677fd.

Reason for revert: Break build

Bug: 161315642
Change-Id: Ibf3d5e88412327e8f08d08272b75cd3df34a71e5
2020-07-15 04:01:45 +00:00
Treehugger Robot
ba64405d5e Merge "Add compile_multilib properties to all native prebuilts." am: 6da69732e4 am: f0d3591c9d
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1359962

Change-Id: Ifd2e68477e4be452ea7362952ea2bd7f001f623d
2020-07-15 03:19:19 +00:00
Treehugger Robot
6da69732e4 Merge "Add compile_multilib properties to all native prebuilts." 2020-07-15 02:51:21 +00:00
Dan Willemsen
695dc69ac4 Add support for macOS 11 SDK
Test: try building on the xcode 12 beta 2 macOS 11 SDK
Change-Id: Ic7e245ca418914798ba737106c6a345844e7a6ac
2020-07-14 16:53:43 -07:00
Inseob Kim
3781d50747 Merge "Nullify stl and sanitize of llndk_headers" am: 41405cc275 am: c188fb0dfc
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1356667

Change-Id: I0a69d3f56e49a3e1da787d290a9f6291529ecdf8
2020-07-11 05:40:47 +00:00
Inseob Kim
41405cc275 Merge "Nullify stl and sanitize of llndk_headers" 2020-07-11 05:19:17 +00:00
Martin Stjernholm
1e9c2677fd Add compile_multilib properties to all native prebuilts.
There was a special case in cc_prebuilt_binary only, which resulted in
prebuilt libraries getting both 32 and 64 bit variants even when their
sources only had one of them, and the other variant would be defunct
since it wouldn't get any prebuilt artefact.

This moves the handling of compile_multilib completely to the common
update code, so that SDK members don't need to deal with it. It doesn't
take SDK member defaults into account, which means a bit more
boilerplate in the snapshots, but it's simpler and less error prone
(different SDK member types have different defaults).

Bug: 151303681
Test: m nothing
Test: build/soong/scripts/build-aml-prebuilts.sh art-module-host-exports
  Check that the generated Android.bp passes Soong.
Change-Id: Ib73444c6788ee1c78480bdb103aa2b8ae8f2c63c
2020-07-11 00:38:24 +01:00
Paul Duffin
fd1e267e40 Differentiate sdk snapshot include dir by os type am: ed62b9cc2a am: a7d4a055b4
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1360457

Change-Id: I12ba49c8be85532d16feba3650fc1fc5e32be140
2020-07-10 14:31:32 +00:00
Paul Duffin
ed62b9cc2a Differentiate sdk snapshot include dir by os type
Test: m nothing
Change-Id: Ide032aa64bb1fee69969c5e007bee6643d475309
2020-07-10 12:18:03 +01:00
Inseob Kim
c7c6910f68 Nullify stl and sanitize of llndk_headers
llndk_headers can't depend on other non-llndk cc modules such as libc++,
just like llndk_library. This nullifies stl and sanitize to prevent such
dependencies.

Bug: 160639583
Test: m nothing, see dependencies of llndk_headers
Change-Id: I3c6830d6b46754981c4ae10a7e7e013ec849efaf
2020-07-08 07:56:02 +09:00
Christopher Parsons
8bb12e9548 Merge "Add data_libs property to cc_test rules" am: c87fbdd0bd am: 2066b2d5dd
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1324844

Change-Id: Ie4b139b490ec58a6a7a55515035e8dccd6c81f1a
2020-07-07 22:02:22 +00:00
Christopher Parsons
c87fbdd0bd Merge "Add data_libs property to cc_test rules" 2020-07-07 21:26:56 +00:00
George Burgess IV
feb6b1e26a Merge "soong: globally enable -Wunreachable-code-loop-increment" am: c5f2aa4e73 am: 06285bd9a3
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1242459

Change-Id: I90b6c54b13730b27aa0391c823888ebea5cfb9a8
2020-07-07 20:31:44 +00:00
George Burgess IV
c5f2aa4e73 Merge "soong: globally enable -Wunreachable-code-loop-increment" 2020-07-07 19:49:53 +00:00
Chris Parsons
79d66a5db7 Add data_libs property to cc_test rules
This allows dependencies on link:shared variant of library modules, and
adds the shared libraries adjacent to the test binary

Test: Manually verified on bionic-unit-tests target
Change-Id: I5d406bf9428664c5ac3d3c5915507b750375debb
2020-07-07 15:13:36 -04:00
Liz Kammer
66aab00478 Merge "Add soong cc and java deps to general-tests dist" am: 203a3f2f39 am: 49ab00709d
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1353585

Change-Id: I4aa866011c467979fdefa6a30fa660f125a4d414
2020-07-07 15:30:48 +00:00
Liz Kammer
5e07d0ccbb Add soong cc and java deps to general-tests dist
Test: m SOONG_COLLECT_CC_DEPS=true SOONG_COLLECT_JAVA_DEPS=true dist
  general-tests and verify module_bp_java_deps.json and
  module_bp_cc_deps.json is in out/dist
Test: m SOONG_COLLECT_CC_DEPS=true SOONG_COLLECT_JAVA_DEPS=true
  checkbuild dist general-tests
Bug: 154845369

Change-Id: I683fe1d7e17f7abaab40206770d09db705493ffb
2020-07-06 16:19:56 -07:00
Jooyung Han
efa4ecd851 Merge "cc: add exclude_generated_sources property" am: 5aa31347bc am: d7f8cd0baf
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1354450

Change-Id: I5213f0c050fb6daf552d6adb376d3fa3a6bc59b3
2020-07-06 21:59:05 +00:00
Jooyung Han
5aa31347bc Merge "cc: add exclude_generated_sources property" 2020-07-06 21:32:25 +00:00
Jooyung Han
6114532193 remove unused GeneratedHeaders variable am: 8f9782f513 am: 3e3626bbc1
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1354449

Change-Id: Iaf9f33430fa67d676a19555d37d00124459dc247
2020-07-05 00:33:11 +00:00
Jooyung Han
ac07f880d8 cc: add exclude_generated_sources property
generated_sources needs exclude_* just like that srcs needs exclude_srcs
to support variant-specific exclusion of source files.

Bug: 159585065
Test: m
Change-Id: I49e49b0b3a0115a01fc9cf6f9fe74b23e723a785
2020-07-05 04:04:09 +09:00
Jooyung Han
8f9782f513 remove unused GeneratedHeaders variable
Even though modules listed in generated_headers may produce .h files and
return the list of them as GeneratedSourceFiles(), cc modules do not
need them. GeneratedDeps() and GeneratedHeaderDirs() are what we need.

Bug: n/a
Test: m
Change-Id: I655f88e8c1a387e256c58913931721aaeab90b62
2020-07-05 01:33:24 +09:00
Inseob Kim
a04db44964 Merge "Include shared lib in vendor snapshot if isVndkExt" 2020-07-02 07:42:16 +00:00
Bill Peckham
7d3f096cf4 Include shared lib in vendor snapshot if isVndkExt
A VDNK extension is an image:vendor module provided by a
vendor-modified framework project. So it should be
provided to the vendor build as a prebuilt (for the
purposes of building against a vendor snapshot).

Exempt-From-Owner-Approval: cherry pick from internal branch

Bug: 160189878
Test: manual
Change-Id: I3eb4794c1be2949b9c85fd52f823e5e14df4ad7d
Merged-In: I3eb4794c1be2949b9c85fd52f823e5e14df4ad7d
2020-07-02 07:42:05 +00:00
Treehugger Robot
2c3d9e54ea Merge "Dedup NDK library lists in make." am: 8cf2fda4c4 am: f9d5977467
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1353449

Change-Id: I778fb22183dd0d6e47a2acd270d4c6f0f8015774
2020-07-02 02:39:05 +00:00
Treehugger Robot
8cf2fda4c4 Merge "Dedup NDK library lists in make." 2020-07-02 02:12:26 +00:00
Treehugger Robot
30d7b755c8 Merge "Generate the known NDK libraries list." am: 2e1b8baeda am: 5f33df625a
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1353447

Change-Id: I3d5cdd456246b7b867d4f82a049c9016730d67dc
2020-07-01 22:21:16 +00:00
Treehugger Robot
2e1b8baeda Merge "Generate the known NDK libraries list." 2020-07-01 21:43:09 +00:00
Treehugger Robot
d756fc76d1 Merge "Add BenchmarkProperties to cc_defaults" am: e6b5e9aa82 am: d922debd99
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1353047

Change-Id: Ib727d19617af5e15289edcba4a3f54cc31eb19fd
2020-07-01 17:09:28 +00:00
Inseob Kim
9338e93cf7 Merge "Include shared lib in vendor snapshot if isVndkExt" into rvc-dev am: 4c845264a2
Original change: https://googleplex-android-review.googlesource.com/c/platform/build/soong/+/12039614

Change-Id: I66fce942d2aef4bd5d65d723c8c02f867b3e80bb
2020-07-01 07:58:48 +00:00
Inseob Kim
4c845264a2 Merge "Include shared lib in vendor snapshot if isVndkExt" into rvc-dev 2020-07-01 07:48:51 +00:00
Dan Albert
f164a94642 Dedup NDK library lists in make.
Test: treehugger
Bug: None
Change-Id: I532e2f5828727440d71dacd65e5c993382530ab9
2020-06-30 12:46:21 -07:00
Dan Albert
de5aade0e8 Generate the known NDK libraries list.
This doesn't need to be manually maintained. It briefly did need to be
during the transition from the old prebuilts, but that's long gone.

Test: treehugger
Bug: http://b/113547923
Change-Id: If05633f3cf622ab39e560a3dfcc88f3eb50406bf
2020-06-30 12:32:51 -07:00
Mitch Phillips
7df01cc05a Merge "[HWASan] Disable GlobalISel/FastISel w/ HWASan." into rvc-dev am: 13b85a4792
Original change: https://googleplex-android-review.googlesource.com/c/platform/build/soong/+/11959173

Change-Id: I986f605a95a5627c42ff6195138c65843f6938f5
2020-06-30 18:38:19 +00:00
Mitch Phillips
13b85a4792 Merge "[HWASan] Disable GlobalISel/FastISel w/ HWASan." into rvc-dev 2020-06-30 18:23:02 +00:00
Mitch Phillips
b1c574fd13 [HWASan] Disable GlobalISel/FastISel w/ HWASan.
Bug: 159343917
Test: See upstream testing at https://reviews.llvm.org/D82249
Change-Id: Ib644a857caa048d7fc3dd5e5f20553e0b4a47d43
2020-06-30 17:35:56 +00:00
Colin Cross
4328765772 Add BenchmarkProperties to cc_defaults
Fixes: 135767253
Fixes: 142024316
Test: m checkbuild
Change-Id: Ifb0eb0a31fab105405a2d6dcfecb4c68b4602427
2020-06-30 17:19:17 +00:00
Bill Peckham
f99b355c0a Include shared lib in vendor snapshot if isVndkExt
A VDNK extension is an image:vendor module provided by a
vendor-modified framework project. So it should be
provided to the vendor build as a prebuilt (for the
purposes of building against a vendor snapshot).

Bug: 160189878
Test: manual
Change-Id: I3eb4794c1be2949b9c85fd52f823e5e14df4ad7d
2020-06-30 19:21:53 +09:00
Treehugger Robot
102ff1f679 Merge "[cc/pgo] Fix incorrect project name" am: 1aaad5193f am: 8fe7ac3087
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1352702

Change-Id: I96d079be72b959a61216033e040546c642dd290b
2020-06-29 21:35:28 +00:00
Pirama Arumuga Nainar
9d544a83bf [cc/pgo] Fix incorrect project name
Bug: http://b/159920645

Look for internal profiles at the correct project.

Test: N/A
Change-Id: I6a64adbb043da7e419f99c3182d2ec29240ad8f3
2020-06-29 09:25:51 -07:00
George Burgess IV
fb81db2f4d soong: globally enable -Wunreachable-code-loop-increment
This warning only flags code that's otherwise pretty trivial to refactor
into something more readable. It also catches nasty bugs, so turning it
on seems like a good idea.

Bug: 150166387
Test: TreeHugger
Change-Id: I0e095d83ba4a2dcd81f680efd8ea3d2a6fe1a970
2020-06-27 01:44:36 +00:00
Jingwen Chen
ce00ee318f Merge "Support multiple dists per Android.bp module, and dist output selection." am: d06f11ee71 am: 3779799731
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1335521

Change-Id: I2ca43562972b4d50f1e9fd4a801026aa9abb6816
2020-06-26 08:25:04 +00:00
Victor Khimenko
82f62fdac4 Merge "Add exclude_shared_libs, expand exclude_static_libs to cover static_libs" into rvc-dev 2020-06-25 14:02:04 +00:00
Jingwen Chen
40fd90ae52 Support multiple dists per Android.bp module, and dist output selection.
This CL adds "dists" to the base property struct to support multiple
dist file configurations, and generic tag support to dist tagged outputs
of modules.

Fixes: b/152834186
Test: soong tests and `m sdk dist`

Change-Id: I80c86bc9b7b09e671f640a4480c45d438bdd9a2a
Signed-off-by: Jingwen Chen <jingwen@google.com>
2020-06-25 12:42:07 +00:00
Treehugger Robot
73672049ff Merge "Avoid race condition over ExportedSystemIncludeDirs" am: 670ed3d97d am: a3cba8ecd9
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1348762

Change-Id: I04f45a0afb4c3b58504da3964b8df96addc0be8c
2020-06-25 08:14:00 +00:00
Treehugger Robot
670ed3d97d Merge "Avoid race condition over ExportedSystemIncludeDirs" 2020-06-25 07:35:54 +00:00
Jooyung Han
14135e4c26 Merge "apex/apk: enforce min_sdk_version of all deps" am: 14a08f5b28 am: afdc5239b8
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1287253

Change-Id: I63074e39f5f319789920e55802d4f7934b556e0a
2020-06-25 01:47:24 +00:00
Jooyung Han
14a08f5b28 Merge "apex/apk: enforce min_sdk_version of all deps" 2020-06-25 01:18:52 +00:00
Colin Cross
1429cdcf87 Add exclude_shared_libs, expand exclude_static_libs to cover static_libs
Allow variants to exclude shared or static libs.

Bug: 153609531
Test: manual
Change-Id: I6ac9c445ed233c774a051743ed6760058c9918e9
2020-06-24 21:57:46 +02:00
Paul Duffin
ab5467dbd0 Avoid race condition over ExportedSystemIncludeDirs
It is not clear whether this is causing the bug but it is a potential
source of problems and if it does not fix the bug then at least it will
have eliminated this as the culprit.

Bug: 157656545
Test: m nothing
Change-Id: I3abcb9ae501977924d0d514f4d9007ead24fe0a5
2020-06-24 14:05:09 +01:00
Christopher Ferris
45ba96ad76 Merge "Remove libc_scudo references." am: a5d1fab176 am: f25abb1d01
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1326235

Change-Id: Ic6392dfe26e181d1cb12d2ceaee388ef268eeee3
2020-06-24 03:44:12 +00:00
Christopher Ferris
a5d1fab176 Merge "Remove libc_scudo references." 2020-06-24 03:16:48 +00:00
Jooyung Han
749dc69af1 apex/apk: enforce min_sdk_version of all deps
Enforce min_sdk_version for every payload dependency of updatable
APEX/APKs.

android.CheckMinSdkVersion() calls ApexModule.ShouldSupportSdkVersion
for every transitive dependency from APEX/APK modules to see if it
meets the min_sdk_version requirements.

The common implementation for apex/android_app is provided in
android/apex.go.

Bug: 145796956
Bug: 152655956
Bug: 153333044
Test: m nothing
Change-Id: I4a947dc94026df7cebd552b6e8ccdb4cc1f67170
2020-06-24 02:00:33 +09:00
Colin Cross
92285368e2 Merge "Make native_coverage clause work with ClangCoverage" am: c9ef6ee1b7 am: e1dd7bf4ec
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1340832

Change-Id: I02b9d4f8fea3facdd4c41d633d49bd2006718fe5
2020-06-23 03:37:05 +00:00
TreeHugger Robot
78d26d169b Merge "VNDK listing contains device modules only" into rvc-dev 2020-06-23 03:12:44 +00:00
Christopher Ferris
f70926eef0 Remove libc_scudo references.
Test: Builds and boots.
Change-Id: Iad97159e6193f7afffd8fbc9456427eee5d150e3
Merged-In: Iad97159e6193f7afffd8fbc9456427eee5d150e3
(cherry picked from commit 1f16b27511)
2020-06-22 15:27:56 -07:00
Colin Cross
1a6acd4f39 Make native_coverage clause work with ClangCoverage
Make uses NATIVE_COVERAGE to enable gcov coverage and CLANG_COVERAGE
to enable clang coverage.  NATIVE_COVERAGE is translated to the Soong
Native_coverage product variable which triggers the native_coverage
clause in Android.bp files.  The clause also needs to be triggered
for CLANG_COVERAGE.

Rename the existing Native_coverage product variable to GcovCoverage,
and regenerate Native_coverage when either GcovCoverage or
ClangCoverage are set.

Also remove NativeLineCoverage, it wasn't doing anything differently
than Native_coverage.

Bug: 159059537
Test: m checkbuild
Change-Id: I215124a9b35a2ad50ad562079d392e3d33da11f4
2020-06-22 11:13:42 -07:00
Treehugger Robot
8448726d3d Merge "Add test-suite-tag to test_options" am: bf6a8aeec2 am: 433b1c84f9
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1343577

Change-Id: Id2443a7d496061bbf858eea7a7c4f65b3bec5035
2020-06-18 23:00:00 +00:00
Treehugger Robot
bf6a8aeec2 Merge "Add test-suite-tag to test_options" 2020-06-18 22:33:30 +00:00
David Srbecky
519db27d98 Add test-suite-tag to test_options
Bug: 147817558
Test: Check the generated config file
Change-Id: I679dc7b4a582486ac61380a7e42f1373534d7086
2020-06-18 19:22:49 +01:00
Kousik Kumar
4e30bbaca1 Add remote execution support for clang-tidy actions
Test: Ran with the following command and it succeeded
RBE_CLANG_TIDY="true" RBE_CLANG_TIDY_EXEC_STRATEGY="remote" RBE_CXX_EXEC_STRATEGY="remote_local_fallback" RBE_METALAVA="true" RBE_METALAVA_EXEC_STRATEGY="local" RBE_ABI_LINKER="true" RBE_ABI_LINKER_EXEC_STRATEGY="remote_local_fallback" RBE_CXX_LINKS="true" RBE_CXX_LINKS_EXEC_STRATEGY="remote" use_rbe m out/soong/.intermediates/external/android-clat/clatd/android_arm_armv7-a-neon/obj/external/android-clat/icmp.tidy

Bug: b/157147559
Change-Id: I110b6157fc090abd14ac32330fc59a3d76cdfa82
2020-06-18 09:34:19 -07:00
Treehugger Robot
114af7ebed Merge "Propagate unique_host_soname to cc_library prebuilts." am: 1a1e1f882f am: d0ef0ab56f
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1341763

Change-Id: I284f05d569c70c049114c68c7284f72ba61b478b
2020-06-18 14:59:21 +00:00
Treehugger Robot
1a1e1f882f Merge "Propagate unique_host_soname to cc_library prebuilts." 2020-06-18 14:34:14 +00:00
Yo Chiang
e9a8964e26 Merge "VNDK listing contains device modules only" am: 977dc2281f am: b869828466
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1325680

Change-Id: Id33dc54c43d87e7f23f6d0763102ab94430a4102
2020-06-18 10:21:11 +00:00
Yo Chiang
97c74da17b VNDK listing contains device modules only
Fix a bug where host-only modules were incorrectly listed as VNDK.
Also refactor VndkMutator() / apexVndkDepsMutator() module skipping
logic.

Bug: 158543482
Test: Add unit test to cc/cc_test.go
Change-Id: I50b09f526cbc081149d8241c2a091e3ee48ef4d7
Merged-In: I50b09f526cbc081149d8241c2a091e3ee48ef4d7
(cherry picked from commit bba545e039)
2020-06-18 10:02:07 +00:00
Yo Chiang
977dc2281f Merge "VNDK listing contains device modules only" 2020-06-18 09:48:02 +00:00
Martin Stjernholm
47ed352227 Propagate unique_host_soname to cc_library prebuilts.
Test: m nothing
Test: Check on go/Android.bp that cc_prebuilt_library supports
  unique_host_soname
Bug: 158743135
Change-Id: Ie02a5cae057fb9092c226d8c5b7f63e1f66ad066
2020-06-17 23:06:43 +01:00
Martin Stjernholm
806353bd7b Merge "Build against SDKs for native libs only for unbundled apps." am: c38936add4 am: d3c16f2c37
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1336940

Change-Id: Id7160e4a927bb5ac85354fa8167b3d0a046eaf6b
2020-06-17 17:49:02 +00:00
Martin Stjernholm
c38936add4 Merge "Build against SDKs for native libs only for unbundled apps." 2020-06-17 17:31:24 +00:00
Inseob Kim
cea768007f Exclude kernel_headers from vendor snapshot
Vendor snapshot is supposed to have AOSP-defined modules which are
installed to vendor. kernel_headers are excluded from snapshot because
they always depend on vendor, regardless of locations they are defined.

Bug: 157106227
Test: m vendor-snapshot
Change-Id: If47634678797973266fcf502739216daf28ad790
Merged-In: If47634678797973266fcf502739216daf28ad790
(cherry picked from commit 65ca36a72e)
2020-06-17 15:01:26 +09:00
Treehugger Robot
ced8c64073 Merge "Don't create version variants for SDK variants" am: 6116ffdcf5 am: 974d8be0ac
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1340033

Change-Id: I0f31d72d4f0a1792121000c653c67da0183217be
2020-06-17 04:32:51 +00:00
Treehugger Robot
6116ffdcf5 Merge "Don't create version variants for SDK variants" 2020-06-17 04:19:04 +00:00
Jiyong Park
2286afd0ef Don't create version variants for SDK variants
When a lib has sdk_version set, an SDK variant and a platform variant
are created by the sdkMutator. Then by the versionMutator, if the
library had 'stubs.versions' property, one or more versioned variants
and one impl variant are created for each of the two (SDK and platform)
variants. As a concrete example,

cc_library {
    name: "foo",
    sdk_version: "current",
    stubs: { versions: ["1", "2"], },
}

would create 6 variants:

1) (sdk: "", version: "")
2) (sdk: "", version: "1")
3) (sdk: "", version: "2")
4) (sdk: "sdk", version: "")
5) (sdk: "sdk", version: "1")
6) (sdk: "sdk", version: "2")

This is somewhat uncessary because the need for the SDK mutator is to
have the platform variant (sdk:"") of a lib where sdk_version is unset,
which actually makes sens for the impl variant (version:""), but not
the versioned variants (version:"1" or version:"2").

This is not only unncessary, but also causes duplicate module
definitions in the Make side when doing an unbundled build. Specifically,
The #1 and #4 above both are emitted to Make and get the same name
"foo".

To fix the problem and not to create unnecessary variants, the versioned
variants are no longer created for the sdk variant. So, foo now has
the following variants only.

1) (sdk: "", version: "") // not emitted to Make (by versionMutator)
2) (sdk: "", version: "1") // not emitted to Make (by versionMutator)
3) (sdk: "", version: "2") // emitted to Make (by versionMutator)
4) (sdk: "sdk", version: "") // not emitted to Make (by versionMutator)

Bug: 159106705
Test: Add sdk_version:"minimum" to libnativehelper in libnativehelper/Android.bp.
m SOONG_ALLOW_MISSING_DEPENDENCIES=true TARGET_BUILD_UNBUNDLED=true libnativehelper

Change-Id: I6f02f4189e5504286174ccff1642166da82d00c9
2020-06-17 04:18:21 +00:00
Martin Stjernholm
fd9eb4b8a6 Build against SDKs for native libs only for unbundled apps.
Unbundled APEX modules need to access the platform variant (i.e.
sdk:"") since it's there that the versioned stubs are exposed.

Test: m SOONG_ALLOW_MISSING_DEPENDENCIES=true \
        TARGET_BUILD_UNBUNDLED=true toybox
  on master-art with prebuilt Runtime (Bionic) APEX SDK. The prebuilt
  SDK doesn't have libc.ndk.xxx etc, which e.g. libcrypto would depend
  on without this CL, since it specifies sdk_version.
Bug: 157549171
Change-Id: I3095e42beb2b48421bfb81be942cc2ac30405fd0
2020-06-17 04:28:27 +01:00
Inseob Kim
b83199c721 Merge "Always create both variants for kernel headers" am: bee157256d am: aa98f34144
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1328735

Change-Id: I1c9f2dc53bbe157819ad1bba8c463f02fb5c428f
2020-06-17 00:19:38 +00:00
Inseob Kim
591dab5372 Merge "Choose SAbi files with module's vndk version" am: 9a0b897904 am: a8b6f0ba48
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1326994

Change-Id: I3191b9eee3ac497c7885c60a85d7fc839f1d5f8b
2020-06-17 00:19:26 +00:00
Inseob Kim
e11ffe52a9 Merge "Exclude kernel_headers from vendor snapshot" am: 6fec12abc7 am: b6680bdab5
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1328736

Change-Id: Ic972188c3acb901852a4d69ac99215e133653cf6
2020-06-17 00:19:08 +00:00
Inseob Kim
bee157256d Merge "Always create both variants for kernel headers" 2020-06-16 23:38:02 +00:00
Inseob Kim
9a0b897904 Merge "Choose SAbi files with module's vndk version" 2020-06-16 23:38:00 +00:00
Inseob Kim
6fec12abc7 Merge "Exclude kernel_headers from vendor snapshot" 2020-06-16 23:37:57 +00:00
Treehugger Robot
f1429cab7d Merge "Prefer armv8.2-a to armv8.2a for GNU as compatibility" am: e6c1d80072 am: f8fdc174d0
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1339953

Change-Id: I2b9a423516f0d26735225c05c6442e44c0696113
2020-06-16 22:08:15 +00:00
Stephen Hines
502f901e17 Prefer armv8.2-a to armv8.2a for GNU as compatibility
There are still out-of-tree users of `-fno-integrated-as`, which will
have issues without the hyphen.

Bug: http://b/158191033
Test: ./build.py
Change-Id: I44b68ab5b65a68df3993f38b99662178915e9be2
2020-06-16 02:40:40 -07:00
Sophie Zheng
ea3fdcd596 Merge "Fix build breakage b/158783867" am: 83b1296457 am: d4b69d31c4
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1332082

Change-Id: I643fae908517db5e77dbec076fa33714269bced5
2020-06-15 17:17:32 +00:00
Colin Cross
95f7b34e8e Use inclusive language in build/soong
Bug: 158889297
Test: m checkbuild
Change-Id: Id07890b7cbc2397291a658ca00e86b43c743aafc
Merged-In: Id07890b7cbc2397291a658ca00e86b43c743aafc
(cherry picked from commit 440e0d0542)
2020-06-15 09:46:31 -07:00
Colin Cross
9855207d0e Define Soong phony rules in Make
To support dist-for-goals in Soong, we need to define all phony rules
in Make so that dist-for-goals can insert additional dependencies on
them.  Collect all the phony rules in phonySingleton and write them
out as Make rules when Soong is embedded in Make, or as blueprint.Phony
rules when Soong is run standalone.

Bug: 153485543
Test: m checkbuild
Change-Id: I68201eff30744b0f487fc4f11f033767b53a627d
Merged-In: I68201eff30744b0f487fc4f11f033767b53a627d
(cherry picked from commit c3d87d3112)
2020-06-15 09:46:31 -07:00
Colin Cross
5a3458ddc0 Remove paths from cc.TestConfig
Now that tests don't need to specify every path passed to
PathForSource or PathForModuleSrc, remove them from cc.TestConfig.

Bug: 153485543
Test: all soong tests
Change-Id: I90cd7b4dfc49c156afbb0eea9a77159c3e1860fa
Merged-In: I90cd7b4dfc49c156afbb0eea9a77159c3e1860fa
(cherry picked from commit 2fce23ae6d)
2020-06-15 09:46:31 -07:00
Sophie Zheng
83b1296457 Merge "Fix build breakage b/158783867" 2020-06-15 16:44:54 +00:00
Roland Levillain
5e303f1b31 Merge "Rename native code coverage paths product variables in Soong." am: 2752d926a9 am: c052ef7d33
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1326320

Change-Id: I1a54d986c3e3080588011bab7469f38144a3d748
2020-06-15 10:37:09 +00:00
Roland Levillain
2752d926a9 Merge "Rename native code coverage paths product variables in Soong." 2020-06-15 10:12:10 +00:00
Ivan Lozano
7f108c9ae3 Merge "Match Rust gcda output to cc via -Z profile-emit." am: f094f1c313 am: 78599c2cc5
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1329395

Change-Id: I66ee99afb22cc1147aed07703e9bcf2add77e010
2020-06-13 02:51:23 +00:00
Colin Cross
973d6813cd manual merge of 2ef16cfcd4 to rvc-dev-plus-aosp
Test: I solemnly swear I tested this conflict resolution.
Bug: None
Change-Id: I768c3fe568fee764cb0b533e73a3fef719adf30c
2020-06-12 17:49:09 -07:00
sophiez
148b317ab8 Fix build breakage b/158783867
Add missing dependency for file 'api_levels.json' in rule
'parseNdkApiRule'
Forest test build link: http://shortn/_iCbktdkPsT

Test: m ndk

Change-Id: I9bcd3f8d261e40b6033ec82c4a50971ccb8b45b1
2020-06-12 20:19:50 +00:00
Ivan Lozano
f094f1c313 Merge "Match Rust gcda output to cc via -Z profile-emit." 2020-06-12 16:12:48 +00:00
Colin Cross
440e0d0542 Use inclusive language in build/soong
Test: m checkbuild
Change-Id: Id07890b7cbc2397291a658ca00e86b43c743aafc
2020-06-11 15:33:16 -07:00
Colin Cross
4aa6fbc9d5 Define Soong phony rules in Make am: c3d87d3112 am: 970fd93b92
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1325397

Change-Id: I44eba43a7c316b9cb9696d02962a84d0c1d8ebed
2020-06-11 20:47:03 +00:00
Colin Cross
5dea871f37 Remove paths from cc.TestConfig am: 2fce23ae6d am: 85f1395958
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1325396

Change-Id: Ibc80d2369d826978c27349a95be659ca4d521606
2020-06-11 20:47:00 +00:00
Sophie Zheng
346ec3c0b2 Merge "NDK Api Coverage" am: 582bebf051 am: 6574db06ec
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1320013

Change-Id: I03e7b09c4c40a8a83f2053304595a0918995ec69
2020-06-11 18:45:20 +00:00
Colin Cross
970fd93b92 Define Soong phony rules in Make am: c3d87d3112
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1325397

Change-Id: Ia6a1f96c75c660525127c25472327dd78ba58124
2020-06-11 18:42:02 +00:00
Colin Cross
85f1395958 Remove paths from cc.TestConfig am: 2fce23ae6d
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1325396

Change-Id: Ica1f496b45a0e528fd94dc53a1db2478234ddb77
2020-06-11 18:42:00 +00:00
Colin Cross
1adc63ec3d Merge changes from topics "dist-for-goals", "soong-dist", "tests-PathForSource"
* changes:
  Add DistForGoal to MakeVarsContext
  Define Soong phony rules in Make
  Remove paths from cc.TestConfig
  Remove most paths from java.TestConfig
  Allow tests to bypass PathForSource existence checks
2020-06-11 18:36:18 +00:00
Sophie Zheng
582bebf051 Merge "NDK Api Coverage" 2020-06-11 18:21:39 +00:00
sophiez
58cabb7af6 NDK Api Coverage
Enable ndk_library processing for api code coverage. All parsed generated xml files will be dist and later upload to artifacts.

Test: m ndk

Change-Id: I76ac52f60d5bbb106308658cf7417b845af9a49e
2020-06-11 18:18:40 +00:00
Sophie Zheng
3c4ce6c970 Merge "Add ndk api parser for ndk api coverage." am: 52481b445b am: cba84bf475
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1304641

Change-Id: I256b2b47767a127d40340d8c94fc24648977fd72
2020-06-11 17:46:17 +00:00
Sophie Zheng
52481b445b Merge "Add ndk api parser for ndk api coverage." 2020-06-11 17:21:05 +00:00
Ivan Lozano
f3717eec6c Match Rust gcda output to cc via -Z profile-emit.
Use the -Z profile-emit flag to ensure that rust gcda files have
/proc/self/cwd/ appended to them similar to cc modules. This makes sure
our gcda output is consistent no matter what language the binary is
written in.

Bug: 156482307
Test: gcda outputs to the new path.

Change-Id: Ife4d55f885c7e33dffa66f7436bc2bf8b5916586
2020-06-11 17:16:27 +00:00
Stephen Hines
26d6b7834c Update LLVM toolchain to r383902b.
Bug: http://b/149417653
Test: m
Change-Id: I0e191b463852da8b5eb5a4e092ef9b5da255df3d
(cherry picked from commit b31d77e57c)
2020-06-11 02:28:58 -07:00
Treehugger Robot
1980e740c0 Merge "Update LLVM toolchain to r383902b." am: 9f42bb8822 am: 4019a06c3c
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1329715

Change-Id: I88cb95d31ffe7b4eb0f401bd6c928c9d5d63b51d
2020-06-11 09:05:16 +00:00
Treehugger Robot
9f42bb8822 Merge "Update LLVM toolchain to r383902b." 2020-06-11 08:44:18 +00:00
Inseob Kim
65ca36a72e Exclude kernel_headers from vendor snapshot
Vendor snapshot is supposed to have AOSP-defined modules which are
installed to vendor. kernel_headers are excluded from snapshot because
they always depend on vendor, regardless of locations they are defined.

Bug: 157106227
Test: m vendor-snapshot
Change-Id: If47634678797973266fcf502739216daf28ad790
2020-06-11 14:50:14 +09:00
Inseob Kim
f3044b64d7 Always create both variants for kernel headers
kernel_headers exports header files from TARGET_DEVICE_KERNEL_HEADERS,
TARGET_BOARD_KERNEL_HEADERS, and TARGET_PRODUCT_KERNEL_HEADERS. All of
them are bound to vendor, so they will always have both variants.

Bug: 157106227
Test: manual
Change-Id: I903b7ddbee21f63174dbba47bc6c093b90d1b42d
2020-06-11 14:49:48 +09:00
Treehugger Robot
129956fbd4 Merge "Add exclude_shared_libs, expand exclude_static_libs to cover static_libs" am: 7d95aac066 am: 6f77147fde
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1330296

Change-Id: I652bb18737cc52655628b7d8bfaca39fc23c6d0b
2020-06-11 03:12:49 +00:00
Treehugger Robot
7d95aac066 Merge "Add exclude_shared_libs, expand exclude_static_libs to cover static_libs" 2020-06-11 02:38:31 +00:00
Colin Cross
062103115c Add exclude_shared_libs, expand exclude_static_libs to cover static_libs
Allow variants to exclude shared or static libs.

Bug: 153609531
Test: manual
Change-Id: I6ac9c445ed233c774a051743ed6760058c9918e9
2020-06-10 15:47:34 -07:00
Stephen Hines
b31d77e57c Update LLVM toolchain to r383902b.
Bug: http://b/149417653
Test: m
Change-Id: I0e191b463852da8b5eb5a4e092ef9b5da255df3d
2020-06-10 15:39:31 -07:00
Martin Stjernholm
b8f14acafd Merge "Fix duplicate install targets from sdk variants in --skip-make mode." am: d297b77e84 am: 4a644cf9e5
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1322698

Change-Id: I55d5e2a41cdad4f43d656a3afc2e0e83f9f4da09
2020-06-10 18:37:32 +00:00
Elliott Hughes
f48d50bfb7 Merge "Remove TARGET_PREFER_32_BIT support." am: a82ad479a4 am: 274a80c492
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1289612

Change-Id: I8862a464aa374922dadedd68e47d1705b8ce5836
2020-06-10 18:36:54 +00:00
Martin Stjernholm
d297b77e84 Merge "Fix duplicate install targets from sdk variants in --skip-make mode." 2020-06-10 18:25:44 +00:00
Elliott Hughes
a82ad479a4 Merge "Remove TARGET_PREFER_32_BIT support." 2020-06-10 18:07:06 +00:00
Roland Levillain
4f5297b438 Rename native code coverage paths product variables in Soong.
Rename `CoveragePath` and `CoverageExcludePaths` as
`NativeCoveragePath` and `NativeCoverageExcludePaths` (resp.).
Also rename function `android.CoverageEnabledForPath` as
`android.NativeCoverageEnabledForPath`.

Test: m nothing
Bug: 158212027
Change-Id: Id2c11a638e88088096420b537effa866d7667304
2020-06-10 13:00:07 +01:00
Colin Cross
c3d87d3112 Define Soong phony rules in Make
To support dist-for-goals in Soong, we need to define all phony rules
in Make so that dist-for-goals can insert additional dependencies on
them.  Collect all the phony rules in phonySingleton and write them
out as Make rules when Soong is embedded in Make, or as blueprint.Phony
rules when Soong is run standalone.

Test: m checkbuild
Change-Id: I68201eff30744b0f487fc4f11f033767b53a627d
2020-06-09 14:38:50 -07:00
Colin Cross
2fce23ae6d Remove paths from cc.TestConfig
Now that tests don't need to specify every path passed to
PathForSource or PathForModuleSrc, remove them from cc.TestConfig.

Test: all soong tests
Change-Id: I90cd7b4dfc49c156afbb0eea9a77159c3e1860fa
2020-06-09 14:38:47 -07:00
sophiez
b858c6d497 Add ndk api parser for ndk api coverage.
Test: m test_ndk_api_coverage_parser

Change-Id: I7be4f505757b1ca915de5e378952f8b104e1d362
2020-06-09 14:33:20 -07:00
Yo Chiang
bba545e039 VNDK listing contains device modules only
Fix a bug where host-only modules were incorrectly listed as VNDK.
Also refactor VndkMutator() / apexVndkDepsMutator() module skipping
logic.

Bug: 158543482
Test: Add unit test to cc/cc_test.go
Change-Id: I50b09f526cbc081149d8241c2a091e3ee48ef4d7
2020-06-09 22:10:53 +08:00
Inseob Kim
96f17f0eed Choose SAbi files with module's vndk version
No matter what BOARD_VNDK_VERSION is set to, VNDKs should be regarded as
PLATFORM_VNDK_VERSION. This fixes an abidiff error due to the version
mismatch.

Bug: 157106227
Test: manual test with BOARD_VNDK_VERSION
Change-Id: I0d262b8ee5ac6f40fea7c2fb18322531434c0b4b
2020-06-09 22:05:09 +09:00
Orion Hodson
5cffce1207 Revert^2: "Remove implict jni.h include path"
Bug: 152482542
Test: m checkbuild

Change-Id: I6175d7c59734ba9b6c32457e5a9b0704d49f4106
Merged-In: I6175d7c59734ba9b6c32457e5a9b0704d49f4106
Exempt-From-Owner-Approval: approved in other branches
(cherry picked from commit e3ce0ba781)
2020-06-09 09:54:56 +00:00
Elliott Hughes
79ae341d4b Remove TARGET_PREFER_32_BIT support.
Bug: https://issuetracker.google.com/138812821
Test: builds
Change-Id: If96cccbd82ba1311165d61c947c928c6e7cd5593
2020-06-08 16:37:13 -07:00
Orion Hodson
92febdc85f Remove implict jni.h include path
Bug: 152482542
Test: m checkbuild

Change-Id: I6175d7c59734ba9b6c32457e5a9b0704d49f4106
Merged-In: I6175d7c59734ba9b6c32457e5a9b0704d49f4106
(cherry picked from commit e3ce0ba781)
Exempt-From-Owner-Approval: approved in other branches
2020-06-08 12:40:25 +00:00
Orion Hodson
5defe3d282 Merge "Revert "Remove implict jni.h include path"" am: e29cac0861 am: 9792df9812
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1325171

Change-Id: I39155f1eb5878498a434dc6d0f4657b164141a8c
2020-06-05 15:54:24 +00:00
Orion Hodson
e29cac0861 Merge "Revert "Remove implict jni.h include path"" 2020-06-05 15:23:25 +00:00
Orion Hodson
465c775ab8 Revert "Remove implict jni.h include path"
This reverts commit e68926d4d3.

Reason for revert: breaks build in various -plus-aosp branches
Bug: 158293810

Change-Id: I80572f673df83161be02873b2b2acf4b2ba9a2d4
Exempt-From-Owner-Approval: revert
2020-06-05 15:17:20 +00:00
Treehugger Robot
83b56c34b4 Merge "Remove implict jni.h include path" am: 2ebae3e936 am: a06b9185a8
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1316577

Change-Id: I60571a191a651afee54a23057fa92c1470ae1dce
2020-06-05 13:49:52 +00:00
Treehugger Robot
2ebae3e936 Merge "Remove implict jni.h include path" 2020-06-05 13:26:32 +00:00
Inseob Kim
206665cc9b Do not disable llndk libraries
LLNDK libraries shouldn't be disabled in any case.

Bug: 157106227
Test: m
Change-Id: I059e639b21d0edb8abc00773891d37e890a36cce
Merged-In: I059e639b21d0edb8abc00773891d37e890a36cce
(cherry picked from commit 470b4cf826)
2020-06-05 04:26:29 +00:00
Inseob Kim
85708802d4 Create only one vendor variant depending on path
Not all vendor modules are meant to be working with multiple versions of
vndk unmodified. This restricts all vendor or vendor_available modules
to only one variant. Modules under proprietary directories will only
have BOARD_VNDK_VERSION variant, while modules under AOSP directories
will only have PLATFORM_VNDK_VERSION variant.

Bug: 157106227
Bug: 157133296
Test: capture snapshot from R
Test: try building master with R snapshot
Change-Id: I4ebe1da8d887cd76722fa8ab5ae9305da09074d4
Merged-In: I4ebe1da8d887cd76722fa8ab5ae9305da09074d4
(cherry picked from commit af578ffacc)
2020-06-05 04:26:24 +00:00
Inseob Kim
1042d29705 Implement cc_object vendor snapshot
cc_object modules are also necessary for vendor snapshot.

Bug: 157106227
Test: m vendor-snapshot
Change-Id: Idf4fd37a26f6f712f3cbab43133622f9f9bd9372
Merged-In: Idf4fd37a26f6f712f3cbab43133622f9f9bd9372
(cherry picked from commit 502679e061)
2020-06-05 04:26:17 +00:00
Inseob Kim
7f283f4bd0 Refine logic choosing vendor snapshot modules
This refines the vendor snapshot codes in order to fix logic errors.

- Capture toolchain_library and cc_library_headers correctly.
- Redirect unwind static library correctly.
- Filter out sanitize / coverage / lto by looking at HideFromMake.
- Add binary() function for clear and shorter codes.
- Include test modules.
- Add more tests to prevent further snapshot breakages.

Bug: 157106227
Test: m vendor-snapshot
Test: m nothing for all available targets
Test: EMMA_INSTRUMENT=true EMMA_INSTRUMENT_FRAMEWORK=true \
NATIVE_COVERAGE=true COVERAGE_PATHS="*" m nothing

Change-Id: Id90082b5ab730f928582ad24f022ba410855400e
Merged-In: Id90082b5ab730f928582ad24f022ba410855400e
(cherry picked from commit 4d8d8fec4a)
2020-06-05 04:25:40 +00:00
Inseob Kim
5f789d7b91 Merge changes I059e639b,I4ebe1da8,Idf4fd37a,Id90082b5 into rvc-dev am: 2743c1def6
Original change: https://googleplex-android-review.googlesource.com/c/platform/build/soong/+/11698189

Change-Id: I62157287035bee39b902421c37cdd7e3213a6222
2020-06-05 04:15:27 +00:00
Inseob Kim
2743c1def6 Merge changes I059e639b,I4ebe1da8,Idf4fd37a,Id90082b5 into rvc-dev
* changes:
  Do not disable llndk libraries
  Create only one vendor variant depending on path
  Implement cc_object vendor snapshot
  Refine logic choosing vendor snapshot modules
2020-06-05 04:02:35 +00:00
Martin Stjernholm
02229a2c6b Fix duplicate install targets from sdk variants in --skip-make mode.
This can manifest as duplicate "dependency missing" rules in builds
where SOONG_ALLOW_MISSING_DEPENDENCIES, TARGET_BUILD_APPS and
--skip-make are used together.

Test: art/tools/build_linux_bionic.sh dalvikvm
  with "export TARGET_BUILD_APPS=com.android.art" after the lunch line
  in build_linux_bionic.sh.
Bug: 157549171
Change-Id: I0e8dec0020f194cd265c73a55153555a51f6a426
2020-06-04 15:32:47 +01:00
Orion Hodson
e68926d4d3 Remove implict jni.h include path
Bug: 152482542
Test: m checkbuild
Change-Id: I7225646a31fb87879c47f71a1a919b342c9b488f
Merged-In: I7225646a31fb87879c47f71a1a919b342c9b488f
(cherry picked from commit 90e9505f56)
2020-06-04 10:44:08 +00:00
Inseob Kim
470b4cf826 Do not disable llndk libraries
LLNDK libraries shouldn't be disabled in any case.

Bug: 157106227
Test: m
Change-Id: I059e639b21d0edb8abc00773891d37e890a36cce
2020-06-03 15:50:07 +09:00
Inseob Kim
af578ffacc Create only one vendor variant depending on path
Not all vendor modules are meant to be working with multiple versions of
vndk unmodified. This restricts all vendor or vendor_available modules
to only one variant. Modules under proprietary directories will only
have BOARD_VNDK_VERSION variant, while modules under AOSP directories
will only have PLATFORM_VNDK_VERSION variant.

Bug: 157106227
Bug: 157133296
Test: capture snapshot from R
Test: try building master with R snapshot
Change-Id: I4ebe1da8d887cd76722fa8ab5ae9305da09074d4
2020-06-03 15:32:44 +09:00
Jaewoong Jung
fccad6b098 Soong package structure refactoring
Give prebuilt_etc and sh_binary their own packages and split the
gigantic main Android.bp up to small, per-package ones.

(This is a cherry-pick change.)

Test: m nothing, TreeHugger
Bug: 156980228
Change-Id: I7b00cd344b9f16861f1ff39edf0029f016b853d0
Merged-In: I7b00cd344b9f16861f1ff39edf0029f016b853d0
2020-06-02 14:35:04 -07:00
Jaewoong Jung
8066ebc38f Merge "Soong package structure refactoring" am: 264700345d am: ca9ed9158d
Original change: undetermined

Change-Id: I5cd95c02ab8af420dc2b7166ba24bdf0c7dc6496
2020-06-02 16:57:16 +00:00
Inseob Kim
502679e061 Implement cc_object vendor snapshot
cc_object modules are also necessary for vendor snapshot.

Bug: 157106227
Test: m vendor-snapshot
Change-Id: Idf4fd37a26f6f712f3cbab43133622f9f9bd9372
2020-06-02 14:43:06 +00:00
Inseob Kim
4d8d8fec4a Refine logic choosing vendor snapshot modules
This refines the vendor snapshot codes in order to fix logic errors.

- Capture toolchain_library and cc_library_headers correctly.
- Redirect unwind static library correctly.
- Filter out sanitize / coverage / lto by looking at HideFromMake.
- Add binary() function for clear and shorter codes.
- Include test modules.
- Add more tests to prevent further snapshot breakages.

Bug: 157106227
Test: m vendor-snapshot
Test: m nothing for all available targets
Test: EMMA_INSTRUMENT=true EMMA_INSTRUMENT_FRAMEWORK=true \
NATIVE_COVERAGE=true COVERAGE_PATHS="*" m nothing

Change-Id: Id90082b5ab730f928582ad24f022ba410855400e
2020-06-02 23:31:58 +09:00
Jaewoong Jung
4b79e98a6e Soong package structure refactoring
Give prebuilt_etc and sh_binary their own packages and split the
gigantic main Android.bp up to small, per-package ones.

Test: m nothing, TreeHugger
Bug: 156980228
Change-Id: I7b00cd344b9f16861f1ff39edf0029f016b853d0
2020-06-01 13:44:48 -07:00
Martin Stjernholm
1b54c4f596 Merge "Propagate flags necessary for a prebuilt of the Bionic linker." am: a6a224586b am: 7ba2203249
Change-Id: Iefeade1282ad4c0a2598cd36e56f8c5210d515ed
2020-06-01 10:18:28 +00:00
Martin Stjernholm
a6a224586b Merge "Propagate flags necessary for a prebuilt of the Bionic linker." 2020-06-01 09:55:10 +00:00
Inseob Kim
04f2d6a675 Capture libeigen's header correctly
libeigen exports entire directory, but only two directories contain
actual exported headers. And some of headers have no extension. This
adds a special behaviour for external/eigen when capturing snapshot.

Exempt-From-Owner-Approval: cherry-pick from internal branch

Bug: 157106227
Test: m vendor-snapshot captures libeigen's headers
Change-Id: I82f27d4c6c4d472f47d54c545328150697b8cda3
Merged-In: I82f27d4c6c4d472f47d54c545328150697b8cda3
(cherry picked from commit 67f3dbca2f)
2020-06-01 01:07:48 +00:00
Inseob Kim
7c26c8c95c Merge "Capture libeigen's header correctly" into rvc-dev am: c344620ed6
Change-Id: Ie0a1438f17d720a423d1aae4bc0832fe7d1d0e43
2020-05-31 16:04:51 +00:00
Inseob Kim
c344620ed6 Merge "Capture libeigen's header correctly" into rvc-dev 2020-05-31 15:49:54 +00:00
Anton Hansson
28090556c5 Merge "Revert "Fix missing headers of vendor snapshot"" am: ae9170cdd0 am: 67c96391f6
Change-Id: Ia8a38740a9c9cdb96bdab768b7fe94c43be8d4dd
2020-05-29 21:52:40 +00:00
Anton Hansson
0fcdd53e10 Revert "Fix missing headers of vendor snapshot"
This reverts commit b6a586241e.

Reason for revert: b/157737963

Change-Id: Ic72e14ba2d8c3bfbc61906bf668a3e56619f04a4
2020-05-29 16:11:19 +00:00
Inseob Kim
8d3b712ae0 Merge "Fix missing headers of vendor snapshot" am: 705e6e8ce9 am: e4f0a009a0
Change-Id: I6aca5aaa25ed643b2a56cbf719d803555b427ce3
2020-05-29 13:57:18 +00:00
Inseob Kim
67f3dbca2f Capture libeigen's header correctly
libeigen exports entire directory, but only two directories contain
actual exported headers. And some of headers have no extension. This
adds a special behaviour for external/eigen when capturing snapshot.

Bug: 157106227
Test: m vendor-snapshot captures libeigen's headers
Change-Id: I82f27d4c6c4d472f47d54c545328150697b8cda3
2020-05-29 22:36:38 +09:00
Martin Stjernholm
7130fabd20 Propagate flags necessary for a prebuilt of the Bionic linker.
The flags are necessary to avoid implicit dependencies on crt libs,
libc, and the linker (recursively). The reason cc_prebuilt_binary react
to these flags is that they can affect the install rules.

Test: m nothing
Test: art/test/testrunner/run_build_test_target.py art-linux-bionic-x64
  on a master-art branch using snapshot built from runtime-module-sdk
  and runtime-module-host-exports
Bug: 152255951
Change-Id: I6b2fe92d105d1f446fffd00bd3267a416f75efb7
2020-05-28 22:58:01 +01:00
Inseob Kim
b6a586241e Fix missing headers of vendor snapshot
Changing of installable function has broken vendor snapshot's header
libraries. Fixing it and adding tests to prevent further breakage.

Bug: 157106227
Test: m vendor-snapshot captures header libraries
Change-Id: I8b581c1b2186ca2db85ae408e959c20bbd034db6
2020-05-28 01:10:06 +00:00
Treehugger Robot
ac80afa642 Refactor RBE support for Javac/R8/D8 to use the remoteexec package.
Bug: b/156613606
Test: build with and without RBE_JAVAC/RBE_R8/RBE_D8 set.
Change-Id: I1607f8cfb4d2c3cbb3672152bbeb561d9968bc60
Merged-In: I1607f8cfb4d2c3cbb3672152bbeb561d9968bc60
2020-05-25 10:57:47 -04:00
Jooyung Han
ff4e78e876 Merge "apex: install hwasan lib if depended on libc" am: 166349beeb am: f7879cbfbd
Change-Id: I8c0ae40db7543d96f1511ded42cbd6b23b141796
2020-05-21 01:22:50 +00:00
Jooyung Han
166349beeb Merge "apex: install hwasan lib if depended on libc" 2020-05-21 00:48:26 +00:00
Treehugger Robot
35a91836e4 Add support for remotely executing header-abi-dumper actions.
Bug: b/156613606
Test: built with and without RBE_ABI_DUMPER set.
Change-Id: Ie752c07325453076d191813eaa50da03e3a0c2d8
Merged-In: Ie752c07325453076d191813eaa50da03e3a0c2d8
2020-05-19 09:55:36 -04:00
Ramy Medhat
9adb15e4d3 Merge "Add implicit outputs to link actions Bug: b/154733231" into rvc-dev 2020-05-19 13:43:06 +00:00
Jiyong Park
98a8d64126 Merge "Revert "Revert "Allow libz to have stub even though it's not an ..."" am: 550ff8cbfc am: df88e6fd6a
Change-Id: I977f8975e397b67af6c8f0dc664965170da350e0
2020-05-19 12:36:35 +00:00
Jiyong Park
550ff8cbfc Merge "Revert "Revert "Allow libz to have stub even though it's not an ..."" 2020-05-19 12:06:00 +00:00
Jiyong Park
2478e4e98f Revert "Revert "Allow libz to have stub even though it's not an ..."
Revert submission 1313718-revert-1312595-zlib_as_stub-BVNRLZPNBJ

Reason for revert: relanding

Reverted Changes:
I0cf486d9b:Revert "libz provides stubs to Mainline modules."
I412132f8a:Revert "libz is a stub"
I617eb90a3:Revert "Allow libz to have stub even though it's n...

Exempt-From-Owner-Approval: this is a clean relanding.

Test: m

Change-Id: Ib09a615bd11cf2647dcad42108adfcfc5040940f
2020-05-19 10:04:55 +00:00
Jiyong Park
5a33a3cac6 Merge "Reland "Prevent statically linking to a lib providing stable C APIs"" 2020-05-19 02:21:54 +00:00
Stephen Hines
13b041d6ea Merge "Default to zero-initialization instead of pattern." into rvc-dev 2020-05-18 22:18:21 +00:00
Treehugger Robot
09dce92ece Merge "Append whole_static_libs deps from .a files instead of the list of objects." am: 5b79950e99 am: d9b1282918
Change-Id: I9095dfd6ea2baaf523c15a5d931e0192f8b98981
2020-05-18 10:13:48 +00:00
Treehugger Robot
5b79950e99 Merge "Append whole_static_libs deps from .a files instead of the list of objects." 2020-05-18 09:41:41 +00:00
Jiyong Park
b93c0cb8ec Merge "Revert "Allow libz to have stub even though it's not an LLNDK li..."" am: 03c694d070 am: 0149ab8ae5
Change-Id: Id9dd37bc86ee07ef6215d91c0bce4025efbd4d61
2020-05-18 09:41:34 +00:00
Jiyong Park
03c694d070 Merge "Revert "Allow libz to have stub even though it's not an LLNDK li..."" 2020-05-18 09:27:35 +00:00
Jiyong Park
f133c18a00 Revert "Allow libz to have stub even though it's not an LLNDK li..."
Revert submission 1312595-zlib_as_stub

Exempt-From-Owner-Approval: reverting a bad change

Reason for revert: broke rvc-dev-plus-aosp
Reverted Changes:
I7c0a7f954:libz is a stub
If51a7e80f:libz provides stubs to Mainline modules.
I26417bb78:Allow libz to have stub even though it's not an LL...

Change-Id: I617eb90a33eacc7f264551c969ff5a16fa0d4087
2020-05-18 09:26:30 +00:00
Treehugger Robot
8968836a91 Merge "Allow libz to have stub even though it's not an LLNDK library" am: b4ce1e972c am: 86a5ba673e
Change-Id: I8caaeec8de07a09ea4c209602d8b7de182e45cad
2020-05-18 08:57:48 +00:00
Treehugger Robot
b4ce1e972c Merge "Allow libz to have stub even though it's not an LLNDK library" 2020-05-18 08:32:27 +00:00
Jiyong Park
7d95a510cc Reland "Prevent statically linking to a lib providing stable C APIs"
This reverts commit 5b75774004.

Exempt-From-Owner-Approval: cherry-pick from internal

Bug: 151051671
Test: m
Merged-In: I05f0465976098941d47ecc06c978cfa116364d78
(cherry picked from commit af7ed39b06)
Change-Id: I05f0465976098941d47ecc06c978cfa116364d78
2020-05-17 20:47:27 +09:00
Jiyong Park
af7ed39b06 Reland "Prevent statically linking to a lib providing stable C APIs"
This reverts commit 5b75774004.

Bug: 151051671
Test: m
Change-Id: I05f0465976098941d47ecc06c978cfa116364d78
2020-05-16 09:41:19 +09:00
Oliver Nguyen
df7bfec193 Merge "Ignore pass-failed warnings on coverage builds." am: 349b97d88a am: 748d03be8b
Change-Id: I40a6760fd5ea0a34f1c5d2dbcc802df0dd533729
2020-05-15 20:26:53 +00:00
Oliver Nguyen
349b97d88a Merge "Ignore pass-failed warnings on coverage builds." 2020-05-15 19:47:00 +00:00
Jooyung Han
8ce8db9ed6 apex: install hwasan lib if depended on libc
There're two ways to enable hwasan:
- global setting: TARGET_SANITIZE=hwaddress
- individual setting: sanitize: { hwaddress: true }

This change covers both cases by looking up if com.android.runtime is
hwaddress santized or not.

Bug: 156678661
Test: m (soong test added)
Change-Id: I67c382c3e76a06f4b27f221eebd153c698647227
2020-05-15 19:12:38 +09:00
Jiyong Park
844c3a031d Allow libz to have stub even though it's not an LLNDK library
Bug: 155456180
Test: m
Change-Id: I26417bb78a0d585eefc852c2aa118bfd71b5748b
2020-05-15 16:30:41 +09:00
Treehugger Robot
b5871f6d52 Merge "Restore "Default to zero-initialization instead of pattern."" am: 59759dff24 am: b8c6169aff
Change-Id: I34c71e2e7d23af5355a571435bbffe15f6c72f1f
2020-05-15 05:53:44 +00:00
Treehugger Robot
59759dff24 Merge "Restore "Default to zero-initialization instead of pattern."" 2020-05-15 05:20:35 +00:00
Oliver Nguyen
46f6dd78ff Ignore pass-failed warnings on coverage builds.
Clang coverage can disable certain passes, which throws a warning. Some
modules treat all warnings as errors, causing them to fail to build with
Clang coverage. Disable this warning only on coverage builds, as it is
still a useful warning for non-coverage builds.

Bug: 156609447
Test: m CLANG_COVERAGE=true COVERAGE_PATHS='*' libyuv
Change-Id: I1146befc382931f7eb0f1145ec63b90757600b61
2020-05-15 00:10:44 +00:00
Kousik Kumar
459c6b25e5 Add implicit outputs to link actions
Bug: b/154733231

Change-Id: I9b6ae97f5bbfe8f9c4b9c089544a768982794f32
Merged-In: I9b6ae97f5bbfe8f9c4b9c089544a768982794f32
Test: Built the failing action with / without this change
2020-05-14 17:33:35 +00:00
Martin Stjernholm
391d94c283 Append whole_static_libs deps from .a files instead of the list of
objects.

Necessary to make whole_static_libs work with
cc_prebuilt_library_static since it doesn't propagate the list of
object files.

Test: Build & boot
Test: m libsigchain && \
  ar t out/soong/.intermediates/art/sigchainlib/libsigchain/android_arm64_armv8-a_cortex-a73_static/libsigchain.a
  (Check that the list is sigchain.o followed by async_safe_log.o, both
  in a normal build and in one where async_safe is a prebuilt static
  lib.)
Bug: 154248570
Change-Id: Iaada8490ce713c13804b5771ad606f4a27e72a2f
2020-05-14 17:54:20 +01:00
Liz Kammer
8d501ef107 Merge "Add test data dependencies to APEX." am: 6109adaee0 am: 5b5cecd94e
Change-Id: I2589597f744dd62d0799f20d7de79dab4e8b07ae
2020-05-14 15:30:55 +00:00
Liz Kammer
6109adaee0 Merge "Add test data dependencies to APEX." 2020-05-14 15:06:49 +00:00
Stephen Hines
5c873acdb5 Restore "Default to zero-initialization instead of pattern."
This reverts commit 39fa1882ac.

Reason for revert: Original test was broken (go/oag/1311137), so restoring correct build/soong change.

Bug: http://b/156464649
Test: atest CtsNNAPITestCases:TensorRankConstraint

Change-Id: Id87b6a265a3541e95bcf2d68097738929e88e8b2
2020-05-14 01:00:46 +00:00
Treehugger Robot
0590ea3bca Merge "Revert "Default to zero-initialization instead of pattern."" am: 73e260fa37 am: c885911311
Change-Id: I237ce809a4314141100aa98a3c9274f59fbc120d
2020-05-13 23:51:04 +00:00
Treehugger Robot
73e260fa37 Merge "Revert "Default to zero-initialization instead of pattern."" 2020-05-13 23:41:28 +00:00
Stefano Galarraga
39fa1882ac Revert "Default to zero-initialization instead of pattern."
This reverts commit 7871416eec.

Reason for revert: This change is breaking CtsNNAPITestCases.TensorRankConstraint (http://b/156464649). 

Change-Id: I8831993a7d3c2079a8d76a23dfbdf9c7c1543181
2020-05-13 20:09:28 +00:00
Dan Shi
30ed3d4ce9 Use StopServicesSetup to stop/start framework.
Bug: 155774142
Test: atest VtsHalWifiV1_2TargetTest (update Android.bp with
disable_framework: true)

Change-Id: I5d5326f415352d50ace7f456d29b257d1d769318
Merged-In: I5d5326f415352d50ace7f456d29b257d1d769318
2020-05-13 17:27:56 +00:00
Liz Kammer
1c14a21994 Add test data dependencies to APEX.
Test: soong go tests

Bug: 155820504
Change-Id: If96d82c27f19953e34efb31f2111f1643c0c4008
2020-05-13 10:17:30 -07:00
Dan Shi
da6ea7119d Merge "Use StopServicesSetup to stop/start framework." am: 61b5e26f27 am: c022ff15b1
Change-Id: Ibab36c9ea3b3c2612aa866561fcc2ddd5ce20dbc
2020-05-13 16:54:02 +00:00
Dan Shi
61b5e26f27 Merge "Use StopServicesSetup to stop/start framework." 2020-05-13 16:19:07 +00:00
Stephen Hines
66467b44b8 Default to zero-initialization instead of pattern.
Bug: http://b/154169005
Test: Built blueline and ran some CTS tests.
Change-Id: Ie5e45619096cdcd0b52d01ece65e7f0233b2a3c8
(cherry picked from commit 7871416eec)
2020-05-13 01:49:34 -07:00
Treehugger Robot
c589305e8d Merge "Add support for the remote execution of Abi links." am: c81f967ddd am: e1d817f150
Change-Id: I8a276845427bab7ad7f2135672ac39e291944eb9
2020-05-12 22:00:25 +00:00
Treehugger Robot
c81f967ddd Merge "Add support for the remote execution of Abi links." 2020-05-12 21:35:43 +00:00
Dan Shi
8aa401023b Use StopServicesSetup to stop/start framework.
Bug: 155774142
Test: atest VtsHalWifiV1_2TargetTest (update Android.bp with
disable_framework: true)

Change-Id: I5d5326f415352d50ace7f456d29b257d1d769318
2020-05-12 13:54:49 -07:00
Stephen Hines
b99c9d52e2 Default to zero-initialization instead of pattern. am: 7871416eec am: a6ca70a374
Change-Id: I79affb3afb753859a38002a1b560d0876f8dfa87
2020-05-12 19:44:24 +00:00
Stephen Hines
7871416eec Default to zero-initialization instead of pattern.
Bug: http://b/154169005
Test: Built blueline and ran some CTS tests.
Change-Id: Ie5e45619096cdcd0b52d01ece65e7f0233b2a3c8
2020-05-12 01:10:38 -07:00
Treehugger Robot
7d053060f1 Merge "Add test_mainline_modules to the auto-gen test config(GTest only)." am: b67b9a416e am: 4fd48ce4a6
Change-Id: I0c33299fe24ce901c3accd3cf3b79cf6b4d80ca7
2020-05-12 05:04:29 +00:00
Treehugger Robot
b67b9a416e Merge "Add test_mainline_modules to the auto-gen test config(GTest only)." 2020-05-12 04:35:17 +00:00
easoncylee
2968a58a9a Add test_mainline_modules to the auto-gen test config(GTest only).
To support parameterized mainline modules in Test Mapping, we plan to
add a new parameter called test_mainline_modules in build system to
auto-generate the test config based on the parameter.

For detailed information: go/test-mapping-mainline-gcl
(serach for auto-generated pattern)

Bug: 155238134
Test: add "test_mainline_modules: [some.apk]" to libstatspull_test,
and build the modules, confirm the parameterized option is added
in the test config.

Change-Id: I31d6dfbb71881d7a7026cf2f36ba6ca6a97870ad
Merged-In: I31d6dfbb71881d7a7026cf2f36ba6ca6a97870ad
2020-05-12 08:55:07 +08:00
Paul Duffin
129171b6d4 Retry: Fix snapshot of a host/device cc_library with stubs
Change since last attempt: Disable test that breaks on darwin.

Adds a test that fails with unknown property android.stubs.versions
and then fixes that by marking the field from which that property is
created with 'ignored-on-host' and implemented the isHostVariant on
*osTypeSpecificInfo.

Bug: 155628860
Test: m nothing
Merged-In: Ia4e744c9e799d5adaf8a2f761516f568ec363ad4
Change-Id: Ia4e744c9e799d5adaf8a2f761516f568ec363ad4
(cherry picked from commit 7a1f7f32ab)
2020-05-10 23:56:40 +01:00
Paul Duffin
08385bf9ac Retry: Detect invalid arch specific properties in snapshot
Previously, the snapshot code did not know whether a specific property
could be arch specific or not and assumed that they all were which
meant that it could generate snapshots containing arch specific values
for properties that are not arch specific and so would fail when
unpacked.

This change requires arch specific fields in SdkMemberProperties to be
tagged as such using `android:"arch_variant"` (just as in module input
property structures). Any property without that must have properties
that are common across all variants.

Bug: 155628860
Test: m nothing
Merged-In: I3df60f0b53ba02ec2c55a80c7da058eac5909d26
Change-Id: I3df60f0b53ba02ec2c55a80c7da058eac5909d26
(cherry picked from commit 864e1b45db)
2020-05-10 23:56:18 +01:00
Paul Duffin
c27bc1439a Merge "Retry: Fix snapshot of a host/device cc_library with stubs" am: 2346e960a9 am: b51ceb2da9
Change-Id: I439fb1c67e70e4daaabe01b018adb95d6319e122
2020-05-09 08:14:15 +00:00
Paul Duffin
765e7b7407 Merge "Retry: Detect invalid arch specific properties in snapshot" am: 385378bf99 am: ba539d0faf
Change-Id: I8bec9a34eef34bf78c44f7836aba2496b117086f
2020-05-09 07:59:24 +00:00
Paul Duffin
7a1f7f32ab Retry: Fix snapshot of a host/device cc_library with stubs
Change since last attempt: Disable test that breaks on darwin.

Adds a test that fails with unknown property android.stubs.versions
and then fixes that by marking the field from which that property is
created with 'ignored-on-host' and implemented the isHostVariant on
*osTypeSpecificInfo.

Bug: 155628860
Test: m nothing
Change-Id: Ia4e744c9e799d5adaf8a2f761516f568ec363ad4
2020-05-08 22:32:08 +01:00
Paul Duffin
864e1b45db Retry: Detect invalid arch specific properties in snapshot
Previously, the snapshot code did not know whether a specific property
could be arch specific or not and assumed that they all were which
meant that it could generate snapshots containing arch specific values
for properties that are not arch specific and so would fail when
unpacked.

This change requires arch specific fields in SdkMemberProperties to be
tagged as such using `android:"arch_variant"` (just as in module input
property structures). Any property without that must have properties
that are common across all variants.

Bug: 155628860
Test: m nothing
Change-Id: I3df60f0b53ba02ec2c55a80c7da058eac5909d26
2020-05-08 22:31:56 +01:00
Greg Kaiser
3f1d51dc7e Merge changes from topic "revert-1302576-NGVCIVIIJO" am: a71fe150fa am: 010e45aa06
Change-Id: Idfb961746c35d4efceda1e0da4fc453b92101f3f
2020-05-08 19:51:28 +00:00
Greg Kaiser
a71fe150fa Merge changes from topic "revert-1302576-NGVCIVIIJO"
* changes:
  Revert "Detect invalid arch specific properties in snapshot"
  Revert "Adds support for 'ignored-on-host'"
  Revert "Fix snapshot of a host/device cc_library with stubs"
2020-05-08 19:18:40 +00:00
Greg Kaiser
e509447c93 Revert "Detect invalid arch specific properties in snapshot"
Revert submission 1302576

Bug: 156054601
Reason for revert: Presumed root cause of build break.
Reverted Changes:
Ifc8116e11:Detect invalid arch specific properties in snapsho...
I7ebd33307:Adds support for 'ignored-on-host'
I167b47a13:Fix snapshot of a host/device cc_library with stub...

Change-Id: Id7eba0bdde5c579e10e9b42d94a7cfab5f34995f
2020-05-08 19:12:34 +00:00
Greg Kaiser
ad913d56ac Revert "Fix snapshot of a host/device cc_library with stubs"
Revert submission 1302576

Bug: 156054601
Reason for revert: Presumed root cause of build break.
Reverted Changes:
Ifc8116e11:Detect invalid arch specific properties in snapsho...
I7ebd33307:Adds support for 'ignored-on-host'
I167b47a13:Fix snapshot of a host/device cc_library with stub...

Change-Id: Ibccce5286605bb71c6be3b3550ba86d8b7e24fa7
2020-05-08 19:12:34 +00:00
Jiyong Park
cabc299091 Merge "Revert "Prevent statically linking to a lib providing stable C APIs"" am: 18bbde1615 am: a3c8a7d511
Change-Id: I7942cf827040f1683ffda90e1483e383ab33057a
2020-05-08 08:43:53 +00:00
Jiyong Park
18bbde1615 Merge "Revert "Prevent statically linking to a lib providing stable C APIs"" 2020-05-08 08:11:24 +00:00
Jiyong Park
5b75774004 Revert "Prevent statically linking to a lib providing stable C APIs"
This reverts commit 45b90e79c9.

Reason for revert: breakage https://android-build.googleplex.com/builds/quarterdeck?branch=aosp-master&target=run_bluetooth_host_native_tests&lkgb=6474123&lkbb=6474183&fkbb=6474137

Bug: 156046846
Change-Id: I0df395eaa4cd856ab466925031b21aa4adc3af08
Test: m on full-eng
2020-05-08 07:55:47 +00:00
Ramy Medhat
808594c668 Add support for the remote execution of Abi links.
Test: built crosshatch userdebug with RBE_ABI_LINKS=1
Change-Id: Idb4e15b59878af4a98d9a594127c21deff669e16
2020-05-07 23:55:03 -04:00
Jiyong Park
e074cc3f52 Merge changes from topic "no_staticlinking_to_stubs" am: 06938a0a16 am: 36a0125014
Change-Id: I5c20e745bec1f57ba6bc2c1f08a7c942d98bcf75
2020-05-08 02:48:34 +00:00
Jiyong Park
06938a0a16 Merge changes from topic "no_staticlinking_to_stubs"
* changes:
  Prevent statically linking to a lib providing stable C APIs
  Add GetPathString
2020-05-08 02:12:58 +00:00
Paul Duffin
7bca3ddc0e Merge changes I167b47a1,I7ebd3330,Ifc8116e1 am: af6fbcbcca am: 4b99ceccd6
Change-Id: Id1001db2b0f09868529b3f7b87ddd3e822c14d49
2020-05-07 22:21:06 +00:00
Paul Duffin
af6fbcbcca Merge changes I167b47a1,I7ebd3330,Ifc8116e1
* changes:
  Fix snapshot of a host/device cc_library with stubs
  Adds support for 'ignored-on-host'
  Detect invalid arch specific properties in snapshot
2020-05-07 21:58:14 +00:00
Ivan Lozano
7c3358dd60 Merge "Add gcov coverage support to Rust modules." am: 6c4e5c05c3 am: acdf2ac701
Change-Id: Id236afb83e583a93020803302a61dbf46904c295
2020-05-07 18:41:29 +00:00
Ivan Lozano
6c4e5c05c3 Merge "Add gcov coverage support to Rust modules." 2020-05-07 17:56:43 +00:00
Paul Duffin
2af52380be Fix snapshot of a host/device cc_library with stubs
Adds a test that fails with unknown property android.stubs.versions
and then fixes that by marking the field from which that property is
created with 'ignored-on-host' and implemented the isHostVariant on
*osTypeSpecificInfo.

Bug: 155628860
Test: m nothing
Change-Id: I167b47a1374f541aa09d7e045972d740f1d9009c
2020-05-07 18:35:11 +01:00
Paul Duffin
ee20962378 Detect invalid arch specific properties in snapshot
Previously, the snapshot code did not know whether a specific property
could be arch specific or not and assumed that they all were which
meant that it could generate snapshots containing arch specific values
for properties that are not arch specific and so would fail when
unpacked.

This change requires arch specific fields in SdkMemberProperties to be
tagged as such using `android:"arch_variant"` (just as in module input
property structures). Any property without that must have properties
that are common across all variants.

Bug: 155628860
Test: m nothing
Change-Id: Ifc8116e11d987cfe7aec2eeaa964f3bbf36b5dc2
2020-05-07 18:35:11 +01:00
Treehugger Robot
5dd4e5ecb7 Merge "Remove implicit Bionic and kernel system includes." am: 4779327cf8 am: 6bc155429e
Change-Id: I6d848f25cd90abd31afa9816afd4174d07091304
2020-05-07 13:52:09 +00:00
Treehugger Robot
4779327cf8 Merge "Remove implicit Bionic and kernel system includes." 2020-05-07 13:35:13 +00:00
Paul Duffin
eedf3f1f4a Move prebuilts mutators after defaults have been applied
A follow up change will add a mechanism for a module to register a hook
that is called after any defaults have been applied. That is intended
for use by modules like java_sdk_library that create child modules that
are dependent upon properties that could be supplied by defaults.

Creating those child modules after prebuilts mutators are run will
cause problems if those child modules clash with prebuilts modules.
Moving the prebuilts mutators after the defaults mutators will fix
that.

Tests are currently being run with the mutators in different orders so
this change also cleans that up so they are consistent with the actual
code that is being run.

Bug: 155295806
Test: m checkbuild
Merged-In: I825c6df09058fb3a45db196661959eb332aca2f3
Change-Id: I825c6df09058fb3a45db196661959eb332aca2f3
(cherry picked from commit c988c8e202)
2020-05-07 11:36:44 +01:00