aboutsummaryrefslogtreecommitdiffstats
path: root/cc
diff options
context:
space:
mode:
authorDan Willemsen <dwillemsen@google.com>2016-03-30 04:07:54 +0000
committerGerrit Code Review <noreply-gerritcodereview@google.com>2016-03-30 04:07:54 +0000
commit99b5a09022a06a09d20a6fe0c25bdf9f369aaa5c (patch)
tree6c113676a50d80793f5bbdca4af005b8a055b890 /cc
parente925ffce03086c8654265705a7e0d3f4558ff5e9 (diff)
parent0c38c5ea1719bcb502ae5d15eed1bd90f6b1d3cd (diff)
downloadbuild_soong-99b5a09022a06a09d20a6fe0c25bdf9f369aaa5c.tar.gz
build_soong-99b5a09022a06a09d20a6fe0c25bdf9f369aaa5c.tar.bz2
build_soong-99b5a09022a06a09d20a6fe0c25bdf9f369aaa5c.zip
Merge "Only add -fdebug-prefix-map on Linux hosts"
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, " "))