diff options
author | Adrian DC <radian.dc@gmail.com> | 2018-08-10 17:07:47 +0200 |
---|---|---|
committer | Adrian DC <radian.dc@gmail.com> | 2018-08-10 17:18:27 +0200 |
commit | bb70bebe3566681460f225f298b475ddb35e8dd3 (patch) | |
tree | 349d25062ddb16928f1b01a3bf4d177872e09f9f | |
parent | 97bb6d91ffd453c41a9b66d5a6cce2ee26e29ca9 (diff) | |
download | build_soong-lineage-15.1.tar.gz build_soong-lineage-15.1.tar.bz2 build_soong-lineage-15.1.zip |
soong: Enforce absolute path if OUT_DIR is setlineage-15.1
* Follows "soong: use absolute path for OUT_DIR"
to resolve inline kernel building when
export OUT_DIR=out or =out_name
Change-Id: I6560ec163cc6508f211bb1cd65d565015141d79b
-rw-r--r-- | ui/build/config.go | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/ui/build/config.go b/ui/build/config.go index 6cdcd12a..34a49368 100644 --- a/ui/build/config.go +++ b/ui/build/config.go @@ -61,7 +61,11 @@ func NewConfig(ctx Context, args ...string) Config { // Make sure OUT_DIR is set appropriately if outDir, ok := ret.environ.Get("OUT_DIR"); ok { - ret.environ.Set("OUT_DIR", filepath.Clean(outDir)) + outDir := filepath.Clean(outDir) + if (!filepath.IsAbs(outDir)) { + outDir = filepath.Join(os.Getenv("TOP"), outDir) + } + ret.environ.Set("OUT_DIR", outDir) } else { outDir := "out" if baseDir, ok := ret.environ.Get("OUT_DIR_COMMON_BASE"); ok { |