================
@@ -14,21 +16,29 @@ file(MAKE_DIRECTORY "${_test_dir}")
 
 message(STATUS "Check for working CLC compiler: ${CMAKE_CLC_COMPILER}")
 
-execute_process(
-  COMMAND "${CMAKE_CLC_COMPILER}" -target spir64-unknown-unknown -x cl -c -flto
-          -o "${_test_out}" "${_test_file}"
-  RESULT_VARIABLE _clc_result
-  ERROR_VARIABLE _clc_error
-)
+# Test that the compiler works for all targets in LIBCLC_TARGETS_TO_BUILD
+foreach(_target ${LIBCLC_TARGETS_TO_BUILD})
+  # Convert libclc target to clang triple
+  libclc_target_to_clang_triple(${_target} _clang_triple)
----------------
arsenm wrote:

LIBCLC_TARGETS_ALL is already a list of triples? You can just try compiling 
with each element without parsing out the arch 

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

Reply via email to