2016-08-16 06:02:23 +08:00
|
|
|
subdirs = [
|
|
|
|
"androidmk",
|
2017-06-20 06:39:54 +08:00
|
|
|
"bpfix",
|
2016-08-16 06:02:23 +08:00
|
|
|
"cmd/*",
|
|
|
|
"third_party/zip",
|
Add a Go replacement for our top-level Make wrapper
Right now this mostly just copies what Make is doing in
build/core/ninja.mk and build/core/soong.mk. The only major feature it
adds is a rotating log file with some verbose logging.
There is one major functional difference -- you cannot override random
Make variables during the Make phase anymore. The environment variable
is set, and if Make uses ?= or the equivalent, it can still use those
variables. We already made this change for Kati, which also loads all of
the same code and actually does the build, so it has been half-removed
for a while.
The only "UI" this implements is what I'll call "Make Emulation" mode --
it's expected that current command lines will continue working, and
we'll explore alternate user interfaces later.
We're still using Make as a wrapper, but all it does is call into this
single Go program, it won't even load the product configuration. Once
this is default, we can start moving individual users over to using this
directly (still in Make emulation mode), skipping the Make wrapper.
Ideas for the future:
* Generating trace files showing time spent in Make/Kati/Soong/Ninja
(also importing ninja traces into the same stream). I had this working
in a previous version of this patch, but removed it to keep the size
down and focus on the current features.
* More intelligent SIGALRM handling, once we fully remove the Make
wrapper (which hides the SIGALRM)
* Reading the experimental binary output stream from Ninja, so that we
can always save the verbose log even if we're not printing it out to
the console
Test: USE_SOONG_UI=true m -j blueprint_tools
Change-Id: I884327b9a8ae24499eb6c56f6e1ad26df1cfa4e4
2016-08-22 06:17:17 +08:00
|
|
|
"ui/*",
|
2016-08-16 06:02:23 +08:00
|
|
|
]
|
2015-03-26 05:43:57 +08:00
|
|
|
|
|
|
|
bootstrap_go_package {
|
|
|
|
name: "soong-env",
|
|
|
|
pkgPath: "android/soong/env",
|
|
|
|
srcs: [
|
|
|
|
"env/env.go",
|
|
|
|
],
|
|
|
|
}
|
|
|
|
|
2015-06-18 05:20:06 +08:00
|
|
|
bootstrap_go_package {
|
|
|
|
name: "soong",
|
|
|
|
pkgPath: "android/soong",
|
|
|
|
deps: [
|
|
|
|
"blueprint",
|
|
|
|
],
|
|
|
|
srcs: [
|
|
|
|
"doc.go",
|
|
|
|
],
|
|
|
|
}
|
|
|
|
|
2015-03-15 05:26:32 +08:00
|
|
|
bootstrap_go_package {
|
2016-05-19 06:37:25 +08:00
|
|
|
name: "soong-android",
|
|
|
|
pkgPath: "android/soong/android",
|
2015-03-15 05:26:32 +08:00
|
|
|
deps: [
|
2015-01-31 09:27:36 +08:00
|
|
|
"blueprint",
|
|
|
|
"blueprint-bootstrap",
|
2015-06-18 05:20:06 +08:00
|
|
|
"soong",
|
2015-03-26 05:43:57 +08:00
|
|
|
"soong-env",
|
2015-01-31 09:27:36 +08:00
|
|
|
],
|
2015-03-15 05:26:32 +08:00
|
|
|
srcs: [
|
2016-05-19 06:37:25 +08:00
|
|
|
"android/androidmk.go",
|
2017-03-29 05:54:55 +08:00
|
|
|
"android/api_levels.go",
|
2016-05-19 06:37:25 +08:00
|
|
|
"android/arch.go",
|
|
|
|
"android/config.go",
|
|
|
|
"android/defaults.go",
|
|
|
|
"android/defs.go",
|
2016-11-05 05:36:38 +08:00
|
|
|
"android/expand.go",
|
2016-09-14 04:42:32 +08:00
|
|
|
"android/hooks.go",
|
2016-05-19 06:37:25 +08:00
|
|
|
"android/makevars.go",
|
|
|
|
"android/module.go",
|
|
|
|
"android/mutator.go",
|
2016-08-18 06:24:12 +08:00
|
|
|
"android/onceper.go",
|
2016-05-19 06:37:25 +08:00
|
|
|
"android/package_ctx.go",
|
|
|
|
"android/paths.go",
|
2016-10-07 07:12:58 +08:00
|
|
|
"android/prebuilt.go",
|
2016-10-13 05:28:16 +08:00
|
|
|
"android/register.go",
|
2016-05-19 06:37:25 +08:00
|
|
|
"android/util.go",
|
|
|
|
"android/variable.go",
|
2016-05-13 10:03:10 +08:00
|
|
|
|
|
|
|
// Lock down environment access last
|
2016-05-19 06:37:25 +08:00
|
|
|
"android/env.go",
|
2015-01-31 09:27:36 +08:00
|
|
|
],
|
2015-09-24 06:26:20 +08:00
|
|
|
testSrcs: [
|
2016-11-05 05:36:38 +08:00
|
|
|
"android/expand_test.go",
|
2016-05-19 06:37:25 +08:00
|
|
|
"android/paths_test.go",
|
2016-10-15 06:38:43 +08:00
|
|
|
"android/prebuilt_test.go",
|
2017-05-06 07:16:24 +08:00
|
|
|
"android/variable_test.go",
|
2015-09-24 06:26:20 +08:00
|
|
|
],
|
2015-03-15 05:26:32 +08:00
|
|
|
}
|
2015-01-31 09:27:36 +08:00
|
|
|
|
2016-07-30 04:44:28 +08:00
|
|
|
bootstrap_go_package {
|
|
|
|
name: "soong-cc-config",
|
|
|
|
pkgPath: "android/soong/cc/config",
|
|
|
|
deps: [
|
|
|
|
"soong-android",
|
|
|
|
],
|
|
|
|
srcs: [
|
|
|
|
"cc/config/clang.go",
|
|
|
|
"cc/config/global.go",
|
2016-09-27 06:45:04 +08:00
|
|
|
"cc/config/tidy.go",
|
2016-07-30 04:44:28 +08:00
|
|
|
"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",
|
2016-06-14 08:19:03 +08:00
|
|
|
"cc/config/x86_linux_bionic_host.go",
|
2016-07-30 04:44:28 +08:00
|
|
|
"cc/config/x86_windows_host.go",
|
|
|
|
],
|
2016-09-27 06:45:04 +08:00
|
|
|
testSrcs: [
|
|
|
|
"cc/config/tidy_test.go",
|
|
|
|
],
|
2016-07-30 04:44:28 +08:00
|
|
|
}
|
|
|
|
|
2015-03-15 05:26:32 +08:00
|
|
|
bootstrap_go_package {
|
|
|
|
name: "soong-cc",
|
|
|
|
pkgPath: "android/soong/cc",
|
|
|
|
deps: [
|
2015-01-31 09:27:36 +08:00
|
|
|
"blueprint",
|
|
|
|
"blueprint-pathtools",
|
2015-06-18 05:20:06 +08:00
|
|
|
"soong",
|
2016-05-19 06:37:25 +08:00
|
|
|
"soong-android",
|
2016-07-30 04:44:28 +08:00
|
|
|
"soong-cc-config",
|
2015-03-19 04:28:46 +08:00
|
|
|
"soong-genrule",
|
2015-01-31 09:27:36 +08:00
|
|
|
],
|
2015-03-15 05:26:32 +08:00
|
|
|
srcs: [
|
2015-07-09 09:13:11 +08:00
|
|
|
"cc/androidmk.go",
|
2015-01-31 09:27:36 +08:00
|
|
|
"cc/builder.go",
|
|
|
|
"cc/cc.go",
|
2016-05-26 05:47:21 +08:00
|
|
|
"cc/check.go",
|
2017-02-10 08:16:31 +08:00
|
|
|
"cc/coverage.go",
|
2015-04-08 07:50:10 +08:00
|
|
|
"cc/gen.go",
|
2016-01-13 15:20:28 +08:00
|
|
|
"cc/makevars.go",
|
2016-10-07 07:12:58 +08:00
|
|
|
"cc/prebuilt.go",
|
2016-10-21 07:11:43 +08:00
|
|
|
"cc/proto.go",
|
2016-09-15 06:04:48 +08:00
|
|
|
"cc/relocation_packer.go",
|
2017-05-02 08:37:24 +08:00
|
|
|
"cc/rs.go",
|
2016-01-07 06:41:07 +08:00
|
|
|
"cc/sanitize.go",
|
2017-02-09 05:45:53 +08:00
|
|
|
"cc/sabi.go",
|
2016-01-05 06:34:37 +08:00
|
|
|
"cc/stl.go",
|
2016-07-30 03:48:20 +08:00
|
|
|
"cc/strip.go",
|
2016-09-27 06:45:04 +08:00
|
|
|
"cc/tidy.go",
|
2015-01-31 09:27:36 +08:00
|
|
|
"cc/util.go",
|
|
|
|
|
2017-01-11 08:21:22 +08:00
|
|
|
"cc/cmakelists.go",
|
2016-07-30 03:48:20 +08:00
|
|
|
"cc/compiler.go",
|
|
|
|
"cc/installer.go",
|
|
|
|
"cc/linker.go",
|
|
|
|
|
|
|
|
"cc/binary.go",
|
|
|
|
"cc/library.go",
|
|
|
|
"cc/object.go",
|
|
|
|
"cc/test.go",
|
2016-07-30 08:28:03 +08:00
|
|
|
"cc/toolchain_library.go",
|
2016-07-30 03:48:20 +08:00
|
|
|
|
|
|
|
"cc/ndk_prebuilt.go",
|
2016-06-18 07:45:24 +08:00
|
|
|
"cc/ndk_headers.go",
|
|
|
|
"cc/ndk_library.go",
|
|
|
|
"cc/ndk_sysroot.go",
|
2017-03-20 04:44:32 +08:00
|
|
|
|
|
|
|
"cc/llndk_library.go",
|
2015-01-31 09:27:36 +08:00
|
|
|
],
|
2015-06-24 10:46:20 +08:00
|
|
|
testSrcs: [
|
|
|
|
"cc/cc_test.go",
|
2017-02-02 06:12:44 +08:00
|
|
|
"cc/test_data_test.go",
|
2015-06-24 10:46:20 +08:00
|
|
|
],
|
2015-07-28 06:08:24 +08:00
|
|
|
pluginFor: ["soong_build"],
|
2015-03-15 05:26:32 +08:00
|
|
|
}
|
2015-01-31 09:27:36 +08:00
|
|
|
|
2015-03-19 04:28:46 +08:00
|
|
|
bootstrap_go_package {
|
|
|
|
name: "soong-genrule",
|
|
|
|
pkgPath: "android/soong/genrule",
|
|
|
|
deps: [
|
|
|
|
"blueprint",
|
|
|
|
"blueprint-pathtools",
|
2015-06-18 05:20:06 +08:00
|
|
|
"soong",
|
2016-05-19 06:37:25 +08:00
|
|
|
"soong-android",
|
2017-03-30 08:29:06 +08:00
|
|
|
"soong-shared",
|
2015-03-19 04:28:46 +08:00
|
|
|
],
|
|
|
|
srcs: [
|
2016-12-14 07:23:47 +08:00
|
|
|
"genrule/filegroup.go",
|
2015-03-19 04:28:46 +08:00
|
|
|
"genrule/genrule.go",
|
|
|
|
],
|
2015-07-28 06:08:24 +08:00
|
|
|
pluginFor: ["soong_build"],
|
2015-03-19 04:28:46 +08:00
|
|
|
}
|
2015-03-31 08:20:39 +08:00
|
|
|
|
2017-02-05 09:47:46 +08:00
|
|
|
bootstrap_go_package {
|
|
|
|
name: "soong-phony",
|
|
|
|
pkgPath: "android/soong/phony",
|
|
|
|
deps: [
|
|
|
|
"blueprint",
|
|
|
|
"soong-android",
|
|
|
|
],
|
|
|
|
srcs: [
|
|
|
|
"phony/phony.go",
|
|
|
|
],
|
|
|
|
pluginFor: ["soong_build"],
|
|
|
|
}
|
|
|
|
|
2015-03-31 08:20:39 +08:00
|
|
|
bootstrap_go_package {
|
|
|
|
name: "soong-java",
|
|
|
|
pkgPath: "android/soong/java",
|
|
|
|
deps: [
|
|
|
|
"blueprint",
|
|
|
|
"blueprint-pathtools",
|
2015-06-18 05:20:06 +08:00
|
|
|
"soong",
|
2016-05-19 06:37:25 +08:00
|
|
|
"soong-android",
|
2015-04-29 04:28:51 +08:00
|
|
|
"soong-genrule",
|
2017-06-23 08:20:19 +08:00
|
|
|
"soong-java-config",
|
2015-03-31 08:20:39 +08:00
|
|
|
],
|
|
|
|
srcs: [
|
2015-07-09 09:13:11 +08:00
|
|
|
"java/androidmk.go",
|
2015-04-14 04:58:27 +08:00
|
|
|
"java/app_builder.go",
|
|
|
|
"java/app.go",
|
2015-03-31 08:20:39 +08:00
|
|
|
"java/builder.go",
|
2015-04-09 04:03:43 +08:00
|
|
|
"java/gen.go",
|
2015-03-31 08:20:39 +08:00
|
|
|
"java/java.go",
|
|
|
|
"java/resources.go",
|
|
|
|
],
|
2015-07-28 06:08:24 +08:00
|
|
|
pluginFor: ["soong_build"],
|
2015-03-31 08:20:39 +08:00
|
|
|
}
|
|
|
|
|
2017-06-23 08:20:19 +08:00
|
|
|
bootstrap_go_package {
|
|
|
|
name: "soong-java-config",
|
|
|
|
pkgPath: "android/soong/java/config",
|
|
|
|
deps: [
|
|
|
|
"blueprint-proptools",
|
|
|
|
"soong-android",
|
|
|
|
],
|
|
|
|
srcs: [
|
|
|
|
"java/config/config.go",
|
|
|
|
"java/config/makevars.go",
|
|
|
|
],
|
|
|
|
}
|
|
|
|
|
2017-02-28 02:12:13 +08:00
|
|
|
bootstrap_go_package {
|
|
|
|
name: "soong-python",
|
|
|
|
pkgPath: "android/soong/python",
|
|
|
|
deps: [
|
|
|
|
"blueprint",
|
|
|
|
"soong-android",
|
|
|
|
],
|
|
|
|
srcs: [
|
2017-05-11 04:37:54 +08:00
|
|
|
"python/androidmk.go",
|
2017-02-28 02:12:13 +08:00
|
|
|
"python/binary.go",
|
|
|
|
"python/builder.go",
|
2017-05-11 04:37:54 +08:00
|
|
|
"python/installer.go",
|
2017-02-28 02:12:13 +08:00
|
|
|
"python/library.go",
|
|
|
|
"python/python.go",
|
2017-05-11 04:37:54 +08:00
|
|
|
"python/test.go",
|
2017-02-28 02:12:13 +08:00
|
|
|
],
|
|
|
|
testSrcs: [
|
|
|
|
"python/python_test.go",
|
|
|
|
],
|
|
|
|
pluginFor: ["soong_build"],
|
|
|
|
}
|
|
|
|
|
2017-03-30 08:29:06 +08:00
|
|
|
bootstrap_go_package {
|
|
|
|
name: "soong-shared",
|
|
|
|
pkgPath: "android/soong/shared",
|
|
|
|
srcs: [
|
|
|
|
"shared/paths.go",
|
|
|
|
],
|
|
|
|
}
|
|
|
|
|
2016-11-17 16:25:59 +08:00
|
|
|
//
|
|
|
|
// 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,
|
|
|
|
},
|
|
|
|
},
|
|
|
|
}
|
|
|
|
|
2015-03-15 05:28:22 +08:00
|
|
|
//
|
|
|
|
// C static libraries extracted from the gcc toolchain
|
|
|
|
//
|
|
|
|
|
2015-03-15 05:26:32 +08:00
|
|
|
toolchain_library {
|
|
|
|
name: "libatomic",
|
2016-11-17 17:02:25 +08:00
|
|
|
defaults: ["linux_bionic_supported"],
|
Split /system and /vendor modules, allow multi-installation
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
2017-04-07 03:43:22 +08:00
|
|
|
vendor_available: true,
|
2015-07-09 09:11:14 +08:00
|
|
|
arch: {
|
|
|
|
arm: {
|
|
|
|
instruction_set: "arm",
|
|
|
|
},
|
|
|
|
},
|
2015-03-15 05:26:32 +08:00
|
|
|
}
|
2015-01-31 09:27:36 +08:00
|
|
|
|
2015-03-15 05:26:32 +08:00
|
|
|
toolchain_library {
|
|
|
|
name: "libgcc",
|
2016-11-17 17:02:25 +08:00
|
|
|
defaults: ["linux_bionic_supported"],
|
Split /system and /vendor modules, allow multi-installation
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
2017-04-07 03:43:22 +08:00
|
|
|
vendor_available: true,
|
2015-07-09 09:11:14 +08:00
|
|
|
arch: {
|
|
|
|
arm: {
|
|
|
|
instruction_set: "arm",
|
|
|
|
},
|
|
|
|
},
|
2015-03-15 05:26:32 +08:00
|
|
|
}
|
2015-01-31 09:27:36 +08:00
|
|
|
|
2017-02-24 09:52:24 +08:00
|
|
|
toolchain_library {
|
|
|
|
name: "libwinpthread",
|
|
|
|
host_supported: true,
|
|
|
|
enabled: false,
|
|
|
|
target: {
|
|
|
|
windows: {
|
|
|
|
enabled: true
|
|
|
|
},
|
|
|
|
},
|
|
|
|
}
|
|
|
|
|
2015-03-15 05:26:32 +08:00
|
|
|
toolchain_library {
|
|
|
|
name: "libgcov",
|
2016-11-17 17:02:25 +08:00
|
|
|
defaults: ["linux_bionic_supported"],
|
2015-07-09 09:11:14 +08:00
|
|
|
arch: {
|
|
|
|
arm: {
|
|
|
|
instruction_set: "arm",
|
|
|
|
},
|
|
|
|
},
|
2015-03-15 05:26:32 +08:00
|
|
|
}
|