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/*",
|
2017-08-10 09:25:28 +08:00
|
|
|
"fs",
|
|
|
|
"finder",
|
2017-08-22 11:13:28 +08:00
|
|
|
"jar",
|
2017-10-13 03:19:14 +08:00
|
|
|
"zip",
|
2016-08-16 06:02:23 +08:00
|
|
|
"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
|
|
|
|
2015-06-18 05:20:06 +08:00
|
|
|
bootstrap_go_package {
|
|
|
|
name: "soong",
|
|
|
|
pkgPath: "android/soong",
|
|
|
|
deps: [
|
|
|
|
"blueprint",
|
|
|
|
],
|
|
|
|
srcs: [
|
|
|
|
"doc.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,
|
2020-01-22 08:38:29 +08:00
|
|
|
ramdisk_available: true,
|
2018-01-31 23:54:12 +08:00
|
|
|
recovery_available: true,
|
2019-03-26 19:39:31 +08:00
|
|
|
native_bridge_supported: true,
|
2018-10-08 09:16:48 +08:00
|
|
|
|
2015-07-09 09:11:14 +08:00
|
|
|
arch: {
|
|
|
|
arm: {
|
2018-10-08 09:16:48 +08:00
|
|
|
src: "prebuilts/gcc/linux-x86/arm/arm-linux-androideabi-4.9/arm-linux-androideabi/lib/libatomic.a",
|
|
|
|
},
|
|
|
|
arm64: {
|
|
|
|
src: "prebuilts/gcc/linux-x86/aarch64/aarch64-linux-android-4.9/aarch64-linux-android/lib64/libatomic.a",
|
|
|
|
},
|
|
|
|
x86: {
|
|
|
|
src: "prebuilts/gcc/linux-x86/x86/x86_64-linux-android-4.9/x86_64-linux-android/lib/libatomic.a",
|
|
|
|
},
|
|
|
|
x86_64: {
|
|
|
|
src: "prebuilts/gcc/linux-x86/x86/x86_64-linux-android-4.9/x86_64-linux-android/lib64/libatomic.a",
|
2015-07-09 09:11:14 +08:00
|
|
|
},
|
|
|
|
},
|
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,
|
2018-01-31 23:54:12 +08:00
|
|
|
recovery_available: true,
|
2019-03-26 19:39:31 +08:00
|
|
|
native_bridge_supported: true,
|
2018-10-08 09:16:48 +08:00
|
|
|
|
2015-07-09 09:11:14 +08:00
|
|
|
arch: {
|
|
|
|
arm: {
|
2018-10-08 09:16:48 +08:00
|
|
|
src: "prebuilts/gcc/linux-x86/arm/arm-linux-androideabi-4.9/lib/gcc/arm-linux-androideabi/4.9.x/libgcc.a",
|
|
|
|
},
|
|
|
|
arm64: {
|
|
|
|
src: "prebuilts/gcc/linux-x86/aarch64/aarch64-linux-android-4.9/lib/gcc/aarch64-linux-android/4.9.x/libgcc.a",
|
|
|
|
},
|
|
|
|
x86: {
|
|
|
|
src: "prebuilts/gcc/linux-x86/x86/x86_64-linux-android-4.9/lib/gcc/x86_64-linux-android/4.9.x/32/libgcc.a",
|
|
|
|
},
|
|
|
|
x86_64: {
|
|
|
|
src: "prebuilts/gcc/linux-x86/x86/x86_64-linux-android-4.9/lib/gcc/x86_64-linux-android/4.9.x/libgcc.a",
|
2015-07-09 09:11:14 +08:00
|
|
|
},
|
|
|
|
},
|
2015-03-15 05:26:32 +08:00
|
|
|
}
|
2015-01-31 09:27:36 +08:00
|
|
|
|
2019-03-30 11:05:14 +08:00
|
|
|
toolchain_library {
|
|
|
|
name: "libgcc_stripped",
|
|
|
|
defaults: ["linux_bionic_supported"],
|
|
|
|
vendor_available: true,
|
2020-01-22 08:38:29 +08:00
|
|
|
ramdisk_available: true,
|
2019-03-30 11:05:14 +08:00
|
|
|
recovery_available: true,
|
2019-05-06 16:58:10 +08:00
|
|
|
native_bridge_supported: true,
|
2019-12-11 10:37:45 +08:00
|
|
|
sdk_version: "current",
|
2019-03-30 11:05:14 +08:00
|
|
|
|
|
|
|
arch: {
|
|
|
|
arm: {
|
|
|
|
src: "prebuilts/gcc/linux-x86/arm/arm-linux-androideabi-4.9/lib/gcc/arm-linux-androideabi/4.9.x/libgcc.a",
|
2020-04-04 02:14:50 +08:00
|
|
|
repack_objects_to_keep: [],
|
|
|
|
enabled: false,
|
2019-03-30 11:05:14 +08:00
|
|
|
},
|
|
|
|
arm64: {
|
|
|
|
src: "prebuilts/gcc/linux-x86/aarch64/aarch64-linux-android-4.9/lib/gcc/aarch64-linux-android/4.9.x/libgcc.a",
|
2020-06-26 20:04:00 +08:00
|
|
|
repack_objects_to_keep: [
|
|
|
|
"unwind-dw2.o",
|
|
|
|
"unwind-dw2-fde-dip.o",
|
|
|
|
],
|
2019-03-30 11:05:14 +08:00
|
|
|
},
|
|
|
|
x86: {
|
|
|
|
src: "prebuilts/gcc/linux-x86/x86/x86_64-linux-android-4.9/lib/gcc/x86_64-linux-android/4.9.x/32/libgcc.a",
|
2020-06-26 20:04:00 +08:00
|
|
|
repack_objects_to_keep: [
|
|
|
|
"unwind-dw2.o",
|
|
|
|
"unwind-dw2-fde-dip.o",
|
|
|
|
],
|
2019-03-30 11:05:14 +08:00
|
|
|
},
|
|
|
|
x86_64: {
|
|
|
|
src: "prebuilts/gcc/linux-x86/x86/x86_64-linux-android-4.9/lib/gcc/x86_64-linux-android/4.9.x/libgcc.a",
|
2020-06-26 20:04:00 +08:00
|
|
|
repack_objects_to_keep: [
|
|
|
|
"unwind-dw2.o",
|
|
|
|
"unwind-dw2-fde-dip.o",
|
|
|
|
],
|
2019-03-30 11:05:14 +08:00
|
|
|
},
|
|
|
|
},
|
|
|
|
}
|
|
|
|
|
2017-02-24 09:52:24 +08:00
|
|
|
toolchain_library {
|
|
|
|
name: "libwinpthread",
|
|
|
|
host_supported: true,
|
|
|
|
enabled: false,
|
|
|
|
target: {
|
|
|
|
windows: {
|
2017-09-19 14:19:12 +08:00
|
|
|
enabled: true,
|
2017-02-24 09:52:24 +08:00
|
|
|
},
|
2018-10-08 09:16:48 +08:00
|
|
|
windows_x86: {
|
|
|
|
src: "prebuilts/gcc/linux-x86/host/x86_64-w64-mingw32-4.8/x86_64-w64-mingw32/lib32/libwinpthread.a",
|
|
|
|
},
|
|
|
|
windows_x86_64: {
|
|
|
|
src: "prebuilts/gcc/linux-x86/host/x86_64-w64-mingw32-4.8/x86_64-w64-mingw32/lib/libwinpthread.a",
|
|
|
|
},
|
2017-02-24 09:52:24 +08:00
|
|
|
},
|
2018-11-17 05:26:43 +08:00
|
|
|
notice: ":mingw-libwinpthread-notice",
|
2017-02-24 09:52:24 +08:00
|
|
|
}
|
|
|
|
|
2015-03-15 05:26:32 +08:00
|
|
|
toolchain_library {
|
|
|
|
name: "libgcov",
|
2016-11-17 17:02:25 +08:00
|
|
|
defaults: ["linux_bionic_supported"],
|
2018-10-08 09:16:48 +08:00
|
|
|
|
2015-07-09 09:11:14 +08:00
|
|
|
arch: {
|
|
|
|
arm: {
|
2018-10-08 09:16:48 +08:00
|
|
|
src: "prebuilts/gcc/linux-x86/arm/arm-linux-androideabi-4.9/lib/gcc/arm-linux-androideabi/4.9.x/libgcov.a",
|
|
|
|
},
|
|
|
|
arm64: {
|
|
|
|
src: "prebuilts/gcc/linux-x86/aarch64/aarch64-linux-android-4.9/lib/gcc/aarch64-linux-android/4.9.x/libgcov.a",
|
|
|
|
},
|
|
|
|
x86: {
|
|
|
|
src: "prebuilts/gcc/linux-x86/x86/x86_64-linux-android-4.9/lib/gcc/x86_64-linux-android/4.9.x/32/libgcov.a",
|
|
|
|
},
|
|
|
|
x86_64: {
|
|
|
|
src: "prebuilts/gcc/linux-x86/x86/x86_64-linux-android-4.9/lib/gcc/x86_64-linux-android/4.9.x/libgcov.a",
|
2015-07-09 09:11:14 +08:00
|
|
|
},
|
|
|
|
},
|
2015-03-15 05:26:32 +08:00
|
|
|
}
|
2017-07-03 12:18:12 +08:00
|
|
|
|
|
|
|
kernel_headers {
|
|
|
|
name: "device_kernel_headers",
|
|
|
|
vendor: true,
|
2018-08-22 06:51:20 +08:00
|
|
|
recovery_available: true,
|
2017-07-03 12:18:12 +08:00
|
|
|
}
|
2017-09-19 14:19:12 +08:00
|
|
|
|
|
|
|
cc_genrule {
|
|
|
|
name: "host_bionic_linker_asm",
|
|
|
|
host_supported: true,
|
|
|
|
device_supported: false,
|
|
|
|
target: {
|
|
|
|
linux_bionic: {
|
|
|
|
enabled: true,
|
|
|
|
},
|
2017-10-03 01:41:07 +08:00
|
|
|
linux_glibc: {
|
2017-09-19 14:19:12 +08:00
|
|
|
enabled: false,
|
|
|
|
},
|
|
|
|
darwin: {
|
|
|
|
enabled: false,
|
|
|
|
},
|
|
|
|
},
|
|
|
|
tools: ["extract_linker"],
|
|
|
|
cmd: "$(location) -s $(out) $(in)",
|
|
|
|
srcs: [":linker"],
|
|
|
|
out: ["linker.s"],
|
|
|
|
}
|
|
|
|
|
|
|
|
cc_genrule {
|
2018-10-12 15:24:23 +08:00
|
|
|
name: "host_bionic_linker_flags",
|
2017-09-19 14:19:12 +08:00
|
|
|
host_supported: true,
|
|
|
|
device_supported: false,
|
|
|
|
target: {
|
|
|
|
linux_bionic: {
|
|
|
|
enabled: true,
|
|
|
|
},
|
2017-10-03 01:41:07 +08:00
|
|
|
linux_glibc: {
|
2017-09-19 14:19:12 +08:00
|
|
|
enabled: false,
|
|
|
|
},
|
|
|
|
darwin: {
|
|
|
|
enabled: false,
|
|
|
|
},
|
|
|
|
},
|
|
|
|
tools: ["extract_linker"],
|
2018-10-12 15:24:23 +08:00
|
|
|
cmd: "$(location) -f $(out) $(in)",
|
2017-09-19 14:19:12 +08:00
|
|
|
srcs: [":linker"],
|
2018-10-12 15:24:23 +08:00
|
|
|
out: ["linker.flags"],
|
2017-09-19 14:19:12 +08:00
|
|
|
}
|