summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
author Martin Stjernholm <mast@google.com> 2024-09-30 20:00:57 +0100
committer Martin Stjernholm <mast@google.com> 2024-10-03 20:13:57 +0100
commit600794a64c683ed0ac70ea971e241bb72f0797c5 (patch)
tree987d0da908b53c554529d3f1e829e9a212a82fab
parentd6ce14941e1d861b86f6326059abe7ed4d19eaa0 (diff)
Consolidate various APEX properties to the ART shared defaults.
This doesn't change any of the APEXes except test_broken_com.android.art, which now becomes a more complete APEX with binaries, javalibs, and etc files. We rely on unwanted_transitive_deps to avoid pulling in the non-broken libart.so into it, so it no longer needs quite as much special treatment. #codehealth Test: art/build/apex/runtests.sh Test: lunch armv8 m test_broken_com.android.art test_jitzygote_com.android.art \ test_imgdiag_com.android.art com.android.art \ com.android.art.debug com.android.art.testing Check that the .apex files change in the expected way. Test: atest art-apex-update-rollback Change-Id: I1ddf7f41bf5e6a4927e31ac842fc296acde7c910
-rw-r--r--build/apex/Android.bp89
1 files changed, 30 insertions, 59 deletions
diff --git a/build/apex/Android.bp b/build/apex/Android.bp
index ca66c3bef2..6164205d20 100644
--- a/build/apex/Android.bp
+++ b/build/apex/Android.bp
@@ -152,18 +152,10 @@ apex_key {
private_key: "com.android.art.pem",
}
-// Default shared by all ART APEXes.
-apex_defaults {
- name: "com.android.art-base-defaults",
-
- target: {
- windows: {
- // When the Soong config variable above sets enabled:true, it
- // overrides the default false for targets, so we need to disable
- // windows explicitly.
- enabled: false,
- },
- },
+linker_config {
+ name: "art-linker-config",
+ src: "linker.config.json",
+ installable: false,
}
prebuilt_etc {
@@ -173,20 +165,28 @@ prebuilt_etc {
installable: false,
}
-// Default values shared by APEXes except test_broken_com.android.art.
+// Default shared by all ART APEXes.
apex_defaults {
- name: "com.android.art-defaults-minus-odrefresh",
- defaults: [
- "com.android.art-base-defaults",
- "s-launched-apex-module",
- ],
- compile_multilib: "both",
+ name: "com.android.art-base-defaults",
+ defaults: ["s-launched-apex-module"],
+
manifest: "manifest-art.json",
+ key: "com.android.art.key",
+ certificate: ":com.android.art.certificate",
bootclasspath_fragments: ["art-bootclasspath-fragment"],
systemserverclasspath_fragments: ["art-systemserverclasspath-fragment"],
compat_configs: ["libcore-platform-compat-config"],
- native_shared_libs: art_runtime_base_native_shared_libs +
- libcore_native_shared_libs,
+ required: [
+ "com.android.i18n",
+ ],
+ prebuilts: [
+ "art-linker-config",
+ "com.android.art.init.rc",
+ "current_sdkinfo",
+ ],
+
+ compile_multilib: "both",
+
multilib: {
both: {
binaries: art_runtime_binaries_both,
@@ -198,15 +198,14 @@ apex_defaults {
],
},
},
- key: "com.android.art.key",
- required: [
- "com.android.i18n",
- ],
- prebuilts: [
- "art-linker-config",
- "com.android.art.init.rc",
- "current_sdkinfo",
- ],
+}
+
+// Default values shared by APEXes except test_broken_com.android.art.
+apex_defaults {
+ name: "com.android.art-defaults-minus-odrefresh",
+ defaults: ["com.android.art-base-defaults"],
+ native_shared_libs: art_runtime_base_native_shared_libs +
+ libcore_native_shared_libs,
}
// Default values shared by Release, Debug, and Testing APEXes.
@@ -248,28 +247,13 @@ apex_defaults {
// `libart-broken` instead of `libart`.
apex_test {
name: "test_broken_com.android.art",
- // Use of "s-launched-apex-module" does not imply that this is a released
- // module.
- defaults: [
- "com.android.art-base-defaults",
- "s-launched-apex-module",
- ],
+ defaults: ["com.android.art-base-defaults"],
- // Only include native libraries in this test APEX. The intention
- // was to not include binaries (and maybe other artifacts) for now,
- // as they'd pull the "non-broken" `libart` module into this test
- // APEX and overwrite `libart-broken`. However, with
- // unwanted_transitive_deps we can ensure `libart` gets excluded
- // anyway.
- // TODO(mast): Add back the binaries and clean this up.
native_shared_libs: art_runtime_base_broken_native_shared_libs + libcore_native_shared_libs,
unwanted_transitive_deps: ["libart"],
- compile_multilib: "both",
- key: "com.android.art.key",
manifest: "test_apex_manifest.json",
file_contexts: ":com.android.art-file_contexts",
- certificate: ":com.android.art.certificate",
installable: false,
compressible: false,
}
@@ -282,10 +266,8 @@ apex_test {
binaries: ["odrefresh_broken"],
},
},
- key: "com.android.art.key",
manifest: "test_apex_manifest.json",
file_contexts: ":com.android.art-file_contexts",
- certificate: ":com.android.art.certificate",
installable: false,
}
@@ -299,10 +281,8 @@ apex_test {
binaries: ["imgdiag"],
},
},
- key: "com.android.art.key",
manifest: "test_apex_manifest.json",
file_contexts: ":com.android.art-file_contexts",
- certificate: ":com.android.art.certificate",
installable: false,
}
@@ -312,7 +292,6 @@ apex_test {
apex {
name: "com.android.art",
defaults: ["com.android.art-defaults"],
- certificate: ":com.android.art.certificate",
visibility: [
"//art/build/sdk",
"//packages/modules/common/build",
@@ -325,7 +304,6 @@ apex {
apex {
name: "com.android.art.debug",
defaults: ["com.android.art-devel-defaults"],
- certificate: ":com.android.art.certificate",
visibility: [
"//packages/modules/common/build",
],
@@ -364,7 +342,6 @@ apex_test {
name: "com.android.art.testing",
defaults: ["com.android.art-devel-defaults"],
file_contexts: ":com.android.art.debug-file_contexts",
- certificate: ":com.android.art.certificate",
tests: art_gtests,
binaries: ["signal_dumper"], // Need signal_dumper for run-tests.
// Mark this test APEX as non-updatable, as its contains
@@ -481,12 +458,6 @@ cc_prebuilt_binary {
srcs: [":art-check-testing-apex-gen"],
}
-linker_config {
- name: "art-linker-config",
- src: "linker.config.json",
- installable: false,
-}
-
// sdk module types have 3 (maybe 4 for windows?) variants: linux, android, and common_os.
// common_os depends on the linux/android variants and packages their artifacts into a zip file.
// We want access to that zip file in art_release_zip, so we need to depend on only the common_os