aboutsummaryrefslogtreecommitdiffstats
path: root/common
diff options
context:
space:
mode:
authorColin Cross <ccross@android.com>2015-04-30 16:36:18 -0700
committerColin Cross <ccross@android.com>2015-05-07 14:09:48 -0700
commit0af4b8468b881a009e147cea63e3da76578530a7 (patch)
tree147416500fac7f29e9f7100df466e09ba8db3560 /common
parent5e1efb5812cf5d0b5d2462a335435e109ad37bab (diff)
downloadbuild_soong-0af4b8468b881a009e147cea63e3da76578530a7.tar.gz
build_soong-0af4b8468b881a009e147cea63e3da76578530a7.tar.bz2
build_soong-0af4b8468b881a009e147cea63e3da76578530a7.zip
Add support for building on Darwin hosts
Add toolchain and build rules for building on Darwin. Change-Id: I78e21f4051b2941182121b28c9ddfa24396ada41
Diffstat (limited to 'common')
-rw-r--r--common/module.go6
1 files changed, 6 insertions, 0 deletions
diff --git a/common/module.go b/common/module.go
index bafb583f..d9337885 100644
--- a/common/module.go
+++ b/common/module.go
@@ -16,6 +16,7 @@ package common
import (
"path/filepath"
+ "runtime"
"github.com/google/blueprint"
)
@@ -33,6 +34,7 @@ type androidBaseContext interface {
Arch() Arch
Host() bool
Device() bool
+ Darwin() bool
Debug() bool
AConfig() Config
}
@@ -372,6 +374,10 @@ func (a *androidBaseContextImpl) Device() bool {
return a.arch.HostOrDevice.Device()
}
+func (a *androidBaseContextImpl) Darwin() bool {
+ return a.arch.HostOrDevice.Host() && runtime.GOOS == "darwin"
+}
+
func (a *androidBaseContextImpl) Debug() bool {
return a.debug
}