Skip to content

Commit 0883eab

Browse files
Always use self-built clang for pcm compilation
1 parent 4393ffb commit 0883eab

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

cl_headers/CMakeLists.txt

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,8 @@
11
set(CL_HEADERS_LIB cl_headers)
2-
set(CLANG_COMMAND clang)
2+
set(CLANG_COMMAND $<TARGET_FILE:clang> )
3+
if(LLVM_USE_HOST_TOOLS)
4+
build_native_tool(clang CLANG_COMMAND)
5+
endif()
36

47
function(copy_file SRC DST)
58
add_custom_command(
@@ -32,7 +35,7 @@ function(create_pcm DST MODULE HEADER OPTS DEPS)
3235
add_custom_command (
3336
OUTPUT ${DST}
3437
MAIN_DEPENDENCY ${MODMAP}
35-
DEPENDS ${HEADER} ${DEPS}
38+
DEPENDS ${HEADER} ${DEPS} ${CLANG_COMMAND}
3639
COMMAND
3740
${CLANG_COMMAND} -cc1 -x cl
3841
-I. -O0 ${OPTS}

0 commit comments

Comments
 (0)