diff options
author | Dan Willemsen <dwillemsen@google.com> | 2017-03-02 15:49:10 -0800 |
---|---|---|
committer | Dan Willemsen <dwillemsen@google.com> | 2017-03-02 19:42:21 -0800 |
commit | 0c3919e9962ce6d98cd91f10ea8be944dd0b27a0 (patch) | |
tree | 610ef599b7e563314eabc28ebdd6d8e12e420772 /soong_ui.bash | |
parent | 88744e25d433dc4c18171d5791540412dbdf8634 (diff) | |
download | build_soong-0c3919e9962ce6d98cd91f10ea8be944dd0b27a0.tar.gz build_soong-0c3919e9962ce6d98cd91f10ea8be944dd0b27a0.tar.bz2 build_soong-0c3919e9962ce6d98cd91f10ea8be944dd0b27a0.zip |
Fix OUT_DIR_COMMON_BASE with soong_uiandroid-o-preview-1
Currently, Kati is the only one that is respecting OUT_DIR_COMMON_BASE,
causing the build to fail when ninja tries to match up the Soong and
Kati ninja files.
The soong_ui.bash script change is necessary to move the microfactory
built outputs to the correct location.
The config.go change takes care of setting OUT_DIR in the environment of
every subprocess, so that we could remove the OUT_DIR_COMMON_BASE
handling from Make once the USE_SOONG_UI=false path goes away.
Bug: 35929763
Test: m -j blueprint_tools
Test: OUT_DIR=... m -j blueprint_tools
Test: OUT_DIR_COMMON_BASE=... m -j blueprint_tools
Change-Id: I4184f2b4392d32c5bea51e51162a48df0e5c90d5
Diffstat (limited to 'soong_ui.bash')
-rwxr-xr-x | soong_ui.bash | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/soong_ui.bash b/soong_ui.bash index e1af359f..e3997cf4 100755 --- a/soong_ui.bash +++ b/soong_ui.bash @@ -57,7 +57,15 @@ function run_go local mf_src="${TOP}/build/soong/cmd/microfactory" - local out_dir="${OUT_DIR:-${TOP}/out}" + local out_dir="${OUT_DIR-}" + if [ -z "${out_dir}" ]; then + if [ "${OUT_DIR_COMMON_BASE-}" ]; then + out_dir="${OUT_DIR_COMMON_BASE}/$(basename ${TOP})" + else + out_dir="${TOP}/out" + fi + fi + local mf_bin="${out_dir}/microfactory_$(uname)" local mf_version_file="${out_dir}/.microfactory_$(uname)_version" local soong_ui_bin="${out_dir}/soong_ui" |