4416e5db69
Nothing changes if BOARD_VNDK_VERSION isn't set. When the VNDK is enabled (BOARD_VNDK_VERSION in Make), this will split /system and /vendor modules into two different variant spaces that can't link to each other. There are a few interfaces between the two variant spaces: The `llndk_library` stubs will be available in the /vendor variant, but won't be installed, so at runtime the /system variant will be used. Setting `vendor_available: true` will split a module into both variants. The /system (or "core") variant will compile just like today. The /vendor ("vendor") variant will compile against everything else in the vendor space (so LL-NDK instead of libc/liblog/etc). There will be two copies of these libraries installed onto the final device. Since the available runtime interfaces for vendor modules may be reduced, and your dependencies may not expose their private interfaces, we allow the vendor variants to reduce their compilation set, and export a different set of headers: cc_library { name: "libfoo", srcs: ["common.cpp", "private_impl.cpp"], export_include_dirs: ["include"], target: { vendor: { export_include_dirs: ["include_vndk"], exclude_srcs: ["private_impl.cpp"], srcs: ["vendor_only.cpp"], }, }, } So the "core" variant would compile with both "common.cpp" and "private_impl.cpp", and export "include". The "vendor" variant would compile "common.cpp" and "vendor_only.cpp", and export "include_vndk". Bug: 36426473 Bug: 36079834 Test: out/soong/build.ninja, out/soong/Android- only changes due to _core addition and .llndk -> .vendor Test: attempt to compile with BOARD_VNDK_VERSION:=current Change-Id: Idef28764043bf6c33dc0d2e7e2026c38867ff769
273 lines
5.6 KiB
Text
273 lines
5.6 KiB
Text
//
|
|
// WARNING: Modifying this file will NOT automatically regenerate build.ninja.in!
|
|
//
|
|
// Before modifying this file make sure minibp is up to date:
|
|
// 1) "repo sync build/soong" to make sure you have the latest build.ninja.in
|
|
// 2) build minibp, which builds automicatically through the normal build steps. For example:
|
|
//
|
|
// After modifying this file regenerate build.ninja.in and build your changes:
|
|
// 1) In your build directory, execute "../bootstrap.bash -r" to regenerate build.ninja.in
|
|
// 2) Build again
|
|
//
|
|
|
|
subdirs = [
|
|
"androidmk",
|
|
"cmd/*",
|
|
"third_party/zip",
|
|
"ui/*",
|
|
]
|
|
|
|
bootstrap_go_package {
|
|
name: "soong-env",
|
|
pkgPath: "android/soong/env",
|
|
srcs: [
|
|
"env/env.go",
|
|
],
|
|
}
|
|
|
|
bootstrap_go_package {
|
|
name: "soong",
|
|
pkgPath: "android/soong",
|
|
deps: [
|
|
"blueprint",
|
|
],
|
|
srcs: [
|
|
"doc.go",
|
|
],
|
|
}
|
|
|
|
bootstrap_go_package {
|
|
name: "soong-android",
|
|
pkgPath: "android/soong/android",
|
|
deps: [
|
|
"blueprint",
|
|
"blueprint-bootstrap",
|
|
"soong",
|
|
"soong-env",
|
|
],
|
|
srcs: [
|
|
"android/androidmk.go",
|
|
"android/api_levels.go",
|
|
"android/arch.go",
|
|
"android/config.go",
|
|
"android/defaults.go",
|
|
"android/defs.go",
|
|
"android/expand.go",
|
|
"android/hooks.go",
|
|
"android/makevars.go",
|
|
"android/module.go",
|
|
"android/mutator.go",
|
|
"android/onceper.go",
|
|
"android/package_ctx.go",
|
|
"android/paths.go",
|
|
"android/prebuilt.go",
|
|
"android/register.go",
|
|
"android/util.go",
|
|
"android/variable.go",
|
|
|
|
// Lock down environment access last
|
|
"android/env.go",
|
|
],
|
|
testSrcs: [
|
|
"android/expand_test.go",
|
|
"android/paths_test.go",
|
|
"android/prebuilt_test.go",
|
|
],
|
|
}
|
|
|
|
bootstrap_go_package {
|
|
name: "soong-cc-config",
|
|
pkgPath: "android/soong/cc/config",
|
|
deps: [
|
|
"soong-android",
|
|
],
|
|
srcs: [
|
|
"cc/config/clang.go",
|
|
"cc/config/global.go",
|
|
"cc/config/tidy.go",
|
|
"cc/config/toolchain.go",
|
|
|
|
"cc/config/arm_device.go",
|
|
"cc/config/arm64_device.go",
|
|
"cc/config/mips_device.go",
|
|
"cc/config/mips64_device.go",
|
|
"cc/config/x86_device.go",
|
|
"cc/config/x86_64_device.go",
|
|
|
|
"cc/config/x86_darwin_host.go",
|
|
"cc/config/x86_linux_host.go",
|
|
"cc/config/x86_linux_bionic_host.go",
|
|
"cc/config/x86_windows_host.go",
|
|
],
|
|
testSrcs: [
|
|
"cc/config/tidy_test.go",
|
|
],
|
|
}
|
|
|
|
bootstrap_go_package {
|
|
name: "soong-cc",
|
|
pkgPath: "android/soong/cc",
|
|
deps: [
|
|
"blueprint",
|
|
"blueprint-pathtools",
|
|
"soong",
|
|
"soong-android",
|
|
"soong-cc-config",
|
|
"soong-genrule",
|
|
],
|
|
srcs: [
|
|
"cc/androidmk.go",
|
|
"cc/builder.go",
|
|
"cc/cc.go",
|
|
"cc/check.go",
|
|
"cc/coverage.go",
|
|
"cc/gen.go",
|
|
"cc/makevars.go",
|
|
"cc/prebuilt.go",
|
|
"cc/proto.go",
|
|
"cc/relocation_packer.go",
|
|
"cc/sanitize.go",
|
|
"cc/stl.go",
|
|
"cc/strip.go",
|
|
"cc/tidy.go",
|
|
"cc/util.go",
|
|
|
|
"cc/cmakelists.go",
|
|
"cc/compiler.go",
|
|
"cc/installer.go",
|
|
"cc/linker.go",
|
|
|
|
"cc/binary.go",
|
|
"cc/library.go",
|
|
"cc/object.go",
|
|
"cc/test.go",
|
|
"cc/toolchain_library.go",
|
|
|
|
"cc/ndk_prebuilt.go",
|
|
"cc/ndk_headers.go",
|
|
"cc/ndk_library.go",
|
|
"cc/ndk_sysroot.go",
|
|
|
|
"cc/llndk_library.go",
|
|
],
|
|
testSrcs: [
|
|
"cc/cc_test.go",
|
|
"cc/test_data_test.go",
|
|
],
|
|
pluginFor: ["soong_build"],
|
|
}
|
|
|
|
bootstrap_go_package {
|
|
name: "soong-genrule",
|
|
pkgPath: "android/soong/genrule",
|
|
deps: [
|
|
"blueprint",
|
|
"blueprint-pathtools",
|
|
"soong",
|
|
"soong-android",
|
|
],
|
|
srcs: [
|
|
"genrule/filegroup.go",
|
|
"genrule/genrule.go",
|
|
],
|
|
pluginFor: ["soong_build"],
|
|
}
|
|
|
|
bootstrap_go_package {
|
|
name: "soong-phony",
|
|
pkgPath: "android/soong/phony",
|
|
deps: [
|
|
"blueprint",
|
|
"soong-android",
|
|
],
|
|
srcs: [
|
|
"phony/phony.go",
|
|
],
|
|
pluginFor: ["soong_build"],
|
|
}
|
|
|
|
bootstrap_go_package {
|
|
name: "soong-java",
|
|
pkgPath: "android/soong/java",
|
|
deps: [
|
|
"blueprint",
|
|
"blueprint-pathtools",
|
|
"soong",
|
|
"soong-android",
|
|
"soong-genrule",
|
|
],
|
|
srcs: [
|
|
"java/androidmk.go",
|
|
"java/app_builder.go",
|
|
"java/app.go",
|
|
"java/builder.go",
|
|
"java/gen.go",
|
|
"java/java.go",
|
|
"java/resources.go",
|
|
],
|
|
pluginFor: ["soong_build"],
|
|
}
|
|
|
|
//
|
|
// Defaults to enable various configurations of host bionic
|
|
//
|
|
|
|
cc_defaults {
|
|
name: "linux_bionic_supported",
|
|
host_supported: true,
|
|
target: {
|
|
host: {
|
|
enabled: false,
|
|
},
|
|
linux_bionic: {
|
|
enabled: true,
|
|
},
|
|
},
|
|
}
|
|
|
|
//
|
|
// C static libraries extracted from the gcc toolchain
|
|
//
|
|
|
|
toolchain_library {
|
|
name: "libatomic",
|
|
defaults: ["linux_bionic_supported"],
|
|
vendor_available: true,
|
|
arch: {
|
|
arm: {
|
|
instruction_set: "arm",
|
|
},
|
|
},
|
|
}
|
|
|
|
toolchain_library {
|
|
name: "libgcc",
|
|
defaults: ["linux_bionic_supported"],
|
|
vendor_available: true,
|
|
arch: {
|
|
arm: {
|
|
instruction_set: "arm",
|
|
},
|
|
},
|
|
}
|
|
|
|
toolchain_library {
|
|
name: "libwinpthread",
|
|
host_supported: true,
|
|
enabled: false,
|
|
target: {
|
|
windows: {
|
|
enabled: true
|
|
},
|
|
},
|
|
}
|
|
|
|
toolchain_library {
|
|
name: "libgcov",
|
|
defaults: ["linux_bionic_supported"],
|
|
arch: {
|
|
arm: {
|
|
instruction_set: "arm",
|
|
},
|
|
},
|
|
}
|