blob: 5991b4f43e12b78ca84dc8c5d6cc6ddba5be8b9c [file] [log] [blame]
// Copyright (C) 2020 The Android Open Source Project
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the 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.
prebuilt_visibility = [
// TODO(b/155921753): Restrict this when prebuilts are in their proper
// locations.
"//prebuilts:__subpackages__",
]
// The SDK for the art module apex.
art_module_sdk {
name: "art-module-sdk",
host_supported: true,
// Enable if SOONG_CONFIG_art_module_source_build is true.
enabled: false,
soong_config_variables: {
source_build: {
enabled: true,
},
},
prebuilt_visibility: prebuilt_visibility,
target: {
// Both android and host linux but not windows or darwin.
linux: {
native_header_libs: [
"jni_headers",
"libartpalette-headers",
"libnativehelper_header_only",
"libopenjdkjvmti_headers",
],
native_shared_libs: [
"libandroidio",
"libdexfile_external",
"libnativebridge",
"libnativehelper",
"libnativeloader",
],
native_libs: [
"libdexfile_support",
// TODO(b/142944043): Convert to APEX stubs and export as a shared lib, once linker support is in place.
"libsigchain",
],
native_static_libs: [
"libdexfile_external_static",
"libnativehelper_lazy",
],
},
android: {
// Create placeholder java_import prebuilts for the java boot libraries so that Soong
// can retrieve their dex implementation jars from the associated prebuilt_apex. All
// libraries listed in the exported_java_libs property of the ART apex (see
// packages/modules/ArtPrebuilt) must have a prebuilt provided by this sdk or one of
// the ART module_exports. Those java boot libraries which do not require a prebuilt for
// another reason, e.g. test, are listed here.
java_boot_libs: [
"apache-xml",
"bouncycastle",
"core-oj",
// The following are boot libs that are provided as java_libs in
// art-module-test-exports.
// "core-libart",
// "okhttp",
],
java_header_libs: [
// Needed by any module that builds against any non-numeric
// sdk_version other than "none".
//
// This is actually only used for compiling Java 8 and kotlin.
// Java 9 uses system modules which encapsulates this
// internally.
"core-lambda-stubs",
// Needed by any module that builds against any non-numeric
// sdk_version other than "none" or "core_platform".
//
// This is actually only used for compiling Java 8 and kotlin.
// Java 9 uses system modules which encapsulates this
// internally.
"core.current.stubs",
// Needed by any module that builds against an sdk_version of
// "core_platform".
//
// This is actually only used for compiling Java 8 and kotlin.
// Java 9 uses system modules which encapsulates this
// internally.
"legacy.core.platform.api.stubs",
"stable.core.platform.api.stubs",
],
java_sdk_libs: [
"art.module.public.api",
],
java_system_modules: [
"art-module-public-api-stubs-system-modules",
"art-module-intra-core-api-stubs-system-modules",
"legacy-art-module-platform-api-stubs-system-modules",
"stable-art-module-platform-api-stubs-system-modules",
"core-current-stubs-system-modules",
"legacy-core-platform-api-stubs-system-modules",
"stable-core-platform-api-stubs-system-modules",
],
native_header_libs: [
"libnativeloader-headers",
],
native_shared_libs: [
"libnativebridge_lazy",
"libnativehelper_compat_libc++",
"libnativeloader_lazy",
],
native_static_libs: [
"libctstiagent",
],
},
linux_bionic: {
enabled: false,
},
darwin: {
enabled: false,
},
},
}
// Exported host tools and libraries.
art_module_exports {
name: "art-module-host-exports",
host_supported: true,
// TODO(b/173186484) - remove once art-notices-for-framework-stubs-jar has been removed.
device_supported: true,
// Enable if SOONG_CONFIG_art_module_source_build is true.
enabled: false,
soong_config_variables: {
source_build: {
enabled: true,
},
},
prebuilt_visibility: prebuilt_visibility,
target: {
android: {
java_libs: [
// TODO(b/173186484) - embed notices in stubs and remove this.
// Needed for android_stubs_current et al.
"art-notices-for-framework-stubs-jar",
],
},
host: {
// Set in target.host because the top level compile_multilib
// property is fixed to "both" in the sdk/module_exports
// implementation and cannot be overridden any other way.
compile_multilib: "64",
java_libs: [
"art.module.api.annotations",
// Needed for grpc-grpc-java
"okhttp-norepackage",
],
native_binaries: [
"hiddenapi",
"dex2oat",
"dex2oatd",
],
},
linux_bionic: {
enabled: false,
},
darwin: {
enabled: false,
},
windows: {
enabled: false,
},
},
}
// Exported tests and supporting libraries
art_module_exports {
name: "art-module-test-exports",
// Enable if SOONG_CONFIG_art_module_source_build is true.
enabled: false,
soong_config_variables: {
source_build: {
enabled: true,
},
},
prebuilt_visibility: prebuilt_visibility,
java_libs: [
"core-compat-test-rules",
"core-test-rules",
"core-tests-support",
"okhttp-tests-nojarjar",
// Needed for CtsJvmtiDeviceRunTestAppBase.
"art_cts_jvmti_test_library",
"expected_cts_outputs",
// Needed for robolectric.
"core-libart",
"okhttp",
// Needed for CtsLibcore...TestCases
"libcore-expectations-knownfailures-jar",
"libcore-expectations-virtualdeviceknownfailures-jar",
// Needed for CtsLibcoreOkHttpTestCases
"okhttp-nojarjar",
],
java_tests: [
// Needed for CtsJdwpTestCases.
"apache-harmony-jdwp-tests",
"libcore-crypto-tests",
// Needed for CtsLibcoreOjTestCases
"core-ojtests-public",
// Needed for CtsLibcoreJsr166TestCases
"jsr166-tests",
// Needed for CtsLibcoreTestCases
"apache-harmony-tests",
"core-tests",
],
native_shared_libs: [
"libjavacoretests",
],
}