Commit graph

101 commits

Author SHA1 Message Date
Paul Duffin
1ab6186e91 Switch dex_bootjars to a singleton module
The main difference between a singleton and a singleton module that
affects this change is that the latter requires a module to be defined
in order for the singleton to be instantiated. This change defines the
module in both the tests and the standard build.

Bug: 177892522
Test: m droid
Change-Id: Id6669835cf3a2ab7359fa53047eb9042992a9362
2021-01-21 16:49:34 +00:00
Nicolas Geoffray
324234bd00 Merge "dexpreopt: Use the dirty-image-objects path from frameworks/base." 2021-01-20 18:13:20 +00:00
Nicolas Geoffray
1086e604b9 dexpreopt: Use the dirty-image-objects path from frameworks/base.
Test: m
Bug: 176171716
Change-Id: Ifbc08ae03e2b1bec7161948970bd197386e3b305
2021-01-20 14:31:32 +00:00
Ulya Trafimovich
a4a1c4ee98 Support building boot images with disabled dexpreopt.
Bug: 176171716
Test: build_mainline_modules.sh and ensure that the ART boot image is
    built: `find out -type f -name '*.art'` is nonempty for every arch.
Change-Id: Ibc45581eef2b205c750a30709780cf659ba7cfa1
2021-01-20 14:03:07 +00:00
Paul Duffin
064b70c918 Export dex implementation jars from prebuilt_apex
Dexpreopt and boot jars package check all require access to dex
implementation jars created for java_library and java_sdk_library. They
were available when building from source but not when building from
prebuilts, even though they are embedded within the .apex files that
are referenced from prebuilt_apex.

This changes adds support to prebuilt_apex to export the dex
implementation jars and updates java_import to use those exported dex
implementation jars.

In a source build dexpreopt/boot jars package check access the apex (or
platform) specific variant of a java_library, e.g. core-oj, from which
it retrieves the dex implementation jar path.

After this change in a prebuilt build dexpreopt/boot jars package check
behave in the same way except in this case they retrieve the dex
implementation jar path from the apex (or platform) specific variant of
the java_import, e.g. core-oj.

The work to export files from a `.apex` file for use by other modules
is performed by a new `deapexer` module type. It is not used directly
in an `Android.bp` file but instead is created implicitly by
`prebuilt_apex`,

In order to do that this contains the following changes:
* Adds a new `dexapexer` module type to handle the exporting of files
  from the `.apex` file.
* Adds an exported_java_libs property to prebuilt_apex to specify the
  set of libraries whose dex implementation jars need exporting.
* Creates apex specific variants of the libraries listed in the
  exported_java_libs property.
* Adds the set of exported files to the ApexInfo to make them available
  to the apex specific variants.
* Prevents the prebuilt_apex variants from being merged together as
  they will not be compatible.
* Modifies java_import to use the exported file for variants of a
  prebuilt_apex.
* Adds a ninja rule to unpack (using deapexer) the contents of the
  prebuilt_apex's apex file, verify that the required files are present
  and make them available as outputs for other rules to use.
* Some minor refactorings to support these changes.
* Adds tests to cover prebuilt only, prebuilt with source preferred,
  and prebuilt preferred with source.

Test: m nothing
Bug: 171061220
Change-Id: Ic9bed81fb65b92f0d59f64c0bce168a9ed44cfac
2021-01-15 18:14:10 +00:00
Paul Duffin
fc02166dab Use apex and jar to select boot image dex jar
Previously, only the <jar> part of the boot image configuration pair of
<apex>:<jar> was used to select the module that provides the boot image
dex. The name was sufficient to select the module but not the module
variant and it relied on the platform variant not being installed to
select a unique variant. Unfortunately, when modules are provided as
prebuilts they are not installed and so they get ignored.

This change removes the install check and instead checks the <apex> as
well to select a unique variant.

It also moves the DexJarBuildPath() and ApexModule checks to after
checking the name and treats them as errors. It is safe to do so
because every module that has the same name has to have the same module
type and in order for the module to be valid in the boot image
configuration it must pass those two checks. Treating these as errors
rather than silently ignoring them makes it easier to diagnose problems
with the configuration and/or the boot image modules.

Test: m droid
Bug: 171061220
Change-Id: Ie51f097e081907ea5b75d75840736b10d8d883e8
2020-12-07 17:36:53 +00:00
Paul Duffin
db77e14d84 Ensure that only one dex jar is chosen for each boot image library
This change does not break modules like "core-oj" that are in multiple
apexes, i.e. com.android.art, com.android.art.debug and
com.android.art.testing because they all shared the same variant. So,
the getBootImageJar() is only called once for that variant.

Test: m droid
Bug: 171061220
Change-Id: Ibf26da147af2b49ab9e4588030e8cd4002d04a7a
2020-12-07 17:30:48 +00:00
Paul Duffin
7f48eeff59 Improve error messages for missing dependencies
Adds some additional information into the paths that are created when
modules are missing in Soong but SOONG_ALLOW_MISSING_DEPENDENCIES=true.

Test: try and build platform against art prebuilts
Bug: 171061220
Change-Id: Ifbcc0af5bdbd15409758a3b6f216cf9b3b5dba31
2020-12-04 16:21:57 +00:00
Colin Cross
f1a035e6be Pass pctx and ctx to NewRuleBuilder
Enable the RuleBuilder and RuleBuilderCommand methods to access
the BuilderContext by passing it to NewRuleBuilder instead of
RuleBuilder.Build.

Test: genrule_test.go
Test: rule_builder_test.go
Test: m checkbuild
Change-Id: I63e6597e19167393876dc2259d6f521363b7dabc
2020-12-01 16:22:16 -08:00
Ulya Trafimovich
3bfabf2626 Documenting java/dexpreopt_bootjars.go
Test: m nothing
Bug: 173092919
Change-Id: I20018e1df6ad5e21172bb91435ae2c9cad7024e6
2020-11-27 18:10:22 +00:00
Colin Cross
cf371cc1f7 Replace android.WriteFile rule with android.WriteFileRule
The android.WriteFile rule takes careful escaping to produce the
right contents.  Wrap it in an android.WriteFileRule that handles
the escaping.

Test: compare all android.WriteFile outputs
Change-Id: If71a5843af47a37ca61714e1a1ebb32d08536c31
2020-11-14 16:26:00 -08:00
Martin Stjernholm
7f51107ee6 Rename ART release APEX to com.android.art.
Test: See https://r.android.com/1457217
Bug: 169639321
Change-Id: I6800c7a382486b4e50945cc8b789f4be16482fe6
Merged-In: I6800c7a382486b4e50945cc8b789f4be16482fe6
2020-10-21 15:41:02 +01:00
Colin Cross
56a8321c21 Remove global state from apex modules
A global variant was used to store the global mapping between
modules and APEXes.  Replace it with storing pointers to APEX
contents inside each module so that they can query the contents
of any APEXes they belong to.

Bug: 146393795
Test: all Soong tests
Test: single line change to build.ninja host install dependency ordering
Test: no Android-${TARGET_PRODUCT}.mk, make_vars-${TARGET_PRODUCT}.mk or late-${TARGET_PRODUCT}.mk
Change-Id: Id2d7b73ea27f8c3b41d30820bdd86b65c539bfa4
2020-10-06 13:39:57 -07:00
Paul Duffin
81febc4500 Avoid panic when a boot jar is provided as a java_import
Bug: 142938164
Test: m nothing
Change-Id: I607009825f5946d7e1daa31dc1e4bb8f2609206d
2020-10-06 16:54:02 +01:00
Colin Cross
aede88c1c7 Reland: Deduplicate APEX variants that would build identically
APEX variants that share the same SDK version and updatability
almost always use identical command line arguments to build but
with different intermediates directories.  This causes unnecessary
build time and disk space for duplicated work.

Deduplicate APEX variants that would build identically.  Create
aliases from the per-APEX variations to the new shared variations
so that the APEX modules can continue to depend on them via the
APEX name as the variation.

This has one significant change in behavior.  Before this change,
if an APEX had two libraries in its direct dependencies and one
of those libraries depended on the other, and the second library
had stubs, then the first library would depend on the implementation
of the second library and not the stubs.  After this change, if
the first library is also present in a second APEX but the second
library is not, then the common variant shared between the two
APEXes would use the stubs, not the implementation.

In a correctly configured set of build rules this change will
be irrelevant, because if the compilation worked for the second
APEX using stubs then it will work for the common variant using
stubs.  However, if an incorrect change to the build rules is
made this could lead to confusing errors, as a previously-working
common variant could suddenly stop building when a module is added
to a new APEX without its dependencies that require implementation
APIs to compile.

This change reduces the number of modules in an AOSP arm64-userdebug
build by 3% (52242 to 50586), reduces the number of variants of the
libcutils module from 74 to 53, and reduces the number of variants
of the massive libart[d] modules from 44 to 32.

This relands I0529837476a253c32b3dfb98dcccf107427c742c with a fix
to always mark permissions XML files of java_sdk_library modules as
unique per apex since they contain the APEX filename, and a fix
to UpdateUniqueApexVariationsForDeps to check ApexInfo.InApexes
instead of DepIsInSameApex to check if two modules are in the same
apex to account for a module that depends on another in a way that
doesn't normally include the dependency in the APEX (e.g. a libs
property), but the dependency is directly included in the APEX.

Bug: 164216768
Test: go test ./build/soong/apex/...
Change-Id: I2ae170601f764e5b88d0be2e0e6adc84e3a4d9cc
2020-08-19 10:21:17 -07:00
Colin Cross
e07f2316b7 Rename ApexName to ApexVariationName
In preparation for reusing the same variation for multiple apexes,
rename ApexName to ApexVariationName.

Bug: 164216768
Test: all soong tests
Change-Id: I88f2c5b192ffa27acd38e01952d0cefd413222a0
2020-08-13 17:50:29 -07:00
Dan Willemsen
9f43597ff7 Remove obsolete PDK build functionality
This hasn't worked for a couple years, and continues to bitrot. Just
remove it.

Adds a bpfix rule so that we can eventually remove the
product_variables.pdk definition, which is now always a no-op.

Test: treehugger
Change-Id: I830b54d419b59f6db1d4617b45e61a78234f57a7
Merged-In: I830b54d419b59f6db1d4617b45e61a78234f57a7
2020-08-11 01:11:44 +00:00
Ulya Trafimovich
249386ad69 Add structured representation for colon-separated jar lists.
With the addition of apexes and /system_ext some of the bootclasspath
and system server jars have moved from /system to the new locations.
This has been implemented by using lists of colon-separated strings
called "apex-jar pairs" (although "apex" was misleading as it could
refer to "platform" or "system_ext", not necessarily a real apex).

Using the colon-separated string representation is inconvenient, as it
requires splitting and reassembling the list components many times,
which harms performance and makes error handling difficult. Therefore
this patch refactors the colon-separated lists into a struct that
hides the implementation details.

Test: lunch aosp_cf_x86_phone-userdebug && m
Change-Id: Id248ce639a267076294f4d4d73971da2f2f77208
2020-08-05 09:59:30 +01:00
Ulyana Trafimovich
5cdb051ce3 Merge "Remove host boot image from boot.zip." 2020-06-11 10:04:58 +00:00
Martin Stjernholm
fa096325fe Merge changes from topics "target-build-unbundled", "unbundled-preopt"
* changes:
  Don't disable dexpreopting implicitly in unbundled builds.
  Add TARGET_BUILD_UNBUNDLED as a variable to control builds.
2020-06-11 10:01:59 +00: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
Martin Stjernholm
95d6ea3781 Don't disable dexpreopting implicitly in unbundled builds.
Test: art/test/testrunner/run_build_test_target.py art-linux-bionic-x64
  with TARGET_BUILD_UNBUNDLED enabled in the build scripts
Test: art/test/testrunner/testrunner.py --target --64 --optimizing
  with TARGET_BUILD_UNBUNDLED enabled in chroot on device
Bug: 157549171
Change-Id: I124c341d1801c4afa22f836dd567019de3e9498e
2020-06-04 20:28:21 +01:00
Ulyana Trafimovich
5539e7b568 Revert^2 "Rename DexJar interface method to DexJarBuildPath."
This reverts commit b0dc851ff4.

Reason for revert: relanding original change. Build failures were
  caused by a race with another CL: https://r.android.com/1320920

Test: lunch aosp_cf_x86_phone-userdebug && m
Change-Id: Ic9016582dae7773b4d4f84a63425f1ef7a5d061f
2020-06-04 17:20:38 +01:00
Ulyana Trafimovich
b0dc851ff4 Revert "Rename DexJar interface method to DexJarBuildPath."
This reverts commit 562c240185.

Reason for revert: breaks `lunch full-eng && m checkbuild`.

Change-Id: Id7c7d6240d98afaf8edd49b6c96cd05534b784cc
2020-06-04 10:37:36 +00:00
Ulya Trafimovich
562c240185 Rename DexJar interface method to DexJarBuildPath.
This is a prerequisite change before adding DexJarInstallPath.

Test: lunch aosp_cf_phone-userdebug && m
Change-Id: I033e08b8bb06c0a844a6bbbfcdc48ce33e9c95cf
2020-06-03 11:40:45 +01:00
Paul Duffin
e739f1ed9f Collect permitted packages from java_sdk_library instances
Switching an updatable boot jar from java_library to java_sdk_library
changed the contents of the updatable-bcp-packages.txt due to the code
requiring the module to be *Library. This change updates that to allow
it to be any module that implements the
PermittedPackagesForUpdatableBootJars interface which is *Library and
anything that embeds that like *SdkLibrary.

Bug: 155164730
Test: m droid and check the contents of system/etc/updatable-bcp-packages.txt
Change-Id: I464af74628da311734f102f77ec8158daec5b32d
2020-05-29 12:31:41 +01:00
Ulya Trafimovich
8640ab9c26 Raise an error instead of panic in SplitApexJarPairs.
Test: aosp_walleye-userdebug boots
Change-Id: I9a1c4ec5c8862b1936820b3cee6db9a85015cb0e
2020-05-12 12:27:50 +01:00
Ulya Trafimovich
50c4a4b19f Use two-column format for PRODUCT_BOOT_JARS components.
The first component is the apex name, or a special name "platform"
if the boot jar is a platform jar rather than a part of some apex.
This is a prerequisite change for moving core-icu4j to a separate
com.android.i18n apex.

Old one-column format is still supported, but all unqualified
components of PRODUCT_BOOT_JARS get "platform:" prepended to them
after reading the product makefiles.

Test: aosp_walleye-userdebug boots
Bug: 138994281
Change-Id: Ic229159fdcdaf6182210a53b63850a389dd786fc
2020-04-30 14:42:32 +01:00
Ulya Trafimovich
7c140d828a Add "updatable" property to ApexModule interface.
For a given variant of a module that implements ApexModule interface,
the "updatable" property tests if this variant comes from an updatable
apex. For platform variants it is always false.

Test: lunch aosp_walleye-userdebug && m nothing
Bug: 138994281
Change-Id: I2d4c54fb397e29dc9b3203be7fb17be4536529f7
2020-04-23 11:58:53 +01:00
Ulya Trafimovich
e0ce4ba491 Relax boot image check to allow platform Jacoco variant in a coverage build.
Test: m nothing
Test: m EMMA_INSTRUMENT=true EMMA_INSTRUMENT_FRAMEWORK=true nothing

Bug: 153533941

Change-Id: I5847ec282f6b481cee61ed9ec6b6928c9a41fae7
2020-04-08 15:11:20 +01:00
Ulyana Trafimovich
0d8f61640e Merge "Forbid generating boot image files for jars in updatable modules." 2020-04-08 12:15:47 +00:00
Ulya Trafimovich
b28cc3758c Forbid generating boot image files for jars in updatable modules.
This is to guard against the potential situation when someone adds
updatable modules to the list of boot jars by mistake.

Test: aosp_walleye-userdebug builds.

Test: Manually break the checks and observe the errors:
  - move updatable module 'conscrypt' from
    PRODUCT_UPDATABLE_BOOT_JARS to ART_APEX_JARS:
      internal error: module 'conscrypt' from updatable apex 'com.android.conscrypt' is not allowed in the ART boot image

  - add updatable module 'conscrypt' to ART_APEX_JARS
    (but do not remove it from PRODUCT_UPDATABLE_BOOT_JARS):
      error: A jar in PRODUCT_UPDATABLE_BOOT_JARS must not be in PRODUCT_BOOT_JARS, but conscrypt is.

  - move updatable module 'framework-tethering' from
    PRODUCT_UPDATABLE_BOOT_JARS to PRODUCT_BOOT_JARS:
      internal error: module 'framework-tethering' from updatable apex 'com.android.tethering' is not allowed in the framework boot image

  - add non-updatable (in AOSP) module 'android.net.ipsec.ike'
    to PRODUCT_BOOT_JARS:
      internal error: failed to find a dex jar path for module 'com.android.ipsec.ike', note that some jars may be filtered out by module constraints

Bug: 147579140

Change-Id: I25ca2f52530fcfa1f9823b2cfa3485db9c0d0db1
2020-04-07 17:09:59 +01:00
Vladimir Marko
1c5d4fe4f7 Merge "Add file with updatable BCP packages to /system/etc/" 2020-04-02 11:42:08 +00:00
Vladimir Marko
205e6c2a15 Add file with updatable BCP packages to /system/etc/
Make `permitted_packages` mandatory for updatable boot class
path jars. Collect the permitted_packages from those jars to
a file installed as /system/etc/updatable_bcp_packages.txt .

Test: aosp_taimen-userdebug boots.
Test: adb shell cat /system/etc/updatable-bcp-packages
Test: Manual, remove permitted_packages from framework-tethering,
      build fails.
Bug: 151314205
Change-Id: I21def97ace9081e707910d449943c683189f16cf
2020-04-02 08:51:39 +01:00
David Srbecky
ab99498ea1 Adjust embedded dex locations in host boot image.
ART tests require that "out/host/linux-x86" is included.

This requires making the dexLocations per-variant specific.

Test: m test-art-host-gtest
Bug: 147817558
Bug: 147819342
Change-Id: I7839ee15cb6dfc62508bdd3fa0f306336af17055
2020-04-01 12:06:56 +01:00
David Srbecky
1aacc6c3df Fix dump-oat-boot build target.
Implement support of dumping host boot.art.

That was not possible before because imageLocation is different on host.

This CL makes imageLocation per-variant so can access for the host variant.

Test: m dump-oat-boot
Change-Id: Id82161e4901a6b77f220238aec460b8609fd765f
2020-03-26 15:28:27 +00:00
Tim Joines
45feb06174 Merge "Revert "Share vdex files in the ART apex between architectures (..."" 2020-03-18 19:46:48 +00:00
Tim Joines
c1ef1bb5cc Revert "Share vdex files in the ART apex between architectures (..."
Revert submission 1254009-vdex-symlinks

Reason for revert: This causing some devices to fail to boot. See b/151836042 for details.
Reverted Changes:
Iced89071b:Expect vdex files in a target-independent director...
Ifbceb8457:Share vdex files in the ART apex between architect...

Change-Id: I5bd88f8e61d442eed921d840c90777a2750ddb16
2020-03-18 18:00:41 +00:00
Ulyana Trafimovich
5d2449efe4 Merge "Share vdex files in the ART apex between architectures (via symlinks)." 2020-03-18 13:46:06 +00:00
David Srbecky
fde5912660 Merge "Rename ART dump-oat rules." 2020-03-17 14:34:45 +00:00
Ulya Trafimovich
5b88fe36b5 Share vdex files in the ART apex between architectures (via symlinks).
Test: aosp_walleye-userdebug boots.

Test: Check symlinks to *.vdex files in the ART apex:
$ adb shell 'find /apex/com.android.art -name '*.vdex' | xargs ls -l'
  lrw-r--r-- 1 system system   23 1970-01-01 01:00 /apex/com.android.art/javalib/arm/boot-apache-xml.vdex -> ../boot-apache-xml.vdex
  lrw-r--r-- 1 system system   25 1970-01-01 01:00 /apex/com.android.art/javalib/arm/boot-bouncycastle.vdex -> ../boot-bouncycastle.vdex
  lrw-r--r-- 1 system system   23 1970-01-01 01:00 /apex/com.android.art/javalib/arm/boot-core-icu4j.vdex -> ../boot-core-icu4j.vdex
  lrw-r--r-- 1 system system   24 1970-01-01 01:00 /apex/com.android.art/javalib/arm/boot-core-libart.vdex -> ../boot-core-libart.vdex
  lrw-r--r-- 1 system system   19 1970-01-01 01:00 /apex/com.android.art/javalib/arm/boot-okhttp.vdex -> ../boot-okhttp.vdex
  lrw-r--r-- 1 system system   12 1970-01-01 01:00 /apex/com.android.art/javalib/arm/boot.vdex -> ../boot.vdex
  lrw-r--r-- 1 system system   23 1970-01-01 01:00 /apex/com.android.art/javalib/arm64/boot-apache-xml.vdex -> ../boot-apache-xml.vdex
  lrw-r--r-- 1 system system   25 1970-01-01 01:00 /apex/com.android.art/javalib/arm64/boot-bouncycastle.vdex -> ../boot-bouncycastle.vdex
  lrw-r--r-- 1 system system   23 1970-01-01 01:00 /apex/com.android.art/javalib/arm64/boot-core-icu4j.vdex -> ../boot-core-icu4j.vdex
  lrw-r--r-- 1 system system   24 1970-01-01 01:00 /apex/com.android.art/javalib/arm64/boot-core-libart.vdex -> ../boot-core-libart.vdex
  lrw-r--r-- 1 system system   19 1970-01-01 01:00 /apex/com.android.art/javalib/arm64/boot-okhttp.vdex -> ../boot-okhttp.vdex
  lrw-r--r-- 1 system system   12 1970-01-01 01:00 /apex/com.android.art/javalib/arm64/boot.vdex -> ../boot.vdex
  -rw-r--r-- 1 system system 1229 1970-01-01 01:00 /apex/com.android.art/javalib/boot-apache-xml.vdex
  -rw-r--r-- 1 system system 2043 1970-01-01 01:00 /apex/com.android.art/javalib/boot-bouncycastle.vdex
  -rw-r--r-- 1 system system 2883 1970-01-01 01:00 /apex/com.android.art/javalib/boot-core-icu4j.vdex
  -rw-r--r-- 1 system system  865 1970-01-01 01:00 /apex/com.android.art/javalib/boot-core-libart.vdex
  -rw-r--r-- 1 system system  395 1970-01-01 01:00 /apex/com.android.art/javalib/boot-okhttp.vdex
  -rw-r--r-- 1 system system 7125 1970-01-01 01:00 /apex/com.android.art/javalib/boot.vdex

Bug: 150934453

Change-Id: Ifbceb845749f4c218693f4118e8b35b59ff26de1
2020-03-17 13:36:06 +00:00
David Srbecky
46672321e4 Rename ART dump-oat rules.
Follow-up to CL/1235086 which renamed the rules.

Preserve the name for target since ART tests depends on it.

Test: m dump-oat-boot-x86
Change-Id: I67c7ea9e99fea24f089d38856811bfa320258b54
2020-03-17 11:00:46 +00:00
Elliott Hughes
cc868de8a7 Merge "Remove unused mips workarounds." 2020-03-16 21:06:13 +00:00
David Srbecky
b9c99133eb Merge "Generate the ART boot image for host as well (used by ART tests)." 2020-03-12 18:20:42 +00:00
David Srbecky
7f8dac1254 Generate the ART boot image for host as well (used by ART tests).
This will allow us to remove the core.art image compiled in make.

Test: lunch aosp_x86_64 && m test-art-host-gtest
Bug: 147817558
Bug: 147819342
Change-Id: I864f72198d875dc1421c9c029a683bafbe7b71ac
2020-03-10 13:35:27 +00:00
Ulya Trafimovich
c0c98d51d6 Set '--force-determinism' option for boot image compilation.
Test: aosp_walleye-userdebug boots.
Change-Id: I0edf7fbfe18ea2f3d1cfda5138a48bdc1420aa6a

Bug: 150934453
2020-03-09 14:19:17 +00:00
Elliott Hughes
da3a071eaa Remove unused mips workarounds.
This was never really finished, and hasn't been supported for years.

Test: treehugger
Change-Id: I21d4c3112aa8cf0c56e59f0cc19ff8725ef714b9
2020-03-06 18:15:44 -08:00
David Srbecky
c177ebeca9 Distinguish boot images by target rather than arch
We plan to add boot image variants for host tests.
Distinguishing the variants by arch does not work,
since both host and device can have the same arch.

Change-Id: Iea73c77367affb074f97a0fc318389417ce537da
2020-02-26 17:04:21 +00:00
Martin Stjernholm
6d415273c0 Do all dexpreoptDisabled checks before registering a dex2oat host dep.
Also disable dexpreopting for host. These are necessary to avoid adding
dependencies on dex2oat in various non-platform builds where they will
break.

Since we cannot assume at least one module enables dexpreopting now,
the two dexpreopt singletons are silently disabled if there has been no
call to dexpreopt.GetGlobalSoongConfig.

Bug: 145934348
Bug: 148312086
Bug: 148319588
Bug: 148690468
Test: m
Test: env OUT_DIR=out-tools prebuilts/build-tools/build-prebuilts.sh
  on the aosp-build-tools branch
Test: build/soong/soong_ui.bash --make-mode static_sdk_tools dist DIST_DIR=out-dist BUILD_HOST_static=1
  on internal (cf b/148312086#comment8)
Test: build/soong/soong_ui.bash --make-mode dist DIST_DIR=out-apps TARGET_BUILD_APPS=Launcher3 TARGET_BUILD_VARIANT=userdebug
  on internal without art/ and external/vixl/ (cf b/148319588)
Change-Id: I240dade7204b87fc2d12181534ab23439eca8b46
2020-02-13 17:46:48 +00:00
Martin Stjernholm
40f9f3c061 Reland: Move the Once cache for dexpreopt.GlobalConfig into the
dexpreopt package.

Preparation for a future CL that will need to get the make-written
GlobalConfig from within dexpreopt.

Also rename the Load*Config functions to Parse*Config, since they don't
actually load the config files anymore.

This relands https://r.android.com/1211982.

Bug: 145934348
Test: m
Change-Id: Icb9332a93811d77d2d8b06e983b92501b180a358
2020-02-13 17:46:48 +00:00