Skip to content

Commit

Permalink
Clean up source_build Soong config variables.
Browse files Browse the repository at this point in the history
They no longer have any effect after the removal of the
ART_MODULE_BUILD_FROM_SOURCE build variable (b/308188056).

Test: m nothing
Bug: 335854415
Change-Id: Ibe30b24defe8c63d2c0baab1ecebbf72cd970f74
  • Loading branch information
marstj committed May 13, 2024
1 parent 8ad286a commit df673f5
Show file tree
Hide file tree
Showing 18 changed files with 12 additions and 616 deletions.
1 change: 0 additions & 1 deletion artd/Android.bp
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,6 @@ cc_fuzz {
name: "artd_fuzzer",
defaults: [
"service_fuzzer_defaults",
"art_module_source_build_defaults",
"artd_defaults",
// Fuzzer is on a special variant, different from the APEX variant. When
// linking against "libdexfile" as a shared library, the build system
Expand Down
73 changes: 1 addition & 72 deletions build/Android.bp
Original file line number Diff line number Diff line change
Expand Up @@ -80,15 +80,10 @@ soong_config_module_type_import {
from: "art/build/SoongConfig.bp",
module_types: [
"art_debug_defaults",
"art_module_art_global_defaults",
"art_module_cc_defaults",
"art_module_java_defaults",
"art_module_genrule_defaults",
"art_module_prebuilt_defaults",
],
}

art_module_art_global_defaults {
art_global_defaults {
// Additional flags are computed by art.go

name: "art_defaults",
Expand Down Expand Up @@ -368,69 +363,3 @@ java_library {
},
},
}

// Defaults for different module types to enable them only when building ART
// from sources. TODO(b/172480617): Clean up when sources are gone from the
// platform tree and we no longer need to support sources present when prebuilts
// are used.
// TODO(b/335854415): Remove the defaults module
art_module_cc_defaults {
name: "art_module_source_build_defaults",
defaults_visibility: [
"//art:__subpackages__",
"//libcore:__subpackages__",
"//libnativehelper:__subpackages__",
],
target: {
windows: {
// Windows is disabled by default, but if we set enabled:true
// globally above we need to disable it explicitly.
enabled: false,
},
},
}

// TODO(b/335854415): Remove the defaults module
art_module_java_defaults {
name: "art_module_source_build_java_defaults",
defaults_visibility: [
"//art:__subpackages__",
"//libcore:__subpackages__",
"//libnativehelper:__subpackages__",
],
target: {
windows: {
enabled: false,
},
},
}

// TODO(b/335854415): Remove the defaults module
art_module_genrule_defaults {
name: "art_module_source_build_genrule_defaults",
defaults_visibility: [
"//art:__subpackages__",
"//libcore:__subpackages__",
"//libnativehelper:__subpackages__",
],
target: {
windows: {
enabled: false,
},
},
}

// TODO(b/335854415): Remove the defaults module
art_module_prebuilt_defaults {
name: "art_module_source_build_prebuilt_defaults",
defaults_visibility: [
"//art:__subpackages__",
"//libcore:__subpackages__",
"//libnativehelper:__subpackages__",
],
target: {
windows: {
enabled: false,
},
},
}
89 changes: 0 additions & 89 deletions build/SoongConfig.bp
Original file line number Diff line number Diff line change
@@ -1,95 +1,6 @@
// Set up Soong config variables.
// https://android.googlesource.com/platform/build/soong/+/master/README.md#soong-config-variables

// art/ modules are no longer disabled even when prebuilt art apex and prebuilt module sdk is used.
// TODO(b/335854415): Remove the defaults module.
soong_config_bool_variable {
name: "source_build",
}

soong_config_module_type {
name: "art_module_art_global_defaults",
module_type: "art_global_defaults",
config_namespace: "art_module",
bool_variables: ["source_build"],
properties: ["enabled"],
}

soong_config_module_type {
name: "art_module_apex_defaults",
module_type: "apex_defaults",
config_namespace: "art_module",
bool_variables: ["source_build"],
properties: ["enabled"],
}

soong_config_module_type {
name: "art_module_cc_defaults",
module_type: "cc_defaults",
config_namespace: "art_module",
bool_variables: ["source_build"],
properties: [
"enabled",
"target.android.test_for",
],
}

soong_config_module_type {
name: "art_module_cc_genrule",
module_type: "cc_genrule",
config_namespace: "art_module",
bool_variables: ["source_build"],
properties: ["enabled"],
}

soong_config_module_type {
name: "art_module_exports",
module_type: "module_exports",
config_namespace: "art_module",
bool_variables: ["source_build"],
properties: ["enabled"],
}

soong_config_module_type {
name: "art_module_java_defaults",
module_type: "java_defaults",
config_namespace: "art_module",
bool_variables: ["source_build"],
properties: ["enabled"],
}

soong_config_module_type {
name: "art_module_genrule_defaults",
module_type: "genrule_defaults",
config_namespace: "art_module",
bool_variables: ["source_build"],
properties: ["enabled"],
}

soong_config_module_type {
name: "art_module_prebuilt_defaults",
module_type: "prebuilt_defaults",
config_namespace: "art_module",
bool_variables: ["source_build"],
properties: ["enabled"],
}

soong_config_module_type {
name: "art_module_sdk",
module_type: "sdk",
config_namespace: "art_module",
bool_variables: ["source_build"],
properties: ["enabled"],
}

soong_config_module_type {
name: "art_module_sh_binary",
module_type: "sh_binary",
config_namespace: "art_module",
bool_variables: ["source_build"],
properties: ["enabled"],
}

soong_config_module_type {
name: "art_debug_defaults",
module_type: "cc_defaults",
Expand Down
15 changes: 2 additions & 13 deletions build/apex/Android.bp
Original file line number Diff line number Diff line change
Expand Up @@ -12,14 +12,6 @@ package {
default_applicable_licenses: ["art_license"],
}

soong_config_module_type_import {
from: "art/build/SoongConfig.bp",
module_types: [
"art_module_apex_defaults",
"art_module_cc_defaults",
],
}

// Binaries for which both 32- and 64-bit versions are built, if possible.
art_runtime_binaries_both = [
"dalvikvm",
Expand Down Expand Up @@ -168,7 +160,7 @@ apex_key {
}

// Default shared by all ART APEXes.
art_module_apex_defaults {
apex_defaults {
name: "com.android.art-base-defaults",

target: {
Expand Down Expand Up @@ -411,7 +403,6 @@ art_check_apex_gen_stem = "$(location art-apex-tester)" +
// (even when APEX flattening is enabled).
genrule_defaults {
name: "art-check-apex-gen-defaults",
defaults: ["art_module_source_build_genrule_defaults"],
tools: [
"art-apex-tester",
"deapexer",
Expand All @@ -420,7 +411,7 @@ genrule_defaults {
],
}

art_module_cc_defaults {
cc_defaults {
name: "art-check-apex-gen-fakebin-defaults",
host_supported: true,
device_supported: false,
Expand Down Expand Up @@ -499,7 +490,6 @@ linker_config {
// 1 variant, we can then depend on it from a different type of genrule like regular genrule.
sdk_genrule {
name: "art-module-host-exports-for-genrule",
defaults: ["art_module_source_build_genrule_defaults"],
srcs: [":art-module-host-exports"],
out: ["art-module-host-exports-current.zip"],
cmd: "cp $(in) $(out)",
Expand All @@ -509,7 +499,6 @@ sdk_genrule {
// At the time of writing, this is only for Compiler Explorer (https://godbolt.org).
genrule {
name: "art_release_zip",
defaults: ["art_module_source_build_genrule_defaults"],
srcs: [
":art-module-host-exports-for-genrule",
":com.android.art",
Expand Down
14 changes: 3 additions & 11 deletions build/sdk/Android.bp
Original file line number Diff line number Diff line change
Expand Up @@ -21,14 +21,6 @@ package {
default_applicable_licenses: ["art_license"],
}

soong_config_module_type_import {
from: "art/build/SoongConfig.bp",
module_types: [
"art_module_sdk",
"art_module_exports",
],
}

// Additional visibility to add to the prebuilt modules that are part of
// the snapshots of the ART sdk/module_exports to ensure that they are
// visible to each other.
Expand All @@ -39,7 +31,7 @@ prebuilt_visibility = [
]

// The SDK for the art module apex.
art_module_sdk {
sdk {
name: "art-module-sdk",
host_supported: true,

Expand Down Expand Up @@ -140,7 +132,7 @@ art_module_sdk {
}

// Exported host tools and libraries.
art_module_exports {
module_exports {
name: "art-module-host-exports",
host_supported: true,

Expand Down Expand Up @@ -188,7 +180,7 @@ art_module_exports {
}

// Exported tests and supporting libraries
art_module_exports {
module_exports {
name: "art-module-test-exports",

prebuilt_visibility: prebuilt_visibility,
Expand Down
1 change: 0 additions & 1 deletion dexopt_chroot_setup/Android.bp
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,6 @@ cc_fuzz {
name: "dexopt_chroot_setup_fuzzer",
defaults: [
"service_fuzzer_defaults",
"art_module_source_build_defaults",
"dexopt_chroot_setup_defaults",
],
srcs: ["dexopt_chroot_setup_fuzzer.cc"],
Expand Down
5 changes: 0 additions & 5 deletions libartservice/service/Android.bp
Original file line number Diff line number Diff line change
Expand Up @@ -231,11 +231,6 @@ android_test {
"javatests/**/*.java",
],

// disable the target when prebuilt modules are used
defaults: [
"art_module_source_build_java_defaults",
],

libs: [
"sdk_module-lib_current_framework-configinfrastructure",
],
Expand Down
7 changes: 0 additions & 7 deletions libdexfile/Android.bp
Original file line number Diff line number Diff line change
Expand Up @@ -377,9 +377,6 @@ cc_library_headers {

art_cc_defaults {
name: "art_libdexfile_external_tests_defaults",
defaults: [
"art_module_source_build_defaults",
],
test_suites: ["general-tests"],
srcs: [
"external/dex_file_ext_c_test.c",
Expand Down Expand Up @@ -459,9 +456,6 @@ art_cc_library_static {

art_cc_defaults {
name: "art_libdexfile_support_tests_defaults",
defaults: [
"art_module_source_build_defaults",
],
test_suites: ["general-tests"],
srcs: [
"external/dex_file_supp_test.cc",
Expand Down Expand Up @@ -538,7 +532,6 @@ art_cc_test {
name: "art_libdexfile_support_static_tests",
test_suites: ["general-tests"],
defaults: [
"art_module_source_build_defaults",
"art_test_defaults",
"libdexfile_support_static_defaults",
],
Expand Down
1 change: 0 additions & 1 deletion libnativeloader/Android.bp
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,6 @@ cc_library {
art_cc_test {
name: "libnativeloader_test",
defaults: [
"art_module_source_build_defaults",
// Cannot use art_standalone_gtest_defaults because it makes us link
// libnativebridge statically through libart-gtest, but we need to mock
// its symbols here.
Expand Down
3 changes: 0 additions & 3 deletions libnativeloader/test/Android.bp
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,6 @@ cc_library {
// library in the host test. It's not actually installed or started.
android_test_helper_app {
name: "library_container_app",
defaults: ["art_module_source_build_java_defaults"],
min_sdk_version: "31",
manifest: "library_container_app_manifest.xml",
compile_multilib: "both",
Expand Down Expand Up @@ -120,7 +119,6 @@ java_library {

java_defaults {
name: "loadlibrarytest_app_defaults",
defaults: ["art_module_source_build_java_defaults"],
min_sdk_version: "31",
// Don't let targetSdkVersion become the latest codename, because
// PackageManager refuses to install the app on released platform images
Expand Down Expand Up @@ -188,7 +186,6 @@ android_test_helper_app {

java_test_host {
name: "libnativeloader_e2e_tests",
defaults: ["art_module_source_build_java_defaults"],
srcs: ["src/android/test/hostside/*.java"],
libs: [
"compatibility-tradefed",
Expand Down
Loading

0 comments on commit df673f5

Please sign in to comment.