Merge "Allow specifying sub-dir in sbox output" into main am: b129b7cba2
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/2954138 Change-Id: Id9e9b8f7f9b78604dbe5233883c526c9c1589a79 Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
This commit is contained in:
commit
884252056c
1 changed files with 6 additions and 2 deletions
|
@ -1157,11 +1157,15 @@ func (c *RuleBuilderCommand) Outputs(paths WritablePaths) *RuleBuilderCommand {
|
|||
|
||||
// OutputDir adds the output directory to the command line. This is only available when used with RuleBuilder.Sbox,
|
||||
// and will be the temporary output directory managed by sbox, not the final one.
|
||||
func (c *RuleBuilderCommand) OutputDir() *RuleBuilderCommand {
|
||||
func (c *RuleBuilderCommand) OutputDir(subPathComponents ...string) *RuleBuilderCommand {
|
||||
if !c.rule.sbox {
|
||||
panic("OutputDir only valid with Sbox")
|
||||
}
|
||||
return c.Text(sboxOutDir)
|
||||
path := sboxOutDir
|
||||
if len(subPathComponents) > 0 {
|
||||
path = filepath.Join(append([]string{sboxOutDir}, subPathComponents...)...)
|
||||
}
|
||||
return c.Text(path)
|
||||
}
|
||||
|
||||
// DepFile adds the specified depfile path to the paths returned by RuleBuilder.DepFiles and adds it to the command
|
||||
|
|
Loading…
Reference in a new issue