Commit graph

20358 commits

Author SHA1 Message Date
Treehugger Robot
7d95aac066 Merge "Add exclude_shared_libs, expand exclude_static_libs to cover static_libs" 2020-06-11 02:38:31 +00:00
Treehugger Robot
36aef533cc Merge "Fix type assertion error regarding dex_import" 2020-06-11 00:45:46 +00:00
Jaewoong Jung
2d4f1a2f7e Add module name to sh_test install path.
Bug: 156980228
Test: m ziptool-tests
Test: sh_binary_test.go
Change-Id: Ibb1d774709ea421e18d5350009c203f83c5b2d60
2020-06-10 17:23:46 -07: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
Jiyong Park
9e83f0b531 Fix type assertion error regarding dex_import
Ida6f7bb784efe74cc1fa0e8d370eaee803f08b0f made it possible to add
dex_import modules into apex, but that change had a bug. When creating
Android.mk for the dex_import module, the code executed an unchecked
type assertion to convert java.DexImport to java.Dependency, which
cannot be successful. This change fixes the bug by doing a checked type
assertion instead.

Bug: 157886942
Test: m (test added)
Change-Id: Id22c20d42effce539fab10b0d349bf340d467f02
2020-06-11 00:35:03 +09:00
Ulya Trafimovich
9ab4933a1c Remove host boot image from boot.zip.
Host boot image is not needed in boot.zip, which is used for the ART
APK scanner and runs on target. This commit also changes the paths in
the boot.zip by removing OS subdirectory.

Test: lunch aosp_cf_x86_phone-userdebug && m
Test: m out/soong/vsoc_x86/dex_bootjars/boot.zip \
    && zipinfo -1 out/soong/vsoc_x86/dex_bootjars/boot.zip
    system/framework/x86/boot-framework.art
    system/framework/x86/boot-framework.oat
    system/framework/x86/boot-ext.art
    system/framework/x86/boot-ext.oat
    system/framework/x86/boot-core-icu4j.art
    system/framework/x86/boot-core-icu4j.oat
    system/framework/x86/boot-telephony-common.art
    system/framework/x86/boot-telephony-common.oat
    system/framework/x86/boot-voip-common.art
    system/framework/x86/boot-voip-common.oat
    system/framework/x86/boot-ims-common.art
    system/framework/x86/boot-ims-common.oat
    system/framework/x86/boot-framework-atb-backward-compatibility.art
    system/framework/x86/boot-framework-atb-backward-compatibility.oat
    system/framework/x86/boot-framework.vdex
    system/framework/x86/boot-ext.vdex
    system/framework/x86/boot-core-icu4j.vdex
    system/framework/x86/boot-telephony-common.vdex
    system/framework/x86/boot-voip-common.vdex
    system/framework/x86/boot-ims-common.vdex
    system/framework/x86/boot-framework-atb-backward-compatibility.vdex

Change-Id: Idf0541908059c454348181d90b0b3e5d6d350057
2020-06-10 15:54:23 +01:00
Ulya Trafimovich
9f3052cd78 Fix on-device paths to used libraries in dexpreopt.
Test: lunch aosp_cf_x86_phone-userdebug && m
Test: Cherry-pick in internal master and check that on-device path to
    com.google.android.dialer.support.jar now is on /product partition
    (as it should be) and not on /system:
    $ oatdump \
        --instruction-set=x86 \
        --oat-file=out/target/product/vsoc_x86/product/priv-app/GoogleDialer/oat/x86/GoogleDialer.odex \
      | grep '^classpath' \
      | grep -o '[^[]*com.google.android.dialer.support.jar'
    /product/framework/com.google.android.dialer.support.jar

Bug: 132357300
Change-Id: Idf279ac713b9b29ff3a29f1b072bc1d57f48db26
2020-06-10 14:53:36 +01: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
Jiyong Park
d4873a6b68 Merge "dex_import that isn't available for platform isn't installed" 2020-06-09 23:02:10 +00:00
Colin Cross
3cda0d8df9 Add DistForGoal to MakeVarsContext
Add methods to MakeVarsContext to allow Singletons to dist
artifacts without manually adding $(dist-for-goals) in Make.

Test: m checkbuild
Change-Id: Ia5ddb31afe29329f2df0ae1297ed963c8c28e590
2020-06-09 14:38:51 -07: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
Colin Cross
238c1f3903 Remove most paths from java.TestConfig
Now that tests don't need to specify every path passed to
PathForSource or PathForModuleSrc, remove most of them from
java.TestConfig.  Leave a few that are globbed by lots of tests,
and move a few that are globbed by a single test into the tests.

Test: all soong tests
Change-Id: Ica91d7203a6a7dbca0fd4fed84c78f149b8699e1
2020-06-09 14:38:39 -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
Colin Cross
5e6a797982 Allow tests to bypass PathForSource existence checks
Forcing every test to specify every file it wants to pass to
PathForSource or PathForModuleSrc is painful to maintain and
doesn't add any value.  Allow tests to reference paths through
PathForSource and PathForModuleSrc without specifying them in
the mock FS.

Test: all soong tests
Change-Id: Ia8a8fd965a338d0645b3721314bf91f50146ad21
2020-06-09 14:23:11 -07:00
Chris Parsons
26cdf135ff When bpfix fails in androidmk, output the tree anyway
This can help with debugging cases where the resulting blueprint file is
invalid.

Test: Manual run of androidmk
Change-Id: I39605afa851aa6cdd8b49cc56386a8fc7347115c
2020-06-09 16:01:51 -04:00
Victor Khimenko
bf488e10e8 Merge "Make it possible to specify separate rules for native_bridge case" 2020-06-09 17:41:28 +00:00
Ivan Lozano
4231e344fa Merge "Specify SONAME when building Rust shared libs." 2020-06-09 15:49:34 +00: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
Pete Gillin
d7db79cc8b Merge "Split the core/platform API into stable and legacy versions." 2020-06-09 13:20:31 +00: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
Ivan Lozano
bec05ea26d Specify SONAME when building Rust shared libs.
Without specifying -soname, cc binaries are unable to locate Rust
provided shared libraries. This adds the -soname linker flag for shared
libraries.

Bug: 158490355
Test: readelf -d <cc_binary> shows the expected SONAME
Change-Id: I66852a7ce24d5ea5e426f11bc1834fb56a150628
2020-06-09 08:40:24 -04:00
Ramy Medhat
4e372f7841 Merge "Turn on metalava sandbox warning in all droiddoc metalava invocations." 2020-06-09 12:17:38 +00:00
Victor Khimenko
c26fcf4947 Make it possible to specify separate rules for native_bridge case
This change make it possible to specify separate rules for native-bridge
case and non-native-bridge case.

Bug: http://b/153609531

Test: build 4arch product

Change-Id: I60145bbb9c94318f14af3cabd9f5960fc9ee62de
2020-06-09 13:31:37 +02:00
Treehugger Robot
8b1531e7df Merge "Revert^2: "Remove implict jni.h include path"" 2020-06-09 09:55:13 +00: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
Frank Feng
d90c6c42e4 Merge "Implement test config auto-gen for sh_test." 2020-06-08 21:05:31 +00:00
Jiyong Park
01bca755ae dex_import that isn't available for platform isn't installed
This change fixes a bug that dex_import module is always installed to
the platform even when the module is not available to the platform.

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

Bug: 158284983
Test: OUT_DIR=/tmp/ndk build/soong/scripts/build-ndk-prebuilts.sh
Merged-In: I85570506e700be59ee63e4f1d7902a40e36df39c
(cherry picked from commit afd3d11a79)
Change-Id: I85570506e700be59ee63e4f1d7902a40e36df39c
2020-06-08 21:53:52 +09:00
Pete Gillin
1f41dbff64 Split the core/platform API into stable and legacy versions.
For now, everything outside libcore still uses the legacy version.

Test: treehugger
Bug: 157640067
Change-Id: If5234e9ee533ff537926801a0af045d36b1caf01
2020-06-08 10:53:51 +01:00
Treehugger Robot
8a624337b3 Merge "Use sdkSpec to compare sdk_versions of APK/JNI" 2020-06-08 07:27:26 +00:00
Jooyung Han
652d5b31ef Use sdkSpec to compare sdk_versions of APK/JNI
"current" is converted to int differently if we use
sdkSpec.effectiveVersion for APK and android.ApiStrToNum for JNI.
For example, in REL branch, "current" is equiv to PlatformSdkVersion
for APK, but 10000(FutureApiVersion) for JNI.

Use sdkSpec.effectiveVersion to compare APK.min_sdk_version and
JNI.sdk_version.

Exempt-From-Owner-Approval: cherrypick from internal

Bug: 145796956
Test: m
Merged-In: I2c4dbb79ae8712004dc3a9e647aa53cd5de7b508
Change-Id: I2c4dbb79ae8712004dc3a9e647aa53cd5de7b508
(cherry picked from commit 9d2c0f7af2)
2020-06-08 07:19:56 +00:00
Inseob Kim
37ed5063e2 Merge changes I059e639b,I4ebe1da8,Idf4fd37a,Id90082b5
* 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-08 03:34:24 +00:00
Treehugger Robot
575c610bba Merge "Add eakammer and patricearruda to OWNERS" 2020-06-05 23:30:31 +00:00
Alexander Smundak
99e4fba932 Merge "Fix android_app_set documentation" 2020-06-05 22:31:32 +00:00
Colin Cross
b83929c944 Add eakammer and patricearruda to OWNERS
Change-Id: I4209fc5149dcce6bf75aef130afc69c4600c7f3b
2020-06-05 20:31:40 +00:00
Anton Hansson
4f3dc39a47 Merge "Correct link type for module stubs" 2020-06-05 19:32:33 +00:00
Treehugger Robot
24fae40b8d Merge "Pass the TMPDIR directly to the command when dumping makefile variables." 2020-06-05 19:32:30 +00:00
Anton Hansson
14da93be48 Merge "Improve the structure of the link check method" 2020-06-05 18:36:58 +00:00
Anton Hansson
79fe805e05 Merge "Build java_sdk_library stubs with language level 8" 2020-06-05 18:04:56 +00:00
Patrice Arruda
ae2694b30d Pass the TMPDIR directly to the command when dumping makefile variables.
External applications such as metrics uploader depends on the TMPDIR.
DumpMakeVars is changing the TMPDIR environment variable value. Once
the work is done, TMPDIR directory is deleted. Additional flow of
the tool or external applications can panic since TMPDIR directory
does not exist. Since this is an isolated case, pass the TMPDIR
directory to the command of dumping the makefile variables.

Bug: b/140638454
Test: * Ran lunch command with ANDROID_ENABLE_METRICS_UPLOAD set
        and metrics_uploader did not crash.
      * m nothing
Change-Id: Ib78a3f8cfb5da48f65bd9bce1511e9abdf3d9cca
2020-06-05 17:28:41 +00:00
Sasha Smundak
613cbb1733 Fix android_app_set documentation
Also, fix linter warnings.

Bug: 152319766
Test: treehugger & manual
Change-Id: Id9b296d9301902deb463b299413491bc66d58944
2020-06-05 10:27:23 -07:00
Anton Hansson
5ac7fad759 Merge "Don't require merge_annotations_dir for annotations_enabled" 2020-06-05 17:21:56 +00:00
Anton Hansson
ad14580f99 Merge "Create a framework.aidl for non-updatable platform" 2020-06-05 16:38:15 +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
Anton Hansson
2d0c1946fa Correct link type for module stubs
Module stubs compile against module_current, so any module depending on
them had to compile against module_current (or broader) too. Treat them
as the API surface the stubs are for.

Bug: 157010342
Test: m
Change-Id: I49b9082dc1b5afe6c22e94126e574dd8061f0f39
Merged-In: I49b9082dc1b5afe6c22e94126e574dd8061f0f39
(cherry picked from commit 0bd88d0b4e)
2020-06-05 15:16:17 +01:00