From 2c90a92d776d1a51d343de2a433d1921d5c873ed Mon Sep 17 00:00:00 2001 From: AdityaK Date: Mon, 26 Feb 2024 10:59:44 -0800 Subject: [PATCH] Update unaligned-vector-mem to -munaligned-access Latest compiler has merged both unaligned access flags into one. TODO: This is needed until we change clang driver to enable -munaligned access by default.for Android b/327307773 Bug: 326790418 Change-Id: Ia8c29dc56104d2cffb8ac41aae6eeacccae68e61 --- cc/config/riscv64_device.go | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/cc/config/riscv64_device.go b/cc/config/riscv64_device.go index deb922bd2..6a84fee9f 100644 --- a/cc/config/riscv64_device.go +++ b/cc/config/riscv64_device.go @@ -26,9 +26,7 @@ var ( // Help catch common 32/64-bit errors. "-Werror=implicit-function-declaration", "-march=rv64gcv_zba_zbb_zbs", - // Equivalent to "-munaligned-access", but our clang doesn't have that yet. - "-Xclang -target-feature -Xclang +unaligned-scalar-mem", - "-Xclang -target-feature -Xclang +unaligned-vector-mem", + "-munaligned-access", // Until https://gitlab.com/qemu-project/qemu/-/issues/1976 is fixed... "-mno-implicit-float", // (https://github.com/google/android-riscv64/issues/124) @@ -40,9 +38,7 @@ var ( riscv64Ldflags = []string{ "-Wl,--hash-style=gnu", "-march=rv64gcv_zba_zbb_zbs", - // Equivalent to "-munaligned-access", but our clang doesn't have that yet. - "-Xclang -target-feature -Xclang +unaligned-scalar-mem", - "-Xclang -target-feature -Xclang +unaligned-vector-mem", + "-munaligned-access", // We should change the default for this in clang, but for now... // (https://github.com/google/android-riscv64/issues/124) "-Wl,-mllvm -Wl,-jump-is-expensive=false",