Skip to content

Commit

Permalink
libclc: Use echo rather than true for try_compile
Browse files Browse the repository at this point in the history
When providing a fake compiler, libclc currently uses 'true' which does
not exist on Windows. Use echo instead as the no-op.

reviewer: jvesely
Differential Revision: https://reviews.llvm.org/D77163
  • Loading branch information
fooishbar authored and jvesely committed Apr 14, 2020
1 parent e6bb1d6 commit acf0790
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion libclc/cmake/CMakeTestCLCCompiler.cmake
Expand Up @@ -24,7 +24,7 @@ if(NOT CMAKE_CLC_COMPILER_WORKS)
try_compile(CMAKE_CLC_COMPILER_WORKS ${CMAKE_BINARY_DIR}
${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeTmp/testCLCCompiler.cl
# We never generate executable so bypass the link step
CMAKE_FLAGS -DCMAKE_CLC_LINK_EXECUTABLE='true'
CMAKE_FLAGS -DCMAKE_CLC_LINK_EXECUTABLE='echo'
OUTPUT_VARIABLE __CMAKE_CLC_COMPILER_OUTPUT)
# Move result from cache to normal variable.
set(CMAKE_CLC_COMPILER_WORKS ${CMAKE_CLC_COMPILER_WORKS})
Expand Down
2 changes: 1 addition & 1 deletion libclc/cmake/CMakeTestLLAsmCompiler.cmake
Expand Up @@ -24,7 +24,7 @@ if(NOT CMAKE_LLAsm_COMPILER_WORKS)
try_compile(CMAKE_LLAsm_COMPILER_WORKS ${CMAKE_BINARY_DIR}
${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeTmp/testLLAsmCompiler.ll
# We never generate executable so bypass the link step
CMAKE_FLAGS -DCMAKE_LLAsm_LINK_EXECUTABLE='true'
CMAKE_FLAGS -DCMAKE_LLAsm_LINK_EXECUTABLE='echo'
OUTPUT_VARIABLE __CMAKE_LLAsm_COMPILER_OUTPUT)
# Move result from cache to normal variable.
set(CMAKE_LLAsm_COMPILER_WORKS ${CMAKE_LLAsm_COMPILER_WORKS})
Expand Down

0 comments on commit acf0790

Please sign in to comment.