[clang] [clang][LoongArch] Add OHOS target (PR #127555)

Lu Weining via cfe-commits cfe-commits at lists.llvm.org
Thu Feb 20 01:29:50 PST 2025


================
@@ -235,3 +235,24 @@
 
 // CHECK-OHOS-PTHREAD-NOT: -lpthread
 
+// RUN: %clang -### --target=aarch64-linux-ohos %s 2>&1 | \
+// RUN:   FileCheck --check-prefix=CHECK-MAXPAGESIZE-4KB %s
+// RUN: %clang -### --target=aarch64-none-linux-gnu %s 2>&1 | \
+// RUN:   FileCheck --check-prefix=CHECK-NO-MAXPAGESIZE %s
+// RUN: %clang -### --target=loongarch64-linux-ohos %s 2>&1 | \
+// RUN:   FileCheck --check-prefix=CHECK-MAXPAGESIZE-16KB %s
+// RUN: %clang -### --target=loongarch64-linux-gnu %s 2>&1 | \
+// RUN:   FileCheck --check-prefix=CHECK-NO-MAXPAGESIZE %s
+// RUN: %clang -### --target=riscv64-linux-ohos %s 2>&1 | \
+// RUN:   FileCheck --check-prefix=CHECK-MAXPAGESIZE-4KB %s
+// RUN: %clang -### --target=riscv64-unknown-linux-gnu %s 2>&1 | \
+// RUN:   FileCheck --check-prefix=CHECK-NO-MAXPAGESIZE %s
+// RUN: %clang -### --target=x86_64-linux-ohos %s 2>&1 | \
+// RUN:   FileCheck --check-prefix=CHECK-MAXPAGESIZE-4KB %s
+// RUN: %clang -### --target=x86_64-none-linux-gnu %s 2>&1 | \
+// RUN:   FileCheck --check-prefix=CHECK-NO-MAXPAGESIZE %s
+
+
+// CHECK-MAXPAGESIZE-4KB: "-z" "max-page-size=4096"
+// CHECK-MAXPAGESIZE-16KB: "-z" "max-page-size=16384"
+// CHECK-NO-MAXPAGESIZE-NOT: "-z" "max-page-size=4096" "-z" "max-page-size=16384"
----------------
SixWeining wrote:

Seems this is not a good check. This check will always success no matter what the output is. I think the `gnu` checks could be removed.

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


More information about the cfe-commits mailing list