Use musl rust prebuilts for USE_HOST_MUSL=true
Building rust code with musl enabled can load proc macro crates built against musl into rustc, so we have to use a version of rustc also built against musl. Bug: 216192129 Test: m USE_HOST_MUSL=true host-native Change-Id: Icd23b542a4b64a975850a8a4bb4b69183cc6c2c6
This commit is contained in:
@@ -78,7 +78,13 @@ var (
|
||||
|
||||
func init() {
|
||||
pctx.SourcePathVariable("RustDefaultBase", RustDefaultBase)
|
||||
pctx.VariableConfigMethod("HostPrebuiltTag", android.Config.PrebuiltOS)
|
||||
pctx.VariableConfigMethod("HostPrebuiltTag", func(config android.Config) string {
|
||||
if config.UseHostMusl() {
|
||||
return "linux-musl-x86"
|
||||
} else {
|
||||
return config.PrebuiltOS()
|
||||
}
|
||||
})
|
||||
|
||||
pctx.VariableFunc("RustBase", func(ctx android.PackageVarContext) string {
|
||||
if override := ctx.Config().Getenv("RUST_PREBUILTS_BASE"); override != "" {
|
||||
|
Reference in New Issue
Block a user