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