Merge "Limit calls to strip.sh on darwin"
This commit is contained in:
@@ -123,12 +123,25 @@ var (
|
|||||||
_ = pctx.SourcePathVariable("stripPath", "build/soong/scripts/strip.sh")
|
_ = pctx.SourcePathVariable("stripPath", "build/soong/scripts/strip.sh")
|
||||||
_ = pctx.SourcePathVariable("xzCmd", "prebuilts/build-tools/${config.HostPrebuiltTag}/bin/xz")
|
_ = pctx.SourcePathVariable("xzCmd", "prebuilts/build-tools/${config.HostPrebuiltTag}/bin/xz")
|
||||||
|
|
||||||
|
// b/132822437: objcopy uses a file descriptor per .o file when called on .a files, which runs the system out of
|
||||||
|
// file descriptors on darwin. Limit concurrent calls to 10 on darwin.
|
||||||
|
darwinStripPool = func() blueprint.Pool {
|
||||||
|
if runtime.GOOS == "darwin" {
|
||||||
|
return pctx.StaticPool("darwinStripPool", blueprint.PoolParams{
|
||||||
|
Depth: 10,
|
||||||
|
})
|
||||||
|
} else {
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
}()
|
||||||
|
|
||||||
strip = pctx.AndroidStaticRule("strip",
|
strip = pctx.AndroidStaticRule("strip",
|
||||||
blueprint.RuleParams{
|
blueprint.RuleParams{
|
||||||
Depfile: "${out}.d",
|
Depfile: "${out}.d",
|
||||||
Deps: blueprint.DepsGCC,
|
Deps: blueprint.DepsGCC,
|
||||||
Command: "CROSS_COMPILE=$crossCompile XZ=$xzCmd CLANG_BIN=${config.ClangBin} $stripPath ${args} -i ${in} -o ${out} -d ${out}.d",
|
Command: "CROSS_COMPILE=$crossCompile XZ=$xzCmd CLANG_BIN=${config.ClangBin} $stripPath ${args} -i ${in} -o ${out} -d ${out}.d",
|
||||||
CommandDeps: []string{"$stripPath", "$xzCmd"},
|
CommandDeps: []string{"$stripPath", "$xzCmd"},
|
||||||
|
Pool: darwinStripPool,
|
||||||
},
|
},
|
||||||
"args", "crossCompile")
|
"args", "crossCompile")
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user