So that an external tool can read the configuration using
dump-many-vars, and write out the soong.variables file while only
loading config.mk.
Also remove dumpvar-% from PARSE_TIME_MAKE_GOALS, since it's only used
with CALLED_FROM_SETUP / config.mk. This provides an easy way to test
this change as well.
Test: get_build_var NINJA
Test: get_build_var ANDROID_GOALS
Test: get_build_var NINJA_GOALS
Test: get_build_var KATI_GOALS
Test: MAKECMDGOALS="droid sdk dumpvar-ANDROID_GOALS" get_build_var ANDROID_GOALS
Test: MAKECMDGOALS="droid sdk dumpvar-NINJA_GOALS" get_build_var NINJA_GOALS
Test: MAKECMDGOALS="droid sdk dumpvar-KATI_GOALS" get_build_var KATI_GOALS
Test: MAKECMDGOALS="out/build-a.ninja dumpvar-ANDROID_GOALS" get_build_var ANDROID_GOALS
Test: get_build_var SOONG_MAKEVARS_MK
Test: get_build_var SOONG_VARIABLES
Test: CALLED_FROM_SETUP=true BUILD_SYSTEM=build/core make -f build/core/config.mk out/soong/soong.variables showcommands
Test: Compare soong.variables from above, and before/after with `m`
Test: Compare out before/after with `m doesnotexist`
Test: `m dist doesnotexist`
Change-Id: I1bc291aa165297c930fe600067edad6ce4979210
Also renames the variable from SANITIZE_ARCH to SANITIZE_TARGET_ARCH,
and makes it only apply to the device.
Bug: 29498013
Test: No change to build.ninja files with m -j SANITIZE_TARGET=address
Change-Id: Ib5f6ab448f5d96d2426c983308136670f9a55b7b
HOST_PREFER_32_BIT was used during the switch to 64-bit host tools to
keep the SDK building as 32-bit, but is never set any more.
Change-Id: I874f89c7d1e9cd8c9d4c879048d81a4362ce4dce
Pass the USE_GOMA flag to soong, and export the CC_WRAPPER environment
variable after adding gomacc to it.
Bug: 31142427
Change-Id: I6de698a40817c0615b03fa17bd27075465d79ffd
Now we only run the "main" stage from Soong once, and only when combined
with the Kati ninja file. So we can now depend on pools or rules defined
by Kati in Soong.
Change-Id: I7a8fd699ddc0d41bbcbbf3c6f2edb9e26ccfc4c9
core/soong.mk expected SANITIZE_TARGET to be comma separated,
while the rest of the build files expected it to be space
separated.
Change-Id: I179054118ed5c422f9ae2d69afb2f4ad3a71cb7b
This is to ensure that Make and Soong agree on configuration variables
like TARGET_GLOBAL_CFLAGS. Only a few variables are actually checked
currently until we make more actually the same.
Bug: 23566674
Change-Id: Ibede43d933ede4d470e182f9490ea6ec4ef52fbc
This way commands like "-t query <target>" will work against the main
build, instead of failing to find the target during the initial soong
build and stopping.
Change-Id: I9b6bd6ac431b95e12db69ec7f272669b9d292761
My previous attempt at properly handling symlinked OUT_DIRs only worked
if the symlink was to a different directory, not one in the same
directory.
This time, make sure that both make and soong use the same
representation of the output directory by passing BUILDDIR to
bootstrap.bash. Soong has been updated to pick whether to use a relative
or absolute path back to the source tree depending on what makes sense.
If the BUILDDIR or the path back to the source tree change, re-run the
bootstrap.
Also, move the $OUT_DIR/Android.mk and $OUT_DIR/CleanSpec.mk generation
to before Kati runs. In the case that $TOP/out was symlinked to
$TOP/out.angler:
1) Soong generates out.angler/soong/Android.mk
2) Kati's find generator produces in-memory tree of the filesystem
3) $(shell ) creates out.angler/Android.mk
4) The emulated findleaves Android.mk search finds
out.angler/soong/Android.mk since the in-memory tree is never updated.
This doesn't happen in the normal case, because we pass --prune=$OUT_DIR
to findleaves.
Change-Id: Ib0fdae2e80f75ddcf33a3c8c5ea0978f5308b437
Split out Soong's missing dependency option from Unbundled_build. There
are builds other than unbundled builds that don't have a full platform
tree (AOSP llvm branch is one example).
When this is set to true, Soong will defer the error for missing
dependencies until a module is attempted to be built, instead of when
it is reading and generating the build rules. So for platform builds it
will still fail early if something is missing.
Change-Id: I56cb881ff55f5928b77cddc0d67086c3d37e43d7
Without switching on USE_SOONG, this lets us verify that all builds have
blueprint/soong/go, and can generate a build.ninja file without
producing errors.
Change-Id: I79451ce24c8b5b6745e41d951153265441c33e8a
Soong needs to be able to reverse the relative path to out. Switch to
absolute paths if .. won't work because of out being a symlink to
somewhere else.
Bug: 27612837
Change-Id: Ib8b9e0f80523148cfd4b69a03d164578916d8fd5
Currently, we're building against the native host version of libc++ and
other headers. Instead, use prebuilts of ckati/makeparallel built with
Soong against the included libc++ and sysroot. Building ckati /
makeparallel doesn't work well in unbundled branches that don't have all
of the libc++ dependencies to do successful host builds.
KATI is default variable defined when running under Kati, don't use it
for other purposes. Use CKATI instead.
Bug: 27533820
Change-Id: I82d66f5e34e3341a3cee4c5c83cd1d9a54d057ff
This configures Soong to build windows binaries, which requires support
for 64-bit windows binaries in BUILD_PREBUILT for USE_SOONG=true.
module_arch_supported.mk did not support 64-bit being the secondary
architecture when evaluating multilib conditionals. All other uses of
HOST_*_IS_64_BIT already check the proper version.
Change-Id: Iff664733e6991f4adbe8ddd620b091bbb55d1d86
This uses far fewer hacks in order to build these host tools, but will
require more libraries(libc++,etc) from unbundled and stripped down
branches.
Once this becomes the only option, all builds will happen after soong
runs. Then the toolchain / global cflags information will be able to be
moved from make to soong (and exported back to make).
Change-Id: I270b1d92bcef28a96fbc3ec9910d9bd0c101ac0f