diff options
author | 2017-10-17 18:00:57 -0700 | |
---|---|---|
committer | 2017-10-18 16:11:24 -0700 | |
commit | 7b44ac0dc47a67f646c0683ca5f16d98265df855 (patch) | |
tree | bfd132a2cc7f65186fcdd7b24ff721c0b7e3cfe8 | |
parent | 4a6603701b217bbbd75020e1689c87c61125ef02 (diff) |
tools: Use soong_ui instead of make
Switch to soong_ui to dump make variables, which ensures a consistent
parser for the product makefiles, and may provide other benefits, like
sandboxed executions.
Use soong_ui rather than the legacy make startup wrapper, which just
calls soong_ui. This allows us to automatically set the parallelism if
-j is omitted, so remove the default here and let soong_ui choose an
appropriate value for your machine.
Test: art/tools/golem/build-target.sh --machine-type=android-armv8
Test: art/tools/golem/build-target.sh --machine-type=android-armv8 --golem=art-opt-cc
Change-Id: I39c838b7198658534f6cadc64159f59b3ffdd38c
-rwxr-xr-x | tools/golem/build-target.sh | 12 |
1 files changed, 4 insertions, 8 deletions
diff --git a/tools/golem/build-target.sh b/tools/golem/build-target.sh index 8d8e2bbe6f..4ca2722ac9 100755 --- a/tools/golem/build-target.sh +++ b/tools/golem/build-target.sh @@ -147,12 +147,8 @@ get_build_var() { [[ -n $target_product ]] && extras+=" TARGET_PRODUCT=$target_product" [[ -n $target_build_variant ]] && extras+=" TARGET_BUILD_VARIANT=$target_build_variant" - # call dumpvar-$name from the makefile system. - (\cd "$(gettop)"; - CALLED_FROM_SETUP=true BUILD_SYSTEM=build/core \ - command make --no-print-directory -f build/core/config.mk \ - $extras \ - dumpvar-$varname) + # call dumpvar from the build system. + (\cd "$(gettop)"; env $extras build/soong/soong_ui.bash --dumpvar-mode $varname) } # Defaults from command-line. @@ -160,7 +156,7 @@ get_build_var() { mode="" # blank or 'golem' if --golem was specified. golem_target="" # --golem=$golem_target config="" # --machine-type=$config -j_arg="-j8" +j_arg="" showcommands="" simulate="" make_tarball="" @@ -353,7 +349,7 @@ fi # and maybe calls lunch). # -execute make "${j_arg}" "${make_target}" +execute build/soong/soong_ui.bash --make-mode "${j_arg}" "${make_target}" if $strip_symbols; then # Further reduce size by stripping symbols. |