blob: 8723d20ff38520987092b866b5808aeda464c8b8 [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.
package {
// See: http://go/android-license-faq
// A large-scale-change added 'default_applicable_licenses' to import
// all of the 'license_kinds' from "art_license"
// to get the below license kinds:
// SPDX-license-identifier-Apache-2.0
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.
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 ART_MODULE_BUILD_FROM_SOURCE is true
enabled: false,
soong_config_variables: {
source_build: {
enabled: true,
},
},
prebuilt_visibility: prebuilt_visibility,
traits: {
native_bridge_support: [
"jni_headers",
],
ramdisk_image_required: [
"jni_headers",
],
recovery_image_required: [
"jni_headers",
],
},
target: {
// Both android and host linux but not windows or darwin.
linux: {
native_header_libs: [
"jni_headers",
"libartpalette-headers",
"libnativehelper_header_only",
"libopenjdkjvmti_headers",
"odrefresh_headers",
],
native_shared_libs: [
"libandroidio",
"libdexfile",
"libnativebridge",
"libnativehelper",
"libnativeloader",
"libsigchain",
],
native_static_libs: [
"libdexfile_support",
"libdexfile_static",
"libnativehelper_lazy",
],
},
android: {
apexes: [
// Adds exportable dependencies of the API to the sdk,
// e.g. *classpath_fragments.
"com.android.art",
],
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",
// A special form or "core-lambda-stubs" for use in
// java_system_modules.
"core-lambda-stubs-for-system-modules",
// Needed when javac compiles code containing @Generated
// annotations produced by some code generation tools.
"core-generated-annotation-stubs",
],
java_sdk_libs: [
"art.module.public.api",
],
java_system_modules: [
"art-module-public-api-stubs-system-modules",
"art-module-lib-api-stubs-system-modules",
"art-module-intra-core-api-stubs-system-modules",
],
native_header_libs: [
"libnativeloader-headers",
],
native_shared_libs: [
"libnativebridge_lazy",
"libnativehelper_compat_libc++",
"libnativeloader_lazy",
],
},
linux_bionic: {
enabled: false,
},
darwin: {
enabled: false,
},
},
}
// Exported host tools and libraries.
art_module_exports {
name: "art-module-host-exports",
host_supported: true,
// Enable if ART_MODULE_BUILD_FROM_SOURCE is true
enabled: false,
soong_config_variables: {
source_build: {
enabled: true,
},
},
prebuilt_visibility: prebuilt_visibility,
target: {
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",
],
native_binaries: [
"dex2oat",
"dex2oatd",
"dexdump",
"hiddenapi",
"oatdump",
"profman",
"veridex",
],
native_libs: [
// libdexfile dependencies for host tests.
// TODO(b/178691801): Support transitive internal library
// dependencies in module_export snapshots and clean this up.
"libartpalette",
"libartbase",
],
},
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 ART_MODULE_BUILD_FROM_SOURCE 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-for-host",
"okhttp-for-host",
// 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",
],
native_static_libs: [
// TODO(b/187288515): Providing this as a prebuilt introduces an issue
// with sdk_version propagation. Temporarily use the source library
// instead.
//"libctstiagent",
],
}