aboutsummaryrefslogtreecommitdiffstats
path: root/ui
diff options
context:
space:
mode:
authorDan Willemsen <dwillemsen@google.com>2017-05-12 13:50:19 -0700
committerDan Willemsen <dwillemsen@google.com>2017-05-12 21:12:13 +0000
commit02f3add3a33ce563fb1172923ca0b5321f0edce1 (patch)
treeea8b7535b2d4dae6389db48c891667d472529c44 /ui
parent67a5c132c53ce0715f4d169fc26dd537294feaca (diff)
downloadbuild_soong-02f3add3a33ce563fb1172923ca0b5321f0edce1.tar.gz
build_soong-02f3add3a33ce563fb1172923ca0b5321f0edce1.tar.bz2
build_soong-02f3add3a33ce563fb1172923ca0b5321f0edce1.zip
Clean OUT_DIR
Otherwise Make and soong_ui disagree about where the soong.variables file should be. For example, when "OUT_DIR=out/": Error dumping make vars: Failed to parse make line: "make: Nothing to be done for `out/soong/soong.variables'." We would need to pass out//soong/soong.variables into make, since it doesn't attempt to match clean/unclean paths. Bug: 37553659 Test: OUT_DIR=out/ m -j Change-Id: Iebeea4868b96b11e8b08735f272e22be5db1d701
Diffstat (limited to 'ui')
-rw-r--r--ui/build/config.go4
1 files changed, 3 insertions, 1 deletions
diff --git a/ui/build/config.go b/ui/build/config.go
index e21e1fab..e677d930 100644
--- a/ui/build/config.go
+++ b/ui/build/config.go
@@ -51,7 +51,9 @@ func NewConfig(ctx Context, args ...string) Config {
}
// Make sure OUT_DIR is set appropriately
- if _, ok := ret.environ.Get("OUT_DIR"); !ok {
+ if outDir, ok := ret.environ.Get("OUT_DIR"); ok {
+ ret.environ.Set("OUT_DIR", filepath.Clean(outDir))
+ } else {
outDir := "out"
if baseDir, ok := ret.environ.Get("OUT_DIR_COMMON_BASE"); ok {
if wd, err := os.Getwd(); err != nil {