Merge "Use create_minidebuginfo tool instead of bash script."

This commit is contained in:
David Srbecky
2021-05-03 15:42:01 +00:00
committed by Gerrit Code Review
3 changed files with 40 additions and 6 deletions

View File

@@ -126,15 +126,22 @@ var (
_ = pctx.SourcePathVariable("stripPath", "build/soong/scripts/strip.sh")
_ = pctx.SourcePathVariable("xzCmd", "prebuilts/build-tools/${config.HostPrebuiltTag}/bin/xz")
_ = pctx.SourcePathVariable("createMiniDebugInfo", "prebuilts/build-tools/${config.HostPrebuiltTag}/bin/create_minidebuginfo")
// Rule to invoke `strip` (to discard symbols and data from object files).
strip = pctx.AndroidStaticRule("strip",
blueprint.RuleParams{
Depfile: "${out}.d",
Deps: blueprint.DepsGCC,
Command: "XZ=$xzCmd CLANG_BIN=${config.ClangBin} $stripPath ${args} -i ${in} -o ${out} -d ${out}.d",
CommandDeps: []string{"$stripPath", "$xzCmd"},
Pool: darwinStripPool,
Depfile: "${out}.d",
Deps: blueprint.DepsGCC,
Command: "XZ=$xzCmd CREATE_MINIDEBUGINFO=$createMiniDebugInfo CLANG_BIN=${config.ClangBin} $stripPath ${args} -i ${in} -o ${out} -d ${out}.d",
CommandDeps: func() []string {
if runtime.GOOS != "darwin" {
return []string{"$stripPath", "$xzCmd", "$createMiniDebugInfo"}
} else {
return []string{"$stripPath", "$xzCmd"}
}
}(),
Pool: darwinStripPool,
},
"args", "crossCompile")

View File

@@ -151,6 +151,7 @@ func makeVarsProvider(ctx android.MakeVarsContext) {
ctx.Strict("SOONG_STRIP_PATH", "${stripPath}")
ctx.Strict("XZ", "${xzCmd}")
ctx.Strict("CREATE_MINIDEBUGINFO", "${createMiniDebugInfo}")
includeFlags, err := ctx.Eval("${config.CommonGlobalIncludes}")
if err != nil {