[libclc] [libclc][CMake] Test compiler for all build targets (PR #185376)
Matt Arsenault via cfe-commits
cfe-commits at lists.llvm.org
Mon Mar 9 06:16:06 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)
----------------
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
More information about the cfe-commits
mailing list