Add visibilities for prebuilts.
These visibilities are intentionally blunt, to allow the prebuilts to
move around for now.
Many of these visibilities may also go away completely again if the
exported binaries are changed to compile internal ART libraries
statically.
Test: v
1. build/soong/scripts/build-aml-prebuilts.sh art-module-sdk \
art-module-test-exports conscrypt-module-sdk \
conscrypt-module-test-exports conscrypt-module-host-exports \
art-module-host-exports
2. Unzip out/aml/soong/mainline-sdks/*.zip into separate
subdirectories under prebuilts/runtime
3. env SOONG_ALLOW_MISSING_DEPENDENCIES=true m nothing
(together with the topic of https://r.android.com/1252167)
Bug: 155921753
Change-Id: Id8bbc8aedb0b87e30e9cf3d2a9f34b33cb71756c
diff --git a/compiler/Android.bp b/compiler/Android.bp
index 7d31ef8..0d306d7 100644
--- a/compiler/Android.bp
+++ b/compiler/Android.bp
@@ -22,6 +22,12 @@
art_cc_defaults {
name: "libart-compiler-defaults",
defaults: ["art_defaults"],
+ visibility: [
+ // Visibility for prebuilt binaries from the prebuilt of this module.
+ // TODO(b/155921753): Restrict this when prebuilts are in their proper
+ // locations.
+ "//prebuilts:__subpackages__",
+ ],
host_supported: true,
srcs: [
"compiled_method.cc",
diff --git a/dexlayout/Android.bp b/dexlayout/Android.bp
index cd40620..ccdfd78 100644
--- a/dexlayout/Android.bp
+++ b/dexlayout/Android.bp
@@ -15,6 +15,12 @@
art_cc_defaults {
name: "libart-dexlayout-defaults",
defaults: ["art_defaults"],
+ visibility: [
+ // Visibility for prebuilt binaries from the prebuilt of this module.
+ // TODO(b/155921753): Restrict this when prebuilts are in their proper
+ // locations.
+ "//prebuilts:__subpackages__",
+ ],
host_supported: true,
srcs: [
"compact_dex_writer.cc",
diff --git a/libartbase/Android.bp b/libartbase/Android.bp
index a9d5db2..0f266c5 100644
--- a/libartbase/Android.bp
+++ b/libartbase/Android.bp
@@ -17,6 +17,12 @@
cc_defaults {
name: "libartbase_defaults",
defaults: ["art_defaults"],
+ visibility: [
+ // Visibility for prebuilt binaries from the prebuilt of this module.
+ // TODO(b/155921753): Restrict this when prebuilts are in their proper
+ // locations.
+ "//prebuilts:__subpackages__",
+ ],
host_supported: true,
srcs: [
"arch/instruction_set.cc",
diff --git a/libartpalette/Android.bp b/libartpalette/Android.bp
index b4b2e0b..ce31a79 100644
--- a/libartpalette/Android.bp
+++ b/libartpalette/Android.bp
@@ -17,6 +17,12 @@
cc_defaults {
name: "libartpalette_defaults",
defaults: ["art_defaults"],
+ visibility: [
+ // Visibility for prebuilt binaries from the prebuilt of this module.
+ // TODO(b/155921753): Restrict this when prebuilts are in their proper
+ // locations.
+ "//prebuilts:__subpackages__",
+ ],
host_supported: true,
export_include_dirs: ["include"],
}
diff --git a/libdexfile/Android.bp b/libdexfile/Android.bp
index fcfbef3..c79522d 100644
--- a/libdexfile/Android.bp
+++ b/libdexfile/Android.bp
@@ -17,6 +17,12 @@
cc_defaults {
name: "libdexfile_defaults",
defaults: ["art_defaults"],
+ visibility: [
+ // Visibility for prebuilt dex2oat(d) from the prebuilt of this module.
+ // TODO(b/155921753): Restrict this when prebuilts are in their proper
+ // locations.
+ "//prebuilts:__subpackages__",
+ ],
host_supported: true,
srcs: [
"dex/art_dex_file_loader.cc",
diff --git a/libprofile/Android.bp b/libprofile/Android.bp
index 367eefc..890c70c 100644
--- a/libprofile/Android.bp
+++ b/libprofile/Android.bp
@@ -17,6 +17,12 @@
cc_defaults {
name: "libprofile_defaults",
defaults: ["art_defaults"],
+ visibility: [
+ // Visibility for prebuilt binaries from the prebuilt of this module.
+ // TODO(b/155921753): Restrict this when prebuilts are in their proper
+ // locations.
+ "//prebuilts:__subpackages__",
+ ],
host_supported: true,
srcs: [
"profile/profile_boot_info.cc",
diff --git a/runtime/Android.bp b/runtime/Android.bp
index 318f930..fb7eab3 100644
--- a/runtime/Android.bp
+++ b/runtime/Android.bp
@@ -60,6 +60,12 @@
libart_cc_defaults {
name: "libart_defaults",
defaults: ["art_defaults"],
+ visibility: [
+ // Visibility for prebuilt binaries from the prebuilt of this module.
+ // TODO(b/155921753): Restrict this when prebuilts are in their proper
+ // locations.
+ "//prebuilts:__subpackages__",
+ ],
host_supported: true,
srcs: [
"aot_class_linker.cc",
diff --git a/sigchainlib/Android.bp b/sigchainlib/Android.bp
index 0e25f62..6225e0c 100644
--- a/sigchainlib/Android.bp
+++ b/sigchainlib/Android.bp
@@ -18,6 +18,10 @@
name: "libsigchain",
defaults: ["art_defaults"],
visibility: [
+ // Visibility for prebuilt binaries from the prebuilt of this module.
+ // TODO(b/155921753): Restrict this when prebuilts are in their proper
+ // locations.
+ "//prebuilts:__subpackages__",
// TODO(b/142944043, b/133140750): Clean this up.
"//frameworks/base/cmds/app_process",
],