SOONG_NINJA_ARGS to pass ninja args to soong_ui
Cf soong_build, allow soong_ui to support additional ninja arguments Test: NINJA_ARGS='-d explain' nothing Bug: N/A Change-Id: I42827fb817bed432251e9b0b94b15a4f6f78cb03
This commit is contained in:
@@ -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...)
|
||||
|
Reference in New Issue
Block a user