================ @@ -0,0 +1,14 @@ +// RUN: not %clang_cc1 -triple riscv64-linux-gnu -target-feature +i -S -emit-llvm -o - %s 2>&1 | FileCheck %s --check-prefix=CHECK-UNSUPPORT-EXT +// RUN: not %clang_cc1 -triple riscv64 -target-feature +i -S -emit-llvm -o - %s 2>&1 | FileCheck %s --check-prefix=CHECK-UNSUPPORT-OS + +// CHECK-UNSUPPORT-EXT: error: Unsupport 'zicsr' for _riscv_hwprobe +__attribute__((target_clones("default", "arch=+zicsr"))) int foo1(void) { + return 1; +} + +// CHECK-UNSUPPORT-OS: error: Only Linux support _riscv_hwprobe ---------------- jrtc27 wrote:
That's not the right error message still. "<Linux-specific system call> is only supported on Linux" isn't the point, the point is that the current implementation only supports Linux because it is written to use that specific system call. Other OSes can and likely will provide alternative interfaces that could equally be used. https://github.com/llvm/llvm-project/pull/85786 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits