Commit graph

20327 commits

Author SHA1 Message Date
Chih-Hung Hsieh
e728a89807 Generate multilib for rust_test
* Cannot generate multilib for host tests yet.

Bug: 158677299
Test: atest -c -m --include-subdirs external/rust/crates
Change-Id: I7071c1ea30865a8cf268dfe270f2a586eb7710d9
2020-06-17 13:08:00 -07:00
Patrice Arruda
0f688004b1 Add a new module named prebuilt_dsp.
prebuilt_dsp soong module allows to install DSP related file to
<partition>/etc/dsp directory. If soc_specific property is enabled
to true, it is then installed to <partition>/dsp directory for
vendor image.

Bug: b/157259542
Test: Wrote unit test cases.
Change-Id: I15431a14bf399338a00835718dfe29544be02e34
2020-06-17 15:38:22 +00:00
Ivan Lozano
d825990336 Merge "[Rust] Remove unused variables and deduplicate." 2020-06-17 12:28:06 +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
Yo Chiang
f298a3f325 Merge "Don't emit superfluous LOCAL_OVERRIDES_MODULES" 2020-06-17 04:03:03 +00:00
Colin Cross
a2e64e7b84 Merge "Use inclusive language in Android.bp files" 2020-06-17 01:04:26 +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
Colin Cross
cbd62d07d4 Use inclusive language in Android.bp files
Test: m checkbuild
Change-Id: Id9efbd99be54b191193eae1c5672230ca54cf1d2
Merged-In: Id9efbd99be54b191193eae1c5672230ca54cf1d2
2020-06-16 23:36:51 +00:00
Treehugger Robot
001ad5a6fc Merge "Installed APKs should not have prebuilt_ prefix" 2020-06-16 22:34:29 +00:00
Treehugger Robot
e6c1d80072 Merge "Prefer armv8.2-a to armv8.2a for GNU as compatibility" 2020-06-16 21:45:06 +00:00
Christopher Parsons
549a0d866a Merge "When bpfix fails in androidmk, output the tree anyway" 2020-06-16 20:16:03 +00:00
Alex Humesky
c7f8b74365 Merge "Do not override "-g:source,lines" for host java binaries when PRODUCT_MINIMIZE_JAVA_DEBUG_INFO is set." 2020-06-16 20:08:58 +00:00
Sasha Smundak
57f0ee1fa9 Installed APKs should not have prebuilt_ prefix
Bug: 159031374
Test: treehugger & manual
Change-Id: I48f2595781efc1303c777619e082ce7765b73038
2020-06-16 09:41:02 -07:00
Ivan Lozano
8a23fa4819 [Rust] Remove unused variables and deduplicate.
Bug: 158731826
Test: cd external/rust/crates; mma
Change-Id: I8c9e5cfeaf941b9676b92451b227c15db9a41bbc
2020-06-16 10:28:25 -04: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
Paul Duffin
e40383355b Merge "Let APEX build against preferred java_sdk_library_import" 2020-06-16 09:37:53 +00:00
Yo Chiang
12d9f7a103 Don't emit superfluous LOCAL_OVERRIDES_MODULES
Don't emit an empty LOCAL_OVERRIDES_MODULES line if APEX is not
overriding any module.

Test: TH noop
Change-Id: I7abbaccd54bf2ffa25a6c798260c81284ea5ecb2
2020-06-16 17:33:57 +08:00
Alex Humesky
2070e32eb9 Do not override "-g:source,lines" for host java binaries when PRODUCT_MINIMIZE_JAVA_DEBUG_INFO is set.
Test: Ran unittests
Change-Id: Ic061b4bf107bcd931813d69f6d72b521d79fbc35
2020-06-15 21:33:49 -04:00
Treehugger Robot
c9d83d25bb Merge "Run the metrics uploader in the background." 2020-06-15 19:28:10 +00:00
Roland Levillain
d38ab21c6e Merge "Introduce product variables to select Java code coverage paths in Soong." 2020-06-15 18:41:03 +00:00
Treehugger Robot
c41c1a9d13 Merge "Remove libnativehelper modules from whitelist" 2020-06-15 17:00:35 +00:00
Chris Gross
a7a36e22fb Merge "Use EMMA_INSTRUMENT_FRAMEWORK for apex framework libs." 2020-06-15 16:50:59 +00:00
Sophie Zheng
83b1296457 Merge "Fix build breakage b/158783867" 2020-06-15 16:44:54 +00:00
Paul Duffin
eedc5d55ce Let APEX build against preferred java_sdk_library_import
If a java_sdk_library_import has a corresponding java_sdk_library then
make the java_sdk_library_import export both the xml and impl modules
created by the java_sdk_library.

Makes java_sdk_library_import consistent with java_sdk_library by
providing libraries within the same APEX access to the implementation
library instead of the stubs.

Bug: 158304459
Test: m nothing
      Test what happens when building com.android.tethering with and without
      a preferred "framework-tethering" java_sdk_library_import. Make sure that
      it does not change the generated APEX.
Change-Id: I2f4edea937ac377431a5696c92cbd467bded62ef
2020-06-15 16:57:09 +01:00
Treehugger Robot
623802f2f2 Merge "java_sdk_library: Add system-server scope" 2020-06-15 14:52:58 +00:00
Paul Duffin
0c5bae5e83 java_sdk_library: Add system-server scope
Bug: 155164730
Test: m nothing
Merged-In: I49a2dab5c064b05f16691a3fae65f2b4ffc53bfd
Change-Id: I49a2dab5c064b05f16691a3fae65f2b4ffc53bfd
(cherry picked from commit 5a757b1ebb)
2020-06-15 15:02:19 +01:00
Jooyung Han
552d4730c3 Merge "VNDK APEX should not provide native libs" 2020-06-15 13:52:20 +00:00
Orion Hodson
01615f36f2 Remove libnativehelper modules from whitelist
Bug: 147364041
Test: m nothing
Change-Id: I6a43511fee3feeb164e07d5620eea0564fbee302
Merged-In: I6a43511fee3feeb164e07d5620eea0564fbee302
Exempt-From-Owner-Approval: cherry pick
(cherry picked from commit 7e2354434907257f37255052d9bd08c554e263eb)
2020-06-15 13:32:14 +00:00
Roland Levillain
ada1270ef8 Introduce product variables to select Java code coverage paths in Soong.
Introduce product variables `JavaCoveragePaths` and
`JavaCoverageExcludePaths` (resp. populated from environment variables
`JAVA_COVERAGE_PATHS` and `JAVA_COVERAGE_EXCLUDE_PATHS`). Use them to
control which Java modules are candidate for instrumentation based on
their source path. By default (when `JavaCoveragePaths` is empty),
have all Java module be candidate for instrumentation, to preserve the
existing behavior.

Test: export EMMA_INSTRUMENT=true \
        && export EMMA_INSTRUMENT_FRAMEWORK=true \
        && export JAVA_COVERAGE_PATHS=art \
        && m
Bug: 158212027
Bug: 156284897
Change-Id: Ibe9c1f41ed6110867411952689c5a7ad6536f277
2020-06-15 11:57:31 +01:00
Roland Levillain
2752d926a9 Merge "Rename native code coverage paths product variables in Soong." 2020-06-15 10:12:10 +00:00
Ulyana Trafimovich
f3f654a764 Merge "Rename dexpreopt.config field to bring it in sync with Make." 2020-06-15 08:42:13 +00:00
Jooyung Han
45a96778c1 VNDK APEX should not provide native libs
While libz has stubs for other mainline modules, it doesn't provide
stubs when it is used as a VNDK lib.

In general, VNDK libs are only for vendor modules. So, we skip them even
if they have stubs.

Bug: 155456180
Test: m com.android.vndk.current
      provideNativeLibs of the APEX should be empty
Change-Id: I22401a2b1732a8560802c5be850181682e183a8e
2020-06-15 15:14:12 +09:00
Patrice Arruda
7cc2074885 Run the metrics uploader in the background.
The metrics uploader was currently running on foreground where it
would copy the metrics files in a separate directory and then forked
into the background for the upload process. As a result, running the
lunch command would take a second longer to run since each metrics
uploader run had an average of half a second.

Bug: 140638454
Test: * Wrote and updated unit test cases.
      * Set ANDROID_ENABLE_METRICS_UPLOAD to point to the latest
        metrics_uploader bash script. Executed the "lunch 1" command
	and measured the running time. Executed "m nothing" command
	and checked that the metrics were uploaded.
      * Ran "lunch 1" and "m nothing" with
        ANDROID_ENABLE_METRICS_UPLOAD=""
      * Removed oauth from metrics_uploader and ran "m nothing" and
        "lunch 1". The oauth Message appeared only to "m nothing"

Change-Id: I13c61e666c8f44613dee291a704cef6a27335188
2020-06-13 00:34:37 +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
Chih-hung Hsieh
000aef69b5 Merge "Fix module name when autogenerating test config" 2020-06-12 18:06:42 +00:00
Treehugger Robot
7a8e0cd23a Merge "apex_sets is added to apexkeys.txt" 2020-06-12 18:03:31 +00:00
Jiyong Park
8d6c51ebcc apex_sets is added to apexkeys.txt
apex_sets is a new module type that can be used to deliver pre-signed
APEXes, which previously could be done only via prebuilt_apex.

Soon gnow understands apex_sets module types and emits the signing info
of the modules to apexkeys.txt

Bug: 158729168
Test: m
Change-Id: I9507375342ec053309660d94c931a79bf4f21218
2020-06-13 01:24:51 +09:00
Ivan Lozano
f094f1c313 Merge "Match Rust gcda output to cc via -Z profile-emit." 2020-06-12 16:12:48 +00:00
Ivan Lozano
1a1d28888c Merge "Make rust_test file output more similar to cc_test." 2020-06-12 16:12:28 +00:00
Ulya Trafimovich
6e82748bd6 Rename dexpreopt.config field to bring it in sync with Make.
Different names of the same field in Make and in Soong resulted in
the field being dropped when unmarshalling the JSON from Make to Soong.
As a result, the list of optional used libraries for Make modules was
always empty.

Test: lunch aosp_cf_x86_phone-userdebug && m
Test: Cherry-pick in internal master and observe that the logcat error
    "ClassLoaderContext shared library size mismatch" for GoogleDialer
    has disappeared:
    terminal-1 $ lunch cf_x86_phone-userdebug && m && launch_cvd
    terminal-2 $ adb wait-for-device && adb root \
        && adb logcat | grep 'size mismatch'
    (nothing after the change, one error message before the change)

Bug: 132357300
Change-Id: I57820646fa7c1d8af01b2cbc8a3521da450719c0
2020-06-12 14:47:50 +01:00
Jaewoong Jung
fe25dc9f3b Merge "Revert "Add module name to sh_test install path."" 2020-06-12 04:08:28 +00:00
Treehugger Robot
6db2306c57 Merge "Use inclusive language in build/soong" 2020-06-12 03:19:02 +00:00
Jaewoong Jung
3d14ab7b2b Merge "Make override modules compatible with prebuilts." 2020-06-12 01:15:45 +00:00
Stephen Crane
b7fd37cb08 Fix module name when autogenerating test config
c5b8749853 broke specifying a name via the
`autogenTemplateWithName` function by hard-coding
`ctx.ModuleName()`. This restores that functionality.

Bug: 158784626
Test: atest rustBinderTest_integration
Change-Id: I05674e85defb363aa3cdf3e2dd895d1174e6b48f
2020-06-11 23:22:09 +00:00
Chris Gross
190fdc0b1a Use EMMA_INSTRUMENT_FRAMEWORK for apex framework libs.
Static coverage builds that trigger a dexpreopt target for a bootclasspath
jar can fail since coverage for jars in apexes are turned on by default
which requires jacocoagent to be present on the bootclasspath.

Fix this by using EMMA_INSTRUMENT_FRAMEWORK to conditionally instrument
framework libs in apexes.

Bug: 157737183
Test: EMMA_INSTRUMENT=true EMMA_INSTRUMENT_STATIC=true m -j droid
Change-Id: I2c323553e08741bc46b196bc3bb860614bc3f85b
2020-06-11 23:21:47 +00:00
Jaewoong Jung
fb25a64fdd Make override modules compatible with prebuilts.
Prebuilt's prefer flag doesn't work against override modules because
override modules are sort of virtual modules that delegate all the work
to their base modules. Therefore, even if a prebuilt module suppresses
installation of its src-counterpart override module, the actual build
actions are still performed in the base module.

This change fixes it by filtering out override modules that are being
replaced by prebuilts.

Test: prebuilt_test.go
Bug: 152155285
Change-Id: I859b35c0629b2b6258dd1ec5e020ba2c77ff9612
2020-06-11 16:01:30 -07:00
Colin Cross
440e0d0542 Use inclusive language in build/soong
Test: m checkbuild
Change-Id: Id07890b7cbc2397291a658ca00e86b43c743aafc
2020-06-11 15:33:16 -07:00