diff options
author | 2020-05-20 07:55:56 -0700 | |
---|---|---|
committer | 2020-05-20 07:57:37 -0700 | |
commit | 1372c1b430d441aa28aa87926f49e2e2cc00c0b6 (patch) | |
tree | 18d9f5be53d310d88f99911665ac9168b6a2a3f8 /remoteexec/remoteexec.go | |
parent | 56b92cf177cbabe7bf4981628a8f0c0095684456 (diff) |
Add support for remote-execution / caching of turbine actions
Test: Ran a sample turbine action with:
RBE_TURBINE_EXEC_STRATEGY="remote" RBE_TURBINE="true" ... use_rbe m out/soong/.intermediates/external/protobuf/libprotobuf-java-micro/android_common/turbine/libprotobuf-java-micro.jar
and checked in reproxy_log.txt that remote-metadata had status SUCCESS.
Bug: b/156765475
Change-Id: I85c334e6998c6dd2a68460b3580d50fffd900e6f
Diffstat (limited to 'remoteexec/remoteexec.go')
-rw-r--r-- | remoteexec/remoteexec.go | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/remoteexec/remoteexec.go b/remoteexec/remoteexec.go index 99e29dc0f..2b513b244 100644 --- a/remoteexec/remoteexec.go +++ b/remoteexec/remoteexec.go @@ -75,6 +75,9 @@ type REParams struct { // OutputFiles is a list of output file paths or ninja variables as placeholders for rule // outputs. OutputFiles []string + // OutputDirectories is a list of output directory paths or ninja variables as placeholders + // for rule outputs. + OutputDirectories []string // ToolchainInputs is a list of paths or ninja variables pointing to the location of // toolchain binaries used by the rule. ToolchainInputs []string @@ -151,6 +154,10 @@ func (r *REParams) wrapperArgs() string { args += " --output_files=" + strings.Join(r.OutputFiles, ",") } + if len(r.OutputDirectories) > 0 { + args += " --output_directories=" + strings.Join(r.OutputDirectories, ",") + } + if len(r.ToolchainInputs) > 0 { args += " --toolchain_inputs=" + strings.Join(r.ToolchainInputs, ",") } @@ -159,7 +166,9 @@ func (r *REParams) wrapperArgs() string { } // StaticRules returns a pair of rules based on the given RuleParams, where the first rule is a -// locally executable rule and the second rule is a remotely executable rule. +// locally executable rule and the second rule is a remotely executable rule. commonArgs are args +// used for both the local and remotely executable rules. reArgs are used only for remote +// execution. func StaticRules(ctx android.PackageContext, name string, ruleParams blueprint.RuleParams, reParams *REParams, commonArgs []string, reArgs []string) (blueprint.Rule, blueprint.Rule) { ruleParamsRE := ruleParams ruleParams.Command = strings.ReplaceAll(ruleParams.Command, "$reTemplate", "") |