From 0c38c5ea1719bcb502ae5d15eed1bd90f6b1d3cd Mon Sep 17 00:00:00 2001 From: Dan Willemsen Date: Tue, 29 Mar 2016 17:31:57 -0700 Subject: [PATCH] Only add -fdebug-prefix-map on Linux hosts Change-Id: I4fb865fbe40020f2d69d598491e755f793b62b7c --- cc/cc.go | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/cc/cc.go b/cc/cc.go index ec26f7435..9f582cb4f 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, " "))