Merge "Add -fdebug-compilation-dir option"
This commit is contained in:
@@ -44,14 +44,14 @@ var (
|
|||||||
blueprint.RuleParams{
|
blueprint.RuleParams{
|
||||||
Depfile: "${out}.d",
|
Depfile: "${out}.d",
|
||||||
Deps: blueprint.DepsGCC,
|
Deps: blueprint.DepsGCC,
|
||||||
Command: "$relPwd ${config.CcWrapper}$ccCmd -c $cFlags -MD -MF ${out}.d -o $out $in",
|
Command: "${config.CcWrapper}$ccCmd -c $cFlags -MD -MF ${out}.d -o $out $in",
|
||||||
CommandDeps: []string{"$ccCmd"},
|
CommandDeps: []string{"$ccCmd"},
|
||||||
},
|
},
|
||||||
"ccCmd", "cFlags")
|
"ccCmd", "cFlags")
|
||||||
|
|
||||||
ccNoDeps = pctx.AndroidStaticRule("ccNoDeps",
|
ccNoDeps = pctx.AndroidStaticRule("ccNoDeps",
|
||||||
blueprint.RuleParams{
|
blueprint.RuleParams{
|
||||||
Command: "$relPwd $ccCmd -c $cFlags -o $out $in",
|
Command: "$ccCmd -c $cFlags -o $out $in",
|
||||||
CommandDeps: []string{"$ccCmd"},
|
CommandDeps: []string{"$ccCmd"},
|
||||||
},
|
},
|
||||||
"ccCmd", "cFlags")
|
"ccCmd", "cFlags")
|
||||||
|
@@ -53,6 +53,13 @@ var (
|
|||||||
"-Werror=pragma-pack",
|
"-Werror=pragma-pack",
|
||||||
"-Werror=pragma-pack-suspicious-include",
|
"-Werror=pragma-pack-suspicious-include",
|
||||||
"-Werror=unreachable-code-loop-increment",
|
"-Werror=unreachable-code-loop-increment",
|
||||||
|
|
||||||
|
// -fdebug-compilation-dir=. is used to make both the action command line and the output
|
||||||
|
// independent of the working directory of the action.
|
||||||
|
// Using cc1 flags since RBE's input processor does not yet have the updated version
|
||||||
|
// of LLVM that promotes the cc1 flag to driver level flag.
|
||||||
|
// See: https://reviews.llvm.org/D63387
|
||||||
|
"-Xclang,-fdebug-compilation-dir,.",
|
||||||
}
|
}
|
||||||
|
|
||||||
commonGlobalConlyflags = []string{}
|
commonGlobalConlyflags = []string{}
|
||||||
@@ -150,10 +157,6 @@ var (
|
|||||||
var pctx = android.NewPackageContext("android/soong/cc/config")
|
var pctx = android.NewPackageContext("android/soong/cc/config")
|
||||||
|
|
||||||
func init() {
|
func init() {
|
||||||
if android.BuildOs == android.Linux {
|
|
||||||
commonGlobalCflags = append(commonGlobalCflags, "-fdebug-prefix-map=/proc/self/cwd=")
|
|
||||||
}
|
|
||||||
|
|
||||||
pctx.StaticVariable("CommonGlobalConlyflags", strings.Join(commonGlobalConlyflags, " "))
|
pctx.StaticVariable("CommonGlobalConlyflags", strings.Join(commonGlobalConlyflags, " "))
|
||||||
pctx.StaticVariable("DeviceGlobalCppflags", strings.Join(deviceGlobalCppflags, " "))
|
pctx.StaticVariable("DeviceGlobalCppflags", strings.Join(deviceGlobalCppflags, " "))
|
||||||
pctx.StaticVariable("DeviceGlobalLdflags", strings.Join(deviceGlobalLdflags, " "))
|
pctx.StaticVariable("DeviceGlobalLdflags", strings.Join(deviceGlobalLdflags, " "))
|
||||||
|
Reference in New Issue
Block a user