[clang] [Driver] Support -mcmodel= for LoongArch (PR #72514)

Fangrui Song via cfe-commits cfe-commits at lists.llvm.org
Wed Nov 22 10:45:51 PST 2023


================
@@ -15,6 +15,15 @@
 // RUN: not %clang -### -c --target=aarch64 -mcmodel=medium %s 2>&1 | FileCheck --check-prefix=ERR-MEDIUM %s
 // RUN: not %clang -### -c --target=aarch64 -mcmodel=kernel %s 2>&1 | FileCheck --check-prefix=ERR-KERNEL %s
 // RUN: not %clang --target=aarch64_32-linux -### -S -mcmodel=small %s 2>&1 | FileCheck --check-prefix=ERR-AARCH64_32 %s
+// RUN: %clang --target=loongarch64 -### -S -mcmodel=small %s 2>&1 | FileCheck --check-prefix=SMALL %s
+// RUN: %clang --target=loongarch64 -### -S -mcmodel=normal %s 2>&1 | FileCheck --check-prefix=SMALL %s
----------------
MaskRay wrote:

If `-mcmodel=normal` is canonical, we probably should not add Clang-specific alias `small`. Reject `normal`.

https://github.com/llvm/llvm-project/pull/72514


More information about the cfe-commits mailing list