From 820ec84427cd17728d5bd77b34d8052410c4bba1 Mon Sep 17 00:00:00 2001 From: Chris Wailes Date: Wed, 13 Sep 2023 16:39:17 -0700 Subject: [PATCH] Enable target features for riscv64 Rust builds This CL enables the following features for riscv64 Rust builds in Android: V, Zba, Zbb, and Zbs Test: m rust Bug: 300313717 Bug: 300312461 Change-Id: I8712b1850a60a05e99a3e89e602bb56d2ccf2563 --- rust/config/riscv64_device.go | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/rust/config/riscv64_device.go b/rust/config/riscv64_device.go index e9aa8ef61..0a9c61a64 100644 --- a/rust/config/riscv64_device.go +++ b/rust/config/riscv64_device.go @@ -24,8 +24,12 @@ var ( Riscv64RustFlags = []string{ "-C force-frame-pointers=y", } - Riscv64ArchFeatureRustFlags = map[string][]string{"": {}} - Riscv64LinkFlags = []string{} + Riscv64ArchFeatureRustFlags = map[string][]string{ + "riscv64": { + "-C target-feature=+V,+Zba,+Zbb,+Zbs", + }, + } + Riscv64LinkFlags = []string{} Riscv64ArchVariantRustFlags = map[string][]string{"": {}} )