aboutsummaryrefslogtreecommitdiffstats
path: root/cc
diff options
context:
space:
mode:
authorDan Willemsen <dwillemsen@google.com>2016-03-29 17:31:57 -0700
committerDan Willemsen <dwillemsen@google.com>2016-03-29 18:03:54 -0700
commit0c38c5ea1719bcb502ae5d15eed1bd90f6b1d3cd (patch)
tree47591634278821cd707917f0e4f9238a1e490e04 /cc
parent7b106e4e9fb13e39ac9a1613a7ddeac3fef2d4b1 (diff)
downloadbuild_soong-0c38c5ea1719bcb502ae5d15eed1bd90f6b1d3cd.tar.gz
build_soong-0c38c5ea1719bcb502ae5d15eed1bd90f6b1d3cd.tar.bz2
build_soong-0c38c5ea1719bcb502ae5d15eed1bd90f6b1d3cd.zip
Only add -fdebug-prefix-map on Linux hosts
Change-Id: I4fb865fbe40020f2d69d598491e755f793b62b7c
Diffstat (limited to 'cc')
-rw-r--r--cc/cc.go5
1 files changed, 4 insertions, 1 deletions
diff --git a/cc/cc.go b/cc/cc.go
index ec26f743..9f582cb4 100644
--- a/cc/cc.go
+++ b/cc/cc.go
@@ -79,7 +79,6 @@ var (
"-Wno-unused",
"-Winit-self",
"-Wpointer-arith",
- "-fdebug-prefix-map=/proc/self/cwd=",
// COMMON_RELEASE_CFLAGS
"-DNDEBUG",
@@ -114,6 +113,10 @@ var (
)
func init() {
+ if common.CurrentHostType() == common.Linux {
+ commonGlobalCflags = append(commonGlobalCflags, "-fdebug-prefix-map=/proc/self/cwd=")
+ }
+
pctx.StaticVariable("commonGlobalCflags", strings.Join(commonGlobalCflags, " "))
pctx.StaticVariable("deviceGlobalCflags", strings.Join(deviceGlobalCflags, " "))
pctx.StaticVariable("hostGlobalCflags", strings.Join(hostGlobalCflags, " "))