Disable unsupported Rust targets.
Explicitly disable targets requiring unsupported toolchains when processing Rust modules. Bug: 140640858 Test: Darwin builds no longer breaking. Change-Id: I8c60a2829508ae6de16bf347060818ca5c04f65e
This commit is contained in:
18
rust/rust.go
18
rust/rust.go
@@ -173,6 +173,24 @@ func (mod *Module) Init() android.Module {
|
||||
|
||||
android.InitDefaultableModule(mod)
|
||||
|
||||
// Explicitly disable unsupported targets.
|
||||
android.AddLoadHook(mod, func(ctx android.LoadHookContext) {
|
||||
disableTargets := struct {
|
||||
Target struct {
|
||||
Darwin struct {
|
||||
Enabled *bool
|
||||
}
|
||||
Linux_bionic struct {
|
||||
Enabled *bool
|
||||
}
|
||||
}
|
||||
}{}
|
||||
disableTargets.Target.Darwin.Enabled = proptools.BoolPtr(false)
|
||||
disableTargets.Target.Linux_bionic.Enabled = proptools.BoolPtr(false)
|
||||
|
||||
ctx.AppendProperties(&disableTargets)
|
||||
})
|
||||
|
||||
return mod
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user