summaryrefslogtreecommitdiff
path: root/ui/build/config.go
diff options
context:
space:
mode:
Diffstat (limited to 'ui/build/config.go')
-rw-r--r--ui/build/config.go31
1 files changed, 25 insertions, 6 deletions
diff --git a/ui/build/config.go b/ui/build/config.go
index ef0615768..045f6748c 100644
--- a/ui/build/config.go
+++ b/ui/build/config.go
@@ -38,6 +38,7 @@ type configImpl struct {
keepGoing int
verbose bool
dist bool
+ skipMake bool
// From the product config
katiArgs []string
@@ -149,14 +150,11 @@ func (c *configImpl) parseArgs(ctx Context, args []string) {
for i := 0; i < len(args); i++ {
arg := strings.TrimSpace(args[i])
if arg == "--make-mode" {
- continue
} else if arg == "showcommands" {
c.verbose = true
- continue
- } else if arg == "dist" {
- c.dist = true
- }
- if arg[0] == '-' {
+ } else if arg == "--skip-make" {
+ c.skipMake = true
+ } else if arg[0] == '-' {
parseArgNum := func(def int) int {
if len(arg) > 2 {
p, err := strconv.ParseUint(arg[2:], 10, 31)
@@ -184,6 +182,9 @@ func (c *configImpl) parseArgs(ctx Context, args []string) {
} else if k, v, ok := decodeKeyValue(arg); ok && len(k) > 0 {
c.environ.Set(k, v)
} else {
+ if arg == "dist" {
+ c.dist = true
+ }
c.arguments = append(c.arguments, arg)
}
}
@@ -265,6 +266,9 @@ func (c *configImpl) DistDir() string {
}
func (c *configImpl) NinjaArgs() []string {
+ if c.skipMake {
+ return c.arguments
+ }
return c.ninjaArgs
}
@@ -291,6 +295,10 @@ func (c *configImpl) IsVerbose() bool {
return c.verbose
}
+func (c *configImpl) SkipMake() bool {
+ return c.skipMake
+}
+
func (c *configImpl) TargetProduct() string {
if v, ok := c.environ.Get("TARGET_PRODUCT"); ok {
return v
@@ -355,6 +363,14 @@ func (c *configImpl) SetKatiSuffix(suffix string) {
c.katiSuffix = suffix
}
+func (c *configImpl) LastKatiSuffixFile() string {
+ return filepath.Join(c.OutDir(), "last_kati_suffix")
+}
+
+func (c *configImpl) HasKatiSuffix() bool {
+ return c.katiSuffix != ""
+}
+
func (c *configImpl) KatiEnvFile() string {
return filepath.Join(c.OutDir(), "env"+c.KatiSuffix()+".sh")
}
@@ -368,6 +384,9 @@ func (c *configImpl) SoongNinjaFile() string {
}
func (c *configImpl) CombinedNinjaFile() string {
+ if c.katiSuffix == "" {
+ return filepath.Join(c.OutDir(), "combined.ninja")
+ }
return filepath.Join(c.OutDir(), "combined"+c.KatiSuffix()+".ninja")
}