[clang] [RISCV] Add -march=unset to cancel and ignore a previous -march. (PR #148321)
Fangrui Song via cfe-commits
cfe-commits at lists.llvm.org
Fri Jul 11 19:29:28 PDT 2025
================
@@ -403,6 +403,11 @@
// MCPU-MARCH: "-nostdsysteminc" "-target-cpu" "sifive-e31" "-target-feature" "+m" "-target-feature" "+c"
// MCPU-MARCH: "-target-abi" "ilp32"
+// march=unset erases previous march
+// RUN: %clang --target=riscv32 -### -c %s 2>&1 -march=rv32imc -march=unset -mcpu=sifive-e31 | FileCheck -check-prefix=MARCH-UNSET %s
+// MARCH-UNSET: "-nostdsysteminc" "-target-cpu" "sifive-e31" "-target-feature" "+m" "-target-feature" "+a" "-target-feature" "+c"
+// MARCH-UNSET: "-target-abi" "ilp32"
----------------
MaskRay wrote:
Add -SAME if applicable.
https://github.com/llvm/llvm-project/pull/148321
More information about the cfe-commits
mailing list