Commit Graph

16841 Commits

Author SHA1 Message Date
Treehugger Robot f68f98eeb6 Merge "Fix vendor variants generation of vndk" 2019-11-04 02:00:41 +00:00
Jiyong Park 5a8ab0f617 Merge "Remove api_srcs property from java_sdk_library"
am: bb7c5d4f69

Change-Id: Ib9ce3ef94f18a29bb1a4dd8fca0ec9a21f9cbd6e
2019-11-02 01:14:12 -07:00
Jiyong Park bb7c5d4f69 Merge "Remove api_srcs property from java_sdk_library" 2019-11-02 08:00:04 +00:00
Peter Collingbourne 103a6b2c25 Add support for $(TARGET_EXPERIMENTAL_MTE) in product configs.
am: c66baf70f6

Change-Id: Iab61c748b341a1df695ea5df66bfbc2f9534554e
2019-11-01 19:13:55 -07:00
Peter Collingbourne c66baf70f6 Add support for $(TARGET_EXPERIMENTAL_MTE) in product configs.
We are bringing up support for ARM Memory Tagging Extension in the platform,
but the required patches have not yet landed in the upstream kernel. This
change adds support for a product variable that products may set to true to
declare support for an experimental userspace interface to MTE. Setting the
variable to true causes a product configuration to be enabled which will
activate code in bionic and scudo that uses the interface.

This variable should not be set to true in shipping products because
the userspace interface has not been finalized and is subject to change.
Once the support patches have landed in the kernel, bionic and scudo will
be changed to use the official interface and the variable will be removed.

Bug: 135772972
Change-Id: I8ba5dea4de374eb6775edb6d4e3c0cf9cad8d760
2019-11-01 15:32:54 -07:00
Jooyung Han 4608595e74 Merge "delete redundant code"
am: 1f056cd69d

Change-Id: I9a445cfdef794cc913eff5e210ac26c07597975e
2019-11-01 11:43:33 -07:00
Treehugger Robot 1f056cd69d Merge "delete redundant code" 2019-11-01 18:15:33 +00:00
Ulya Trafimovich acb33e0b65 Disable dexpreopt on targets that do not include default ART config.
Dexpreopt build commands should only be generated on targets that
include build/make/target/product/runtime_libart.mk, which sets the
necessary variables such as PRODUCT_SYSTEM_DEFAULT_PROPERTIES that
contain default values passed to dex2oat. This file also sets a
variable PRODUCT_USES_DEFAULT_ART_CONFIG that is used in
build/make/core/dex_preopt.mk to decide if boot images should be
installed.

On some targets build/make/target/product/runtime_libart.mk is not
included. Prior to this patch, on such targets invalid dexpreopt
commands were generated, but not used, so they did not cause any
visible build failures. The invalid commands can be grepped as:

  lunch qemu_trusty_arm64-userdebug && m nothing \
    && fgrep -e '-Xms ' $ANDROID_BUILD_TOP/out/soong/build.ninja

In this case '-Xms ' is an ill-formed option passed to dex2oat (the
option expects one argument, but none is passed).

This patch makes the DisablePreopt variable passed from make to
soong more strict: it not only requires WITH_DEXPREOPT, but also
PRODUCT_USES_DEFAULT_ART_CONFIG. This means that dexpreopt commands
will not be generated on targets that do not include
build/make/target/product/runtime_libart.mk.

Test: lunch aosp_walleye-userdebug && m \
    && find $ANDROID_BUILD_TOP/out -name 'boot.art'
    # expect to find files in /out/target/product/walleye/system/framework/$ARCH/

Test: lunch qemu_trusty_arm64-userdebug && m \
    && fgrep -e '-Xms ' $ANDROID_BUILD_TOP/out/soong/build.ninja
    # expect empty output

Change-Id: If2d4fe2cdcb6a81c7c6d730d18c2b681a74fb0b7
2019-11-01 17:59:42 +00:00
Jeongik Cha 75b83b0a81 Link type will be check in android_library also
For now, Soong checks link-type in java_library, so it cannot block hidden api usage from android_library that app links with.
So we should add check in 'android_library'

Test: m nothing
Change-Id: Ic040270ec668bdd693b690ac8a88be1048922c3b
2019-11-01 15:29:15 +09:00
Inseob Kim bc093672ed Fix vendor variants generation of vndk
Current routine to check whether BOARD_VNDK_VERSION variant is created
or not is not correct, because only non-VNDK modules are installed in
/vendor. Thus, BOARD_VNDK_VERSION variants should only be created with
non-VNDK modules.

Bug: N/A
Test: m nothing
Change-Id: I2ee7821fce407214ac6be4f4b6d62483c907971f
2019-11-01 13:28:59 +09:00
Sundong Ahn 9d0d807e2b Merge "Create variants for each image type"
am: 549f6c235f

Change-Id: I9e5fcbcf2d800aef41a3aa7148f15958eb342a75
2019-10-31 19:18:02 -07:00
Jooyung Han edb5a3ae18 Merge "apex: Restrict usage of "use_vendor""
am: e9b33cd8f8

Change-Id: If71ee0914b569660ba6f9e334d69aa883d46dfde
2019-10-31 19:14:31 -07:00
Treehugger Robot 549f6c235f Merge "Create variants for each image type" 2019-11-01 02:13:52 +00:00
Jooyung Han ed3d5d730b Merge "Soong generates vndk-related .libraries.txt files"
am: 7acbfc033d

Change-Id: Ia675bafa6f6e367883af3348a514d981ca3166e8
2019-10-31 19:12:56 -07:00
Jooyung Han e9b33cd8f8 Merge "apex: Restrict usage of "use_vendor"" 2019-11-01 01:58:33 +00:00
Jooyung Han 7acbfc033d Merge "Soong generates vndk-related .libraries.txt files" 2019-11-01 01:57:50 +00:00
Jiyong Park 2c4966ad65 Merge "native shared libs in an SDK can be snapshotted"
am: 40dfbe3a16

Change-Id: I6a60e7be42cb59e745cbae8f800b172fe314230c
2019-10-31 18:47:50 -07:00
Treehugger Robot 40dfbe3a16 Merge "native shared libs in an SDK can be snapshotted" 2019-11-01 01:23:35 +00:00
Jooyung Han a463f720aa delete redundant code
no need to use separate test-only key for config.Once().

Test: m
Change-Id: I9e05d413504114df8f8ea8d9ef521db1d5da5d01
2019-11-01 09:00:11 +09:00
Jooyung Han 0302a84ddc Soong generates vndk-related .libraries.txt files
This is a follow-up CL of I9a24f6975bd4b226a94f61a13d43857dcdce6b88

Generated files are passed to make via MakeVars:
- SOONG_LLNDK_LIBRARIES_FILE
- SOONG_VNDKCORE_LIBRARIES_FILE
- SOONG_VNDKSP_LIBRARIES_FILE
- SOONG_VNDKPRIVATE_LIBRARIES_FILE
- SOONG_VNDKCOREVARIANT_LIBRARIES_FILE
- SOONG_VNDK_LIBRARIES_FILE

Previously filenames were "guessed" from module names. Now VndkMutator
stores filenames as well and generate those files with them.

Bug: 142963962
Bug: 141450808
Test: m && device boots && TH
Change-Id: I0c248b707188f904df60ead50059fefe90bfd17f
2019-11-01 04:35:21 +09:00
Jooyung Han dc782449b8 apex: Restrict usage of "use_vendor"
When use_vendor is used, native modules are built with
__ANDROID_VNDK__ and __ANDROID_APEX__, which may cause
compatibility issues. (e.g. libbinder)

Even though libbinder restricts its availability via
'apex_available' property and relies on yet another macro
__ANDROID_APEX_<NAME>__, we restrict usage of "use_vendor:" from
other APEX modules to avoid similar problems.

Bug: 142684427
Test: m -j
Change-Id: Ibc781de2efcd20cb6688a183b08e908a8a6e2593
2019-11-01 03:15:38 +09:00
Sundong Ahn abb6443895 Create variants for each image type
Create variant of image, zip or flattened according to
TARGET_FLATTEN_APEX and payload type.
If payload type is zip, only zip variant is created because flattened
apex is not supported. And if payload type is image, image and flattened
variants are created.

Bug: 139053989
Test: m -j
Change-Id: Ibde18490d23ec602c4cca97cf97db90a562e014e
2019-10-31 22:14:46 +09:00
Jiyong Park 0b2387551b stem property of java modules are propagated to Make
62c7829595c0df53e96addcd347c11ac01012eee introduced the new stem
property to java modules, but it wasn't propagated to Make. Fixing the
problem.

This change also fixes a problem that (module name) == (file name) is
assumed in dexpreopt_config.go, which no longer is the case. A mutator
runs to build a map from module name to its stem. The map is then used
when filling up the file paths in the bootImageConfig struct.

Bug: 139391334
Bug: 143494499
Test: m
Test: BootImageProfileTest
Change-Id: Idbc894f877692401471130de6cbfe5e0dd129da9
2019-10-31 22:13:05 +09:00
Jiyong Park 9495b76fbd Remove api_srcs property from java_sdk_library
The property is no longer used.

Bug: 141149570
Test: m
Change-Id: I3136c7b03138296dc59127f596f7e96502edf608
2019-10-31 20:38:14 +09:00
Kris Alder edf33a3253 Merge "change output file extension (config.txt -> config.json)"
am: 5d0b3b7195

Change-Id: I78b645ef6826b3cd767246c6aad8468b4f6da6c0
2019-10-30 22:15:21 -07:00
Kris Alder 5d0b3b7195 Merge "change output file extension (config.txt -> config.json)" 2019-10-31 04:59:55 +00:00
Jooyung Han 15e234ef49 Merge "apex: __ANDROID_APEX__ defined with no value"
am: bdad6c378f

Change-Id: I71874576abede7a6695dec226be331fd33bd60ab
2019-10-30 17:08:56 -07:00
Jooyung Han bdad6c378f Merge "apex: __ANDROID_APEX__ defined with no value" 2019-10-30 23:50:58 +00:00
Kris Alder db97af4a4b change output file extension (config.txt -> config.json)
This is causing some build errors because the config.json file isn't
associated with a rule (because the rule looks for .txt).

Test: ran locally, checked output directory
Bug: 142551000
Change-Id: Idcdb226fa2d23055a8850b2a0545202921edc3b1
2019-10-30 20:58:54 +00:00
Mitch Phillips 7be457b958 Merge "Use unstripped binaries in fuzz target packaging."
am: 9f221955f4

Change-Id: I1e2ee8c60dbaa34c12380a919ab6d383df9613a6
2019-10-30 13:56:32 -07:00
Treehugger Robot 9f221955f4 Merge "Use unstripped binaries in fuzz target packaging." 2019-10-30 20:48:14 +00:00
Xin Li c5ac9cb1ef DO NOT MERGE - qt-qpr1-dev-plus-aosp-without-vendor@5915889 into stage-aosp-master
Bug: 142003500
Change-Id: Ib0edd4fcbe2b2b260811ea3f8a66bd6a7a713a3d
2019-10-30 11:46:30 -07:00
Nicolas Geoffray bad55f821f Merge "Revert "Package dexpreopt artifacts for libcore jars in the ART apex.""
am: 8a947aeefc

Change-Id: I774fbaeba08c4b8f65bb61104ce1c10951881392
2019-10-30 04:39:27 -07:00
Nicolas Geoffray 8a947aeefc Merge "Revert "Package dexpreopt artifacts for libcore jars in the ART apex."" 2019-10-30 11:28:12 +00:00
Nicolas Geoffray 24babe3a66 Revert "Package dexpreopt artifacts for libcore jars in the ART apex."
This reverts commit d5df949385.

Bug: 143594594
Bug: 143593500
Reason for revert: Some builds are failing.

Change-Id: I69986b472bce39266095e526fcd7ef5f48ece85e
Exempt-From-Owner-Approval: Going back to green.
2019-10-30 11:27:58 +00:00
Ulyana Trafimovich a804df13ea Merge "Package dexpreopt artifacts for libcore jars in the ART apex."
am: b30d91cbc5

Change-Id: I87fb00609c489546946074f0a4780c1bd90cd32e
2019-10-30 03:26:33 -07:00
Ulyana Trafimovich b30d91cbc5 Merge "Package dexpreopt artifacts for libcore jars in the ART apex." 2019-10-30 10:13:32 +00:00
Chih-hung Hsieh 462e944d4d Merge "Add rust_test and rust_test_host."
am: bb3e6c3c35

Change-Id: I2bc641d67abb06a736a7ea27da96c020918807d6
2019-10-30 00:40:00 -07:00
Chih-hung Hsieh bb3e6c3c35 Merge "Add rust_test and rust_test_host." 2019-10-30 07:22:53 +00:00
Jooyung Han d178df9c20 Merge changes from topic "fix-vndk-core-variant"
am: 61eb8aaea4

Change-Id: If9b5bc238965c0adf4df9b51932025076bb37396
2019-10-29 21:37:29 -07:00
Treehugger Robot 61eb8aaea4 Merge changes from topic "fix-vndk-core-variant"
* changes:
  Do not install VNDK lib in favor of VNDK APEX
  Fix apex_vndk with TARGET_VNDK_USE_CORE_VARIANT
  Do not follow deps for apex_vndk
2019-10-30 04:29:37 +00:00
Colin Cross 3b24d1221a Merge "smart_status: move channel write outside lock to avoid deadlock"
am: 4bce23b139

Change-Id: I6c47df3c30d88a31fd6d435d2c4e9e3f44073e7a
2019-10-29 21:12:37 -07:00
Treehugger Robot 4bce23b139 Merge "smart_status: move channel write outside lock to avoid deadlock" 2019-10-30 03:57:23 +00:00
Chih-Hung Hsieh a5f22ed6b0 Add rust_test and rust_test_host.
* Rust tests are like binary files compiled with --test.
  New test.go follows binary.go code patterns and reuses
  some code in binary.go.
* Generate one test per source file as testPerSrc in cc/test.go.
  The "all tests" variation feature of cc/test.go is not copied yet.
  Fix some Stem and SubName settings to make testPerSrc work.
* Move cc.CheckDuplicate to android.CheckDuplicate,
  which is now shared by cc and rust.
* Refactor tests in binary_test.go and add new test_test.go.

Bug: 140938178
Test: mm in rust projects, added rust_test and rust_test_host
Change-Id: Ia6fec8b4cf2572fd352ab1938a1f3c7b5cca2212
2019-10-29 17:19:03 -07:00
Jooyung Han b01c114d27 Do not install VNDK lib in favor of VNDK APEX
Since VNDK APEX replaces VNDK lib /system/lib/vndk{-sp}, VNDK libs are
not installed.

Bug: 141451661
Test: m && boot device
Change-Id: I14686927a56ded5176839c89f29a2fd7e0fca658
2019-10-30 00:07:25 +00:00
Mitch Phillips d5bd5773e3 Use unstripped binaries in fuzz target packaging.
Unstripped binaries allow for online symbolization, and offline
symbolization using the debug info in the binary. Debug information
isn't stripped for host binaries, but is for target. Target should also
contain debugging info.

Bug: N/A
Test: m fuzz && # Check that fuzz targets in the fuzz-*.zip package have
debug info.

Change-Id: Ibd3002674d519e927340a50dfdfbf44f2d809d58
2019-10-29 17:04:22 -07:00
Jooyung Han 87a7f3064f Fix apex_vndk with TARGET_VNDK_USE_CORE_VARIANT
When TARGET_VNDK_USE_CORE_VARIANT is set, vndk apex should have only
- vndk sp libraries
- vndk core libraries which are marked as "must use vendor variant"

Previously, vndk sp libs are discarded when TARGET_VNDK_USE_CORE_VARIANT
is set.

Bug: 143374795
Bug: 139772411
Test: TARGET_VNDK_USE_CORE_VARIANT=true m com.android.vndk.current
      see if vndk sp lib(e.g. libunwindstakc) is included.

Change-Id: Iae218fff5c354eb874839a1f71be30633fb8a9ab
2019-10-30 09:04:13 +09:00
Jooyung Han 8aee204cb2 Do not follow deps for apex_vndk
Since apex_vndk deals with its own dependencies, it should not follow
dependencies while packaging.

Bug: 139772411
Test: TARGET_VNDK_USE_CORE_VARIANT=true m com.android.vndk.current
      see if there are unexpected libs in the apex
      for example, android.hardware.audio.common@2.0.so should not be
      included in the apex since it is not listed as "must use vendor
      variant".

Change-Id: Ibada600b3099fb19630d1e327a2e09cd26b2deb0
2019-10-30 00:03:22 +00:00
Jooyung Han 6b8459be4f apex: __ANDROID_APEX__ defined with no value
__ANDROID_APEX__ was defined with the name of apex module.
-D__ANDROID_APEX__=com.android.foo

But in this way, conditional compilation is not easy since comparing
macro's string value is not supported in C/C++.
(There's no usages of this value in source tree.)

In most cases, modules can check if __ANDROID_APEX__ is defined to see
if they are compiled for apex.
For modules which should behave differently according to which apex they
are included, they can check __ANDROID_APEX_<NAME>__.

Bug: 142582178
Test: m (soong tests run) && boot device && TH
Change-Id: I0f5e3e9463ccd96cbba333a8bdd648470c5c912d
2019-10-29 23:47:59 +00:00
Dario Freni c7c9f04141 Merge "Add support for including app prebuilts in APEX."
am: 520367cbd3

Change-Id: I679f629f9145e22e7f79acbd85bbe296c2ff5f58
2019-10-29 16:14:41 -07:00