diff options
Diffstat (limited to 'ui/build/config.go')
-rw-r--r-- | ui/build/config.go | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/ui/build/config.go b/ui/build/config.go index 27ed8e9f..f95eb646 100644 --- a/ui/build/config.go +++ b/ui/build/config.go @@ -65,7 +65,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 { @@ -74,6 +78,8 @@ func NewConfig(ctx Context, args ...string) Config { } else { outDir = filepath.Join(baseDir, filepath.Base(wd)) } + } else { + outDir = filepath.Join(os.Getenv("TOP"), outDir) } ret.environ.Set("OUT_DIR", outDir) } @@ -282,6 +288,9 @@ func (c *configImpl) configureLocale(ctx Context) { // for others) if inList("C.UTF-8", locales) { c.environ.Set("LANG", "C.UTF-8") + } else if inList("C.utf8", locales) { + // These normalize to the same thing + c.environ.Set("LANG", "C.UTF-8") } else if inList("en_US.UTF-8", locales) { c.environ.Set("LANG", "en_US.UTF-8") } else if inList("en_US.utf8", locales) { |