Commit Graph

4651 Commits

Author SHA1 Message Date
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
Paul Duffin 509bb9b7ff Merge changes I13df3115,I825c6df0 am: 955ade6475 am: 4bfed659d9
Change-Id: I62fc47243b57a0423815f74cd94340f66b897e1d
2020-05-07 09:51:20 +00:00
Paul Duffin 955ade6475 Merge changes I13df3115,I825c6df0
* changes:
  Add hook to be called after defaults have been applied
  Move prebuilts mutators after defaults have been applied
2020-05-07 09:18:26 +00:00
Jiyong Park 45b90e79c9 Prevent statically linking to a lib providing stable C APIs
A lib providing stable C APIs should be available only to the APEX
containing the library. It shouldn't be available to other APEXes,
especially via static linking.

This change also fixes a bug that llndkImplDep (the dependency from
llndk stub to its implementation library) was recognized as being in the
same APEX.

Bug: 151051671
Test: m
Change-Id: Ifda7f4a367f68afcde93c86cda45a28cacd91f99
2020-05-07 16:20:00 +09:00
easoncylee 1e3fdcd182 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
2020-05-07 12:35:14 +08:00
Martin Stjernholm 41ab2519b4 Remove implicit Bionic and kernel system includes.
They are now explicit in the Bionic blueprints, and brought in through
dependencies on libc (which in turn is usually implicit through the
default system_shared_libs value). Modules that may break are cc_object
which don't depend on system_shared_libs, and those that explicitly set
system_shared_libs:[] but still assumes libc headers. In either case
the fix should be to add header_libs:["libc_headers"].

Test: Build and boot
Test: m checkbuild (on aosp_taimen and aosp_x86_64)
Bug: 153590472
Change-Id: I3217d8f36e49a987f5377866c8647f9dcccc37ce
2020-05-06 19:45:03 +01:00
Kris Alder 6930ece921 add researcher_submitted field to cc_fuzz am: e051d0d324 am: e2967d8f4e
Change-Id: I7d92396453a94d259004083c5f6ecdba58fce293
2020-05-06 17:01:11 +00:00
Artur Satayev 388d39ba9a Introduce min_sdk_version to deps info.
Bug: 149622332
Test: m
Change-Id: Ie6568cb8a82d5cca9a3dc91b5a068abf4b0632dc
Merged-In: Ie6568cb8a82d5cca9a3dc91b5a068abf4b0632dc
Exempt-From-Owner-Approval: cp from aosp
(cherry picked from commit 480e25b74f)
2020-05-06 15:01:14 +00:00
Paul Duffin c988c8e202 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
Change-Id: I825c6df09058fb3a45db196661959eb332aca2f3
2020-05-06 08:55:16 +01:00
Paul Duffin 2df45faa7b Improve error messages when output file is invalid
Bug: 155720025
Test: m nothing
Merged-In: I01eebaad58c5a6950e4419d0a8bf80bd02fed543
Change-Id: I01eebaad58c5a6950e4419d0a8bf80bd02fed543
(cherry picked from commit 712993cf0c)
2020-05-06 08:21:22 +01:00
Martin Stjernholm bb0e839da9 Do not propagate dynamic dependencies for stub libs.
Test: m nothing
Test: Build an SDK snapshot including libc, check that the generated
  cc_prebuilt_library_shared for it is a stub that doesn't depend on
  ld-android.
Bug: 152255951
Bug: 154310674
Merged-In: Ie5ec02aebdf00b75756a6eda40db821488d30065
Change-Id: Ie5ec02aebdf00b75756a6eda40db821488d30065
(cherry picked from commit cc330d665a)
2020-05-06 08:19:07 +01:00
Martin Stjernholm 13b8b6ac70 Do not propagate the stub symbol file to prebuilts.
This partially reverts https://r.android.com/1278193. The propagated
symbol files contain all versions, even though only one is applicable
in a given SDK snapshot.

It's uncertain what repercussions this might have, but one is that if
we were to update a snapshot for a fixed version then it might change
because the symbol file contains new versions that aren't applicable.
Since the symbol file isn't actually needed at this point it's better
to wait with this step until the use cases for it are more clear.

Test: m nothing
Test: Create an SDK snapshot with Bionic libs, drop it into a
  master-art tree without bionic/ in it, build ART APEXes, and check
  that the Soong phase completes (specifically that the stubs are
  detected even without symbol files).
Bug: 152481980
Merged-In: Ic79f89bc6d11d0b6552fa20791f5680ff9a40c0d
Change-Id: Ic79f89bc6d11d0b6552fa20791f5680ff9a40c0d
(cherry picked from commit bdd0dffc1b)
2020-05-06 08:18:49 +01:00
Martin Stjernholm cd497b0506 Propagate stubs to the SDK for libraries that have them.
Necessary to make the APEX build logic treat the libraries as API
boundaries rather than dependencies to bundle.

The .so files in the snapshots are the compiled stub libraries in this
case. They are strictly speaking redundant since they can be generated
from the .map.txt files in the snapshots, but doing that would require
extending the cc_prebuilt_library(_shared) module types with a full
compiler pass etc, and that would break a lot of assumptions in the cc
package.

Test: m nothing
Test: Create an SDK snapshot with Bionic libs, drop it into a
  master-art tree without bionic/ in it, build ART APEXes, and check
  that the Soong phase completes (specifically no errors about various
  APEX libs requiring libc that is not available to them).
Bug: 152481980
Merged-In: I31b928e6261198b6dd6f6b17196e714f07b64172
Change-Id: I31b928e6261198b6dd6f6b17196e714f07b64172
(cherry picked from commit c5dd4f7c1f)
2020-05-06 08:18:35 +01:00
Martin Stjernholm bddfbc463d Propagate empty vs unspecified system_shared_libs correctly.
Necessary to get correct prebuilts for many Bionic libs.

Cleaned up numerious "system_shared_libs: []" from test fixtures, since
they otherwise would need correction in the expected results, and it is
better to have a single test focused on testing system_shared_libs
propagation.

Test: m nothing
Bug: 152255951
Merged-In: If2e8a5296223e6281d833312660e8e9e4cd184c0
Change-Id: If2e8a5296223e6281d833312660e8e9e4cd184c0
(cherry picked from commit 10566a035f)
2020-05-06 08:17:57 +01:00
Martin Stjernholm fcb99e07fc Add SDK member support for cc_object.
Test: m nothing
Test: Add
    sdk {
        name: "runtime-module-sdk",
        native_shared_libs: [
            "libc",
            "libdl",
            "libm",
            "ld-android",
        ],
        native_objects: [
            "crtbegin_dynamic",
            "crtbegin_static",
            "crtend_android",
        ],
    }
  to bionic/apex/Android.bp. Then:
    build/soong/scripts/build-aml-prebuilts.sh runtime-module-sdk
  Take the generated runtime-module-sdk-current.zip and unzip into a
  master-art tree without bionic/, edit the generated Android.bp to
  extend cc_prebuilt_* modules with:
    nocrt: true,
    stl: "none",
    system_shared_libs: [],
    apex_available: ["//apex_available:anyapex"],
    recovery_available: true,
    vendor_available: true,
    ramdisk_available: true,
  Then "m com.android.art.debug". This passes Soong but fails in the
  build step because more members are required.
Bug: 148934017
Merged-In: I2ab8f6aadb1440b325697cae4a8ed761c62d15d2
Change-Id: I2ab8f6aadb1440b325697cae4a8ed761c62d15d2
(cherry picked from commit cd07bce437)
2020-05-06 08:17:10 +01:00
Martin Stjernholm 39978527ce Add cc_prebuilt_object.
To be used for prebuilt object support in SDK snapshots.

Test: m nothing
Bug: 148934017
Merged-In: I53d58100cc1d410c5cf5b7906de7ed6f7add2035
Change-Id: I53d58100cc1d410c5cf5b7906de7ed6f7add2035
(cherry picked from commit 0b92ac8e43)
2020-05-06 08:16:53 +01:00
Kris Alder e051d0d324 add researcher_submitted field to cc_fuzz
Bug: 155105113
Test: make haiku
Change-Id: If6a3f2c7af9ebb41327e3695c850f962adb4122c
2020-05-06 03:25:54 +00:00
Yabin Cui d62f376a36 Merge "Switch to clang-r383902 (11.0.1)." into rvc-dev 2020-05-05 20:36:16 +00:00
Treehugger Robot 6b96218953 Merge "Improve error messages when output file is invalid" am: 39298b3598 am: e075b52ecc
Change-Id: I7ea9c4183460c45bcb45ed2eb9ff061f56ca7fb3
2020-05-05 17:43:49 +00:00
Treehugger Robot 39298b3598 Merge "Improve error messages when output file is invalid" 2020-05-05 17:11:39 +00:00
Alexander Smundak ec3022d182 Merge "Canonicalize saved paths, Kythe cannot handle symlinks" am: bd1f870df3 am: 312653b417
Change-Id: I263d0c1bd41bdc6547aa3b4b9f8b8f2ed4a040ba
2020-05-05 16:19:31 +00:00
Alexander Smundak bd1f870df3 Merge "Canonicalize saved paths, Kythe cannot handle symlinks" 2020-05-05 15:54:46 +00:00
Ivan Lozano a0cd8f9acb Add gcov coverage support to Rust modules.
This adds gcov coverage support for Rust device library and binary
modules (including test modules). Support is provided to pass Rust
static library gcno files to CC modules and visa versa.

Additional changes:
 * Begin mutator added for Rust modules.
 * SuffixInList added to android package.
 * CoverageEnabled added to Coverage interface.
 * CoverageFiles added to LinkableLibrary interface.
 * Fix in coverage mutator for non-CC modules which marked the wrong
   variant as the coverage variant.
 * Added coverage libraries to the cc.GatherRequiredDepsForTest.

Bug: 146448203
Test: NATIVE_COVERAGE=true COVERAGE_PATHS='*' m -j <rust_module>
Change-Id: If20728bdde42a1dd544a35a40f0d981b80a5835f
2020-05-05 10:30:15 -04:00
satayev 49ad72d4ef Merge changes Ie6568cb8,Ibd521c96 am: 292e7c0721 am: a07f9df5d7
Change-Id: I4dcd1f47b080a71a97db0b10c1ebfc45b8d59bdb
2020-05-05 13:14:14 +00:00
Paul Duffin 712993cf0c Improve error messages when output file is invalid
Bug: 155720025
Test: m nothing
Change-Id: I01eebaad58c5a6950e4419d0a8bf80bd02fed543
2020-05-05 14:12:22 +01:00
Artur Satayev 480e25b74f Introduce min_sdk_version to deps info.
Bug: 149622332
Test: m
Change-Id: Ie6568cb8a82d5cca9a3dc91b5a068abf4b0632dc
2020-05-04 19:44:28 +01:00
Dan Willemsen 288145a65a Don't tell make about modules in other namespaces am: 7b6af23db6
Change-Id: I07899dd7d142aa490e026046f6ebae0001946da2
2020-05-04 07:17:29 +00:00
Dan Willemsen b5b2aba43b Don't tell make about modules in other namespaces
This was causing build breaks when different devices moved to Android.bp
at different times.

Bug: 150878976
Test: build *_hwasan targets
Change-Id: I68912bb6a5696809c318d1ec816a1bcfbe2df245
Merged-In: I68912bb6a5696809c318d1ec816a1bcfbe2df245
(cherry picked from commit 7b6af23db6)
2020-05-04 00:05:47 -07:00
Dan Willemsen 7b6af23db6 Don't tell make about modules in other namespaces
This was causing build breaks when different devices moved to Android.bp
at different times.

Bug: 150878976
Test: build *_hwasan targets
Change-Id: I68912bb6a5696809c318d1ec816a1bcfbe2df245
2020-05-03 21:30:43 -07:00
Sasha Smundak a4ef83b252 Canonicalize saved paths, Kythe cannot handle symlinks
Bug: 141385766
Test: build kzip
Change-Id: I87c4af719135ee89298d160bb8d6395ad7d6046c
2020-05-03 18:30:13 -07:00
Colin Cross 2a5fb91370 Merge changes from topic "sdk_version_variant" into rvc-dev
* changes:
  Add sdk mutator for native modules
  Require apps built against the SDK to use JNI built against the NDK
2020-05-02 01:41:18 +00:00
Yabin Cui 2547d40a3b Switch to clang-r383902 (11.0.1).
Also suppress some warnings/flags globally to pass compilation.

Bug: 149839606
Test: build aosp_arm64-userdebug.
Change-Id: I0ed740e51b6b39c58842a58eabcf3cdf404e73fa
Merged-In: I0ed740e51b6b39c58842a58eabcf3cdf404e73fa
(cherry picked from commit 8ec05ff5f6)
2020-05-01 11:36:21 -07:00
Yabin Cui ab30444528 Merge "Switch to clang-r383902 (11.0.1)." am: 74d25e39f0 am: 3f7e2270e6
Change-Id: I726c65611e1b62cc566eb0310b4eed963b470410
2020-05-01 05:57:17 +00:00
Yabin Cui 74d25e39f0 Merge "Switch to clang-r383902 (11.0.1)." 2020-05-01 05:28:39 +00:00
Yabin Cui 1014de7951 Disable cert-dcl51-cpp and -cert-dcl37-c.
Disable them for the next clang compiler update.

Bug: 153464409
Test: WITH_TIDY=1 make

Change-Id: I27c315637e02c7c6c708a24a04220f10136b681a
Merged-In: I27c315637e02c7c6c708a24a04220f10136b681a
(cherry picked from commit 70ba0e23a4)
2020-04-30 15:58:59 -07:00
Chih-Hung Hsieh 465da2f849 Disable bugprone-reserved-identifier
* Disable it for the next clang compiler update
  until all source files with this warning are fixed.

Bug: 153464409
Test: WITH_TIDY=1 make
Change-Id: I126d2f5170f3883192348577e523ef99f5c5a70e
Merged-In: I126d2f5170f3883192348577e523ef99f5c5a70e
(cherry picked from commit 3d3df826c1)
2020-04-30 15:58:59 -07:00
Treehugger Robot 87fb37ba21 Merge "[cc_fuzz] Collect shared deps by name, not by module." am: c57d39cade am: ff08454c17
Change-Id: I322fff5bb111c4423a939e4dc3d03b32856a1c5b
2020-04-30 22:54:50 +00:00
Treehugger Robot c57d39cade Merge "[cc_fuzz] Collect shared deps by name, not by module." 2020-04-30 22:26:22 +00:00
TreeHugger Robot 70a42b405f Merge "Allow remote execution of link actions." into rvc-dev 2020-04-28 21:46:39 +00:00
Treehugger Robot fb1add1fd6 Merge "Refactor RBE support for Javac/R8/D8 to use the remoteexec package." am: 0b3b3db525 am: ebbe86fdb7
Change-Id: I1e1e35955cefcd26cfe58e9cd9f02c9465865442
2020-04-28 18:33:59 +00:00
Ramy Medhat 1dcc27e47c Refactor RBE support for Javac/R8/D8 to use the remoteexec package.
Test: build with and without RBE_JAVAC/RBE_R8/RBE_D8 set.
Change-Id: I1607f8cfb4d2c3cbb3672152bbeb561d9968bc60
2020-04-28 11:37:20 -04:00
Jiyong Park 23ba7cc000 Merge "Add test_for property" into rvc-dev 2020-04-28 14:27:07 +00:00
Treehugger Robot f653a91daf Merge "Do not propagate dynamic dependencies for stub libs." am: a6c19f792d am: 04fd1b2605
Change-Id: I59d7c20357cfc8f5da42d3a7b94305c5ff27a9b6
2020-04-28 12:54:11 +00:00
Jiyong Park f0d01b7c98 Add test_for property
This change adds 'test_for' property to cc_test_* types. The property is
used to mark a module as a test for one or more APEXes, in which case
the module has accecss to the private part of the listed APEXes. For
example, the module is linked with the actrual shared library in the
APEX instead of the stub of the shared library.

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

Bug: 129539670
Bug: 153046163
Test: m
Merged-In: I45ed0d7a15540b0d69b2a3b8d9c4cb202adff6f2
(cherry picked from commit 62304bbeec)
Change-Id: I45ed0d7a15540b0d69b2a3b8d9c4cb202adff6f2
2020-04-28 21:35:40 +09:00
Treehugger Robot a6c19f792d Merge "Do not propagate dynamic dependencies for stub libs." 2020-04-28 12:10:26 +00:00
Jiyong Park 5088a2cbd5 Set apex_available property
The marked library(ies) were available to the APEXes via the
hand-written whitelist in build/soong/apex/apex.go. Trying to remove the
whitelist by adding apex_available property to the Android.bp of the
libraries.

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

Bug: 150999716
Test: m
Merged-In: I11a4e877ee27f7c55e2f00371c6fa58daedb1a9f
(cherry picked from commit 601d31c234)
Change-Id: I11a4e877ee27f7c55e2f00371c6fa58daedb1a9f
2020-04-28 21:08:58 +09:00
Kousik Kumar 7879890e12 Add implicit outputs to link actions am: 3fb6126309 am: 72834cbcf9
Change-Id: I9d4fdfd0aa9beafc64245aff6dd0f4c479fe2054
2020-04-28 08:44:33 +00:00
Kousik Kumar 3fb6126309 Add implicit outputs to link actions
Change-Id: I9b6ae97f5bbfe8f9c4b9c089544a768982794f32
Bug: b/154733231
Test: Built the failing action with / without this change
2020-04-27 21:53:43 -07:00
Robert Shih 5d878b8369 Merge "Removing filter to allow widevine fuzzers addition" am: 4a748c99f0 am: 870e1e02c6
Change-Id: I747361b6c842dc63ee579727bb59698619fd6dff
2020-04-28 02:30:24 +00:00
Robert Shih 4a748c99f0 Merge "Removing filter to allow widevine fuzzers addition" 2020-04-28 01:49:48 +00:00
Mitch Phillips c0b442f8a7 [cc_fuzz] Collect shared deps by name, not by module.
cc_fuzz relies on an invariant that's not exactly true. We assume that
for each fuzz target, we'll only have a dependency on a single sanitized
variant of a shared library. In a few instances, this is proven not to
be true, as we end up with a transitive dependency on a shared library
with sanitizer coverage instrumentation, and one without sancov.

This results in breaking the packaging for some fuzz targets. This then
goes on to break `make haiku` in some scenarios.

While this isn't a completely technically correct solution (as we
basically resolve one of the sanitized variants pseduorandomly), it does
resolve the issue for now. Realistically, we should select *both* of
them, and set the DT_RUNPATHS on the shared libraries to point to the
dependencies that have the sanitization that they're expecting. In
practice - this shouldn't break sancov (we might just silently drop some
coverage) or hwasan (we might just silently drop some hwasanification).

I believe that the walk order of VisitDirectDeps is deterministic, and
as such this shouldn't affect the reproducability of fuzz target builds
(and thus won't blow up the Soong rebuilds). ccross@ or dwillemsen@ can
speak better to this than I can though.

Bug: 148306195
Bug: 151102177
Bug: 155123587
Test: lunch flame_hwasan-userdebug && make haiku
Change-Id: I8d4001d93da33e4e5d21f740beb88a20fcc26e2a
2020-04-27 17:06:58 -07:00
Colin Cross 01fd7ccbc7 Add sdk mutator for native modules
Compiling native modules against the NDK disables platform features
like ASAN.  For anything shipped on the system image there is no
reason to compile against the NDK.  Add a new mutator to Soong that
creates a platform and an SDK variant for modules that set
sdk_version, and ignore sdk_version for the platform variant.  The
SDK variant will be used for embedding in APKs that may be installed
on older platforms.  Apexes use their own variants that enforce
backwards compatibility.

Test: sdk_test.go
Test: TestJNIPackaging
Bug: 149591340
Change-Id: I7d72934aaee2e1326cc0ba5f29f51f14feec4521
Merged-In: I7d72934aaee2e1326cc0ba5f29f51f14feec4521
(cherry picked from commit 82e192c3ae)
2020-04-27 14:45:05 -07:00
Bill Peckham 83b6e371e6 Merge "Propagate Soong header_libs to module-info.json" am: 6c2962e458 am: 2a8937968f
Change-Id: Ieaaf421db6119753252ea8f89bc530120522ecbd
2020-04-27 21:32:58 +00:00
Bill Peckham 6c2962e458 Merge "Propagate Soong header_libs to module-info.json" 2020-04-27 20:59:48 +00:00
Hamzeh Zawawy 0540ae78b9 Removing filter to allow widevine fuzzers addition
Bug: 150900870
Test: make haiku ran locally include widevine fuzzer after change
Change-Id: I0942a3d61674a90e99792141567bd6ce35dfee2e
2020-04-27 19:58:04 +00:00
Treehugger Robot 449d81cdf6 Merge "Add support for remotely executing header-abi-dumper actions." am: 867dfd52f5 am: 7cb58ab378
Change-Id: I118593627936a3f0192c471457c5f77b75c56d03
2020-04-27 19:47:00 +00:00
Treehugger Robot 867dfd52f5 Merge "Add support for remotely executing header-abi-dumper actions." 2020-04-27 19:16:41 +00:00
Martin Stjernholm cc330d665a Do not propagate dynamic dependencies for stub libs.
Test: m nothing
Test: Build an SDK snapshot including libc, check that the generated
  cc_prebuilt_library_shared for it is a stub that doesn't depend on
  ld-android.
Bug: 152255951
Bug: 154310674
Change-Id: Ie5ec02aebdf00b75756a6eda40db821488d30065
2020-04-27 18:43:40 +00:00
Bill Peckham a46de70775 Propagate Soong header_libs to module-info.json
Adding the Soong header_libs dependencies to
module-info.json allows tools to more accurately detect
all module-level dependencies. This change adds
LOCAL_HEADER_LIBRARIES, populated from header_libs, to
the Soong's Android.mk prebulit module definition so
that it will propagate through the prebuilt into
base_rules.mk and eventually to module-info.json.

Bug: 151755703
Test: Find header_libs deps in module-info.json
Change-Id: Ic7134d33fa71822aae548ca097851dc0c1371bad
2020-04-27 18:28:26 +00:00
Ramy Medhat 31ec942ff7 Add support for remotely executing header-abi-dumper actions.
Test: built with and without RBE_ABI_DUMPER set.
Change-Id: Ie752c07325453076d191813eaa50da03e3a0c2d8
2020-04-27 08:13:42 -07:00
Yabin Cui 8ec05ff5f6 Switch to clang-r383902 (11.0.1).
Also suppress some warnings/flags globally to pass compilation.

Bug: 149839606
Test: build aosp_arm64-userdebug.
Change-Id: I0ed740e51b6b39c58842a58eabcf3cdf404e73fa
2020-04-27 01:17:12 -07:00
Hsin-Yi Chen d3185fa6b3 Merge "Add check_all_apis option for header ABI checker" am: 9105fa385a am: 4c01c57674
Change-Id: I19305d8977e334a8077b5d0ef4ab87a86a9f5db3
2020-04-27 04:09:15 +00:00
Hsin-Yi Chen 9105fa385a Merge "Add check_all_apis option for header ABI checker" 2020-04-27 03:34:08 +00:00
Jiyong Park a7ca0120ad Merge "Add test_for property" am: 70b5c21270 am: b739f8d870
Change-Id: If02ebcfee4195fbac05dd0b902958236c5a6346d
2020-04-27 00:50:02 +00:00
Jiyong Park 70b5c21270 Merge "Add test_for property" 2020-04-27 00:13:50 +00:00
Treehugger Robot dcbc580195 Merge "Set apex_available property" am: 8c79615594 am: 75d9dae1e8
Change-Id: I79473f28becd80fd9bcf38db41762b2710c02cfb
2020-04-25 08:08:08 +00:00
Treehugger Robot 8c79615594 Merge "Set apex_available property" 2020-04-25 07:38:33 +00:00
Jiyong Park 62304bbeec Add test_for property
This change adds 'test_for' property to cc_test_* types. The property is
used to mark a module as a test for one or more APEXes, in which case
the module has accecss to the private part of the listed APEXes. For
example, the module is linked with the actrual shared library in the
APEX instead of the stub of the shared library.

Exempt-From-Owner-Approval: already +2'ed by owner

Bug: 129539670
Bug: 153046163
Test: m
Change-Id: I45ed0d7a15540b0d69b2a3b8d9c4cb202adff6f2
2020-04-25 06:25:42 +00:00