Add support for building on Darwin hosts

Add toolchain and build rules for building on Darwin.

Change-Id: I78e21f4051b2941182121b28c9ddfa24396ada41
This commit is contained in:
Colin Cross
2015-04-30 16:36:18 -07:00
parent 5e1efb5812
commit 0af4b8468b
7 changed files with 467 additions and 31 deletions

View File

@@ -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
}