[libclc] [libclc] fix compiler check with --target=spirv64 and -disable-llvm-passes (PR #185376)

Wenju He via cfe-commits cfe-commits at lists.llvm.org
Mon Mar 16 05:02:28 PDT 2026


================
@@ -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)
----------------
wenju-he wrote:

changed to basic frontend test using --target=spirv64-unknown-unknown and -disable-llvm-passes

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


More information about the cfe-commits mailing list