2015-01-31 02:27:36 +01:00
|
|
|
//
|
|
|
|
// 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
|
|
|
|
//
|
|
|
|
|
2016-08-16 00:02:23 +02:00
|
|
|
subdirs = [
|
|
|
|
"androidmk",
|
|
|
|
"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 00:17:17 +02:00
|
|
|
"ui/*",
|
2016-08-16 00:02:23 +02:00
|
|
|
]
|
2015-03-25 22:43:57 +01:00
|
|
|
|
|
|
|
bootstrap_go_package {
|
|
|
|
name: "soong-env",
|
|
|
|
pkgPath: "android/soong/env",
|
|
|
|
srcs: [
|
|
|
|
"env/env.go",
|
|
|
|
],
|
|
|
|
}
|
|
|
|
|
2015-06-17 23:20:06 +02:00
|
|
|
bootstrap_go_package {
|
|
|
|
name: "soong",
|
|
|
|
pkgPath: "android/soong",
|
|
|
|
deps: [
|
|
|
|
"blueprint",
|
|
|
|
],
|
|
|
|
srcs: [
|
|
|
|
"doc.go",
|
|
|
|
],
|
|
|
|
}
|
|
|
|
|
2015-03-14 22:26:32 +01:00
|
|
|
bootstrap_go_package {
|
2016-05-19 00:37:25 +02:00
|
|
|
name: "soong-android",
|
|
|
|
pkgPath: "android/soong/android",
|
2015-03-14 22:26:32 +01:00
|
|
|
deps: [
|
2015-01-31 02:27:36 +01:00
|
|
|
"blueprint",
|
|
|
|
"blueprint-bootstrap",
|
2015-06-17 23:20:06 +02:00
|
|
|
"soong",
|
2015-03-25 22:43:57 +01:00
|
|
|
"soong-env",
|
2015-01-31 02:27:36 +01:00
|
|
|
],
|
2015-03-14 22:26:32 +01:00
|
|
|
srcs: [
|
2016-05-19 00:37:25 +02:00
|
|
|
"android/androidmk.go",
|
|
|
|
"android/arch.go",
|
|
|
|
"android/config.go",
|
|
|
|
"android/defaults.go",
|
|
|
|
"android/defs.go",
|
2016-11-04 22:36:38 +01:00
|
|
|
"android/expand.go",
|
2016-09-13 22:42:32 +02:00
|
|
|
"android/hooks.go",
|
2016-05-19 00:37:25 +02:00
|
|
|
"android/makevars.go",
|
|
|
|
"android/module.go",
|
|
|
|
"android/mutator.go",
|
2016-08-18 00:24:12 +02:00
|
|
|
"android/onceper.go",
|
2016-05-19 00:37:25 +02:00
|
|
|
"android/package_ctx.go",
|
|
|
|
"android/paths.go",
|
2016-10-07 01:12:58 +02:00
|
|
|
"android/prebuilt.go",
|
2016-10-12 23:28:16 +02:00
|
|
|
"android/register.go",
|
2016-05-19 00:37:25 +02:00
|
|
|
"android/util.go",
|
|
|
|
"android/variable.go",
|
2016-05-13 04:03:10 +02:00
|
|
|
|
|
|
|
// Lock down environment access last
|
2016-05-19 00:37:25 +02:00
|
|
|
"android/env.go",
|
2015-01-31 02:27:36 +01:00
|
|
|
],
|
2015-09-24 00:26:20 +02:00
|
|
|
testSrcs: [
|
2016-11-04 22:36:38 +01:00
|
|
|
"android/expand_test.go",
|
2016-05-19 00:37:25 +02:00
|
|
|
"android/paths_test.go",
|
2016-10-15 00:38:43 +02:00
|
|
|
"android/prebuilt_test.go",
|
2015-09-24 00:26:20 +02:00
|
|
|
],
|
2015-03-14 22:26:32 +01:00
|
|
|
}
|
2015-01-31 02:27:36 +01:00
|
|
|
|
2016-07-29 22:44:28 +02: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 00:45:04 +02:00
|
|
|
"cc/config/tidy.go",
|
2016-07-29 22:44:28 +02: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",
|
|
|
|
"cc/config/x86_windows_host.go",
|
|
|
|
],
|
2016-09-27 00:45:04 +02:00
|
|
|
testSrcs: [
|
|
|
|
"cc/config/tidy_test.go",
|
|
|
|
],
|
2016-07-29 22:44:28 +02:00
|
|
|
}
|
|
|
|
|
2015-03-14 22:26:32 +01:00
|
|
|
bootstrap_go_package {
|
|
|
|
name: "soong-cc",
|
|
|
|
pkgPath: "android/soong/cc",
|
|
|
|
deps: [
|
2015-01-31 02:27:36 +01:00
|
|
|
"blueprint",
|
|
|
|
"blueprint-pathtools",
|
2015-06-17 23:20:06 +02:00
|
|
|
"soong",
|
2016-05-19 00:37:25 +02:00
|
|
|
"soong-android",
|
2016-07-29 22:44:28 +02:00
|
|
|
"soong-cc-config",
|
2015-03-18 21:28:46 +01:00
|
|
|
"soong-genrule",
|
2015-01-31 02:27:36 +01:00
|
|
|
],
|
2015-03-14 22:26:32 +01:00
|
|
|
srcs: [
|
2015-07-09 03:13:11 +02:00
|
|
|
"cc/androidmk.go",
|
2015-01-31 02:27:36 +01:00
|
|
|
"cc/builder.go",
|
|
|
|
"cc/cc.go",
|
2016-05-25 23:47:21 +02:00
|
|
|
"cc/check.go",
|
2015-04-08 01:50:10 +02:00
|
|
|
"cc/gen.go",
|
2016-01-13 08:20:28 +01:00
|
|
|
"cc/makevars.go",
|
2016-10-07 01:12:58 +02:00
|
|
|
"cc/prebuilt.go",
|
2016-10-21 01:11:43 +02:00
|
|
|
"cc/proto.go",
|
2016-09-15 00:04:48 +02:00
|
|
|
"cc/relocation_packer.go",
|
2016-01-06 23:41:07 +01:00
|
|
|
"cc/sanitize.go",
|
2016-01-04 23:34:37 +01:00
|
|
|
"cc/stl.go",
|
2016-07-29 21:48:20 +02:00
|
|
|
"cc/strip.go",
|
2016-09-27 00:45:04 +02:00
|
|
|
"cc/tidy.go",
|
2015-01-31 02:27:36 +01:00
|
|
|
"cc/util.go",
|
|
|
|
|
2017-01-11 01:21:22 +01:00
|
|
|
"cc/cmakelists.go",
|
2016-07-29 21:48:20 +02: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 02:28:03 +02:00
|
|
|
"cc/toolchain_library.go",
|
2016-07-29 21:48:20 +02:00
|
|
|
|
|
|
|
"cc/ndk_prebuilt.go",
|
2016-06-18 01:45:24 +02:00
|
|
|
"cc/ndk_headers.go",
|
|
|
|
"cc/ndk_library.go",
|
|
|
|
"cc/ndk_sysroot.go",
|
2015-01-31 02:27:36 +01:00
|
|
|
],
|
2015-06-24 04:46:20 +02:00
|
|
|
testSrcs: [
|
|
|
|
"cc/cc_test.go",
|
2017-02-01 23:12:44 +01:00
|
|
|
"cc/test_data_test.go",
|
2015-06-24 04:46:20 +02:00
|
|
|
],
|
2015-07-28 00:08:24 +02:00
|
|
|
pluginFor: ["soong_build"],
|
2015-03-14 22:26:32 +01:00
|
|
|
}
|
2015-01-31 02:27:36 +01:00
|
|
|
|
2015-03-18 21:28:46 +01:00
|
|
|
bootstrap_go_package {
|
|
|
|
name: "soong-genrule",
|
|
|
|
pkgPath: "android/soong/genrule",
|
|
|
|
deps: [
|
|
|
|
"blueprint",
|
|
|
|
"blueprint-pathtools",
|
2015-06-17 23:20:06 +02:00
|
|
|
"soong",
|
2016-05-19 00:37:25 +02:00
|
|
|
"soong-android",
|
2015-03-18 21:28:46 +01:00
|
|
|
],
|
|
|
|
srcs: [
|
2016-12-14 00:23:47 +01:00
|
|
|
"genrule/filegroup.go",
|
2015-03-18 21:28:46 +01:00
|
|
|
"genrule/genrule.go",
|
|
|
|
],
|
2015-07-28 00:08:24 +02:00
|
|
|
pluginFor: ["soong_build"],
|
2015-03-18 21:28:46 +01:00
|
|
|
}
|
2015-03-31 02:20:39 +02:00
|
|
|
|
2017-02-05 02:47:46 +01: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 02:20:39 +02:00
|
|
|
bootstrap_go_package {
|
|
|
|
name: "soong-java",
|
|
|
|
pkgPath: "android/soong/java",
|
|
|
|
deps: [
|
|
|
|
"blueprint",
|
|
|
|
"blueprint-pathtools",
|
2015-06-17 23:20:06 +02:00
|
|
|
"soong",
|
2016-05-19 00:37:25 +02:00
|
|
|
"soong-android",
|
2015-04-28 22:28:51 +02:00
|
|
|
"soong-genrule",
|
2015-03-31 02:20:39 +02:00
|
|
|
],
|
|
|
|
srcs: [
|
2015-07-09 03:13:11 +02:00
|
|
|
"java/androidmk.go",
|
2015-04-13 22:58:27 +02:00
|
|
|
"java/app_builder.go",
|
|
|
|
"java/app.go",
|
2015-03-31 02:20:39 +02:00
|
|
|
"java/builder.go",
|
2015-04-08 22:03:43 +02:00
|
|
|
"java/gen.go",
|
2015-03-31 02:20:39 +02:00
|
|
|
"java/java.go",
|
|
|
|
"java/resources.go",
|
|
|
|
],
|
2015-07-28 00:08:24 +02:00
|
|
|
pluginFor: ["soong_build"],
|
2015-03-31 02:20:39 +02:00
|
|
|
}
|
|
|
|
|
2016-11-17 09:25:59 +01: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-14 22:28:22 +01:00
|
|
|
//
|
|
|
|
// C static libraries extracted from the gcc toolchain
|
|
|
|
//
|
|
|
|
|
2015-03-14 22:26:32 +01:00
|
|
|
toolchain_library {
|
|
|
|
name: "libatomic",
|
2016-11-17 10:02:25 +01:00
|
|
|
defaults: ["linux_bionic_supported"],
|
2015-07-09 03:11:14 +02:00
|
|
|
arch: {
|
|
|
|
arm: {
|
|
|
|
instruction_set: "arm",
|
|
|
|
},
|
|
|
|
},
|
2015-03-14 22:26:32 +01:00
|
|
|
}
|
2015-01-31 02:27:36 +01:00
|
|
|
|
2015-03-14 22:26:32 +01:00
|
|
|
toolchain_library {
|
|
|
|
name: "libgcc",
|
2016-11-17 10:02:25 +01:00
|
|
|
defaults: ["linux_bionic_supported"],
|
2015-07-09 03:11:14 +02:00
|
|
|
arch: {
|
|
|
|
arm: {
|
|
|
|
instruction_set: "arm",
|
|
|
|
},
|
|
|
|
},
|
2015-03-14 22:26:32 +01:00
|
|
|
}
|
2015-01-31 02:27:36 +01:00
|
|
|
|
2015-03-14 22:26:32 +01:00
|
|
|
toolchain_library {
|
|
|
|
name: "libgcov",
|
2016-11-17 10:02:25 +01:00
|
|
|
defaults: ["linux_bionic_supported"],
|
2015-07-09 03:11:14 +02:00
|
|
|
arch: {
|
|
|
|
arm: {
|
|
|
|
instruction_set: "arm",
|
|
|
|
},
|
|
|
|
},
|
2015-03-14 22:26:32 +01:00
|
|
|
}
|