Add support for building on Darwin hosts
Add toolchain and build rules for building on Darwin.
Change-Id: I78e21f4051b2941182121b28c9ddfa24396ada41
diff --git a/common/module.go b/common/module.go
index bafb583..d933788 100644
--- a/common/module.go
+++ b/common/module.go
@@ -16,6 +16,7 @@
import (
"path/filepath"
+ "runtime"
"github.com/google/blueprint"
)
@@ -33,6 +34,7 @@
Arch() Arch
Host() bool
Device() bool
+ Darwin() bool
Debug() bool
AConfig() Config
}
@@ -372,6 +374,10 @@
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
}