Commit graph

3769 commits

Author SHA1 Message Date
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
Treehugger Robot
1a1e1f882f Merge "Propagate unique_host_soname to cc_library prebuilts." 2020-06-18 14:34:14 +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
c38936add4 Merge "Build against SDKs for native libs only for unbundled apps." 2020-06-17 17:31:24 +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
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
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
83b1296457 Merge "Fix build breakage b/158783867" 2020-06-15 16:44:54 +00:00
Roland Levillain
2752d926a9 Merge "Rename native code coverage paths product variables in Soong." 2020-06-15 10:12:10 +00: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
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
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
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
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
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
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
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
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
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
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
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