================
@@ -6,6 +6,33 @@ else()
   set(LIBCLC_TARGET_CPU "")
 endif()
 
+include(CheckCXXCompilerFlag)
+
+set(LIBCLC_TEST_ARCHITECTURE "" CACHE STRING
+  "Architecture for libclc execution tests; 'native' or a specific name")
+
+set(LIBCLC_OFFLOAD_LIBDIR "")
+
+if(NOT LIBCLC_TEST_ARCHITECTURE)
+  check_cxx_compiler_flag("-march=native" LIBCLC_HAS_NATIVE_DEVICE)
----------------
jhuber6 wrote:

Because `libclc` compiles everything via `-DLLVM_RUNTIME_TARGETS`, this should 
be implicitly checking `clang --target=amdgpu-amd-amdhsa -march=native`. The 
intention is that if we have an installed GPU this will succeed, otherwise it 
will fail. This was lifted from some similar `libc` code.

https://github.com/llvm/llvm-project/pull/214072
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to