Disable cc_benchmark for Darwin hosts am: 0b24c74fcb
am: e2934f369d
Change-Id: Id313301de1ea6af65dc173708a844d7ad200ca55
This commit is contained in:
@@ -267,12 +267,12 @@ func ArchMutator(mctx BottomUpMutatorContext) {
|
|||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
osClasses := module.base().OsClassSupported()
|
if !module.base().ArchSpecific() {
|
||||||
|
|
||||||
if len(osClasses) == 0 {
|
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
|
osClasses := module.base().OsClassSupported()
|
||||||
|
|
||||||
var moduleTargets []Target
|
var moduleTargets []Target
|
||||||
primaryModules := make(map[int]bool)
|
primaryModules := make(map[int]bool)
|
||||||
|
|
||||||
|
@@ -152,6 +152,7 @@ type commonProperties struct {
|
|||||||
|
|
||||||
// Set by InitAndroidModule
|
// Set by InitAndroidModule
|
||||||
HostOrDeviceSupported HostOrDeviceSupported `blueprint:"mutated"`
|
HostOrDeviceSupported HostOrDeviceSupported `blueprint:"mutated"`
|
||||||
|
ArchSpecific bool `blueprint:"mutated"`
|
||||||
}
|
}
|
||||||
|
|
||||||
type hostAndDeviceProperties struct {
|
type hostAndDeviceProperties struct {
|
||||||
@@ -176,6 +177,7 @@ const (
|
|||||||
DeviceSupported
|
DeviceSupported
|
||||||
HostAndDeviceSupported
|
HostAndDeviceSupported
|
||||||
HostAndDeviceDefault
|
HostAndDeviceDefault
|
||||||
|
NeitherHostNorDeviceSupported
|
||||||
)
|
)
|
||||||
|
|
||||||
func InitAndroidModule(m Module,
|
func InitAndroidModule(m Module,
|
||||||
@@ -197,6 +199,7 @@ func InitAndroidArchModule(m Module, hod HostOrDeviceSupported, defaultMultilib
|
|||||||
base := m.base()
|
base := m.base()
|
||||||
base.commonProperties.HostOrDeviceSupported = hod
|
base.commonProperties.HostOrDeviceSupported = hod
|
||||||
base.commonProperties.Default_multilib = string(defaultMultilib)
|
base.commonProperties.Default_multilib = string(defaultMultilib)
|
||||||
|
base.commonProperties.ArchSpecific = true
|
||||||
|
|
||||||
switch hod {
|
switch hod {
|
||||||
case HostAndDeviceSupported:
|
case HostAndDeviceSupported:
|
||||||
@@ -305,6 +308,10 @@ func (a *ModuleBase) Arch() Arch {
|
|||||||
return a.Target().Arch
|
return a.Target().Arch
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func (a *ModuleBase) ArchSpecific() bool {
|
||||||
|
return a.commonProperties.ArchSpecific
|
||||||
|
}
|
||||||
|
|
||||||
func (a *ModuleBase) OsClassSupported() []OsClass {
|
func (a *ModuleBase) OsClassSupported() []OsClass {
|
||||||
switch a.commonProperties.HostOrDeviceSupported {
|
switch a.commonProperties.HostOrDeviceSupported {
|
||||||
case HostSupported:
|
case HostSupported:
|
||||||
|
11
cc/test.go
11
cc/test.go
@@ -16,6 +16,7 @@ package cc
|
|||||||
|
|
||||||
import (
|
import (
|
||||||
"path/filepath"
|
"path/filepath"
|
||||||
|
"runtime"
|
||||||
"strings"
|
"strings"
|
||||||
|
|
||||||
"github.com/google/blueprint"
|
"github.com/google/blueprint"
|
||||||
@@ -301,6 +302,16 @@ func (benchmark *benchmarkDecorator) install(ctx ModuleContext, file android.Pat
|
|||||||
}
|
}
|
||||||
|
|
||||||
func NewBenchmark(hod android.HostOrDeviceSupported) *Module {
|
func NewBenchmark(hod android.HostOrDeviceSupported) *Module {
|
||||||
|
// Benchmarks aren't supported on Darwin
|
||||||
|
if runtime.GOOS == "darwin" {
|
||||||
|
switch hod {
|
||||||
|
case android.HostAndDeviceSupported:
|
||||||
|
hod = android.DeviceSupported
|
||||||
|
case android.HostSupported:
|
||||||
|
hod = android.NeitherHostNorDeviceSupported
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
module, binary := NewBinary(hod)
|
module, binary := NewBinary(hod)
|
||||||
module.multilib = android.MultilibBoth
|
module.multilib = android.MultilibBoth
|
||||||
binary.baseInstaller = NewTestInstaller()
|
binary.baseInstaller = NewTestInstaller()
|
||||||
|
Reference in New Issue
Block a user