Allow remote execution of link actions.
This CL adds a remoteexec package that allows adding a configurable RBE prefix to the template. Test: built aosp crosshatch userdebug with and without RBE_CXX_LINKS. Change-Id: Ica920c3d7f79f2996210b9cbd448126451c1707c
This commit is contained in:
@@ -18,6 +18,7 @@ import (
|
||||
"strings"
|
||||
|
||||
"android/soong/android"
|
||||
"android/soong/remoteexec"
|
||||
)
|
||||
|
||||
var (
|
||||
@@ -255,6 +256,9 @@ func init() {
|
||||
}
|
||||
return ""
|
||||
})
|
||||
|
||||
pctx.VariableFunc("RECXXLinksPool", envOverrideFunc("RBE_CXX_LINKS_POOL", remoteexec.DefaultPool))
|
||||
pctx.VariableFunc("RECXXLinksExecStrategy", envOverrideFunc("RBE_CXX_LINKS_EXEC_STRATEGY", remoteexec.LocalExecStrategy))
|
||||
}
|
||||
|
||||
var HostPrebuiltTag = pctx.VariableConfigMethod("HostPrebuiltTag", android.Config.PrebuiltOS)
|
||||
@@ -268,3 +272,12 @@ func bionicHeaders(kernelArch string) string {
|
||||
"-isystem bionic/libc/kernel/android/uapi",
|
||||
}, " ")
|
||||
}
|
||||
|
||||
func envOverrideFunc(envVar, defaultVal string) func(ctx android.PackageVarContext) string {
|
||||
return func(ctx android.PackageVarContext) string {
|
||||
if override := ctx.Config().Getenv(envVar); override != "" {
|
||||
return override
|
||||
}
|
||||
return defaultVal
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user