Merge "SOONG_NINJA_ARGS to pass ninja args to soong_ui"
This commit is contained in:
commit
96f2534761
1 changed files with 6 additions and 0 deletions
|
@ -22,6 +22,7 @@ import (
|
|||
"os"
|
||||
"path/filepath"
|
||||
"strconv"
|
||||
"strings"
|
||||
|
||||
"android/soong/ui/metrics"
|
||||
soong_metrics_proto "android/soong/ui/metrics/metrics_proto"
|
||||
|
@ -445,6 +446,11 @@ func runSoong(ctx Context, config Config) {
|
|||
"-f", filepath.Join(config.SoongOutDir(), ninjaFile),
|
||||
}
|
||||
|
||||
if extra, ok := config.Environment().Get("SOONG_UI_NINJA_ARGS"); ok {
|
||||
ctx.Printf(`CAUTION: arguments in $SOONG_UI_NINJA_ARGS=%q, e.g. "-n", can make soong_build FAIL or INCORRECT`, extra)
|
||||
ninjaArgs = append(ninjaArgs, strings.Fields(extra)...)
|
||||
}
|
||||
|
||||
ninjaArgs = append(ninjaArgs, targets...)
|
||||
cmd := Command(ctx, config, "soong "+name,
|
||||
config.PrebuiltBuildTool("ninja"), ninjaArgs...)
|
||||
|
|
Loading…
Reference in a new issue