aboutsummaryrefslogtreecommitdiffstats
path: root/ui/build/config.go
diff options
context:
space:
mode:
Diffstat (limited to 'ui/build/config.go')
-rw-r--r--ui/build/config.go9
1 files changed, 9 insertions, 0 deletions
diff --git a/ui/build/config.go b/ui/build/config.go
index 954454bc..0dbd8165 100644
--- a/ui/build/config.go
+++ b/ui/build/config.go
@@ -50,6 +50,9 @@ type configImpl struct {
targetDevice string
targetDeviceDir string
+ // Autodetected
+ totalRAM uint64
+
pdkBuild bool
brokenDupRules bool
@@ -97,6 +100,8 @@ func NewConfig(ctx Context, args ...string) Config {
ret.parallel = runtime.NumCPU() + 2
ret.keepGoing = 1
+ ret.totalRAM = detectTotalRAM(ctx)
+
ret.parseArgs(ctx, args)
// Make sure OUT_DIR is set appropriately
@@ -709,6 +714,10 @@ func (c *configImpl) Parallel() int {
return c.parallel
}
+func (c *configImpl) TotalRAM() uint64 {
+ return c.totalRAM
+}
+
func (c *configImpl) UseGoma() bool {
if v, ok := c.environ.Get("USE_GOMA"); ok {
v = strings.TrimSpace(v)