Commit e024afe 1 parent c64a6b1 commit e024afe Copy full SHA for e024afe
File tree 5 files changed +15
-12
lines changed
5 files changed +15
-12
lines changed Original file line number Diff line number Diff line change @@ -47,20 +47,20 @@ endif()
47
47
# Add our cmake modules directory to the cmake include path including
48
48
# LLVM/Clang.
49
49
string (REPLACE "\\ " "/" CA_LLVM_INSTALL_DIR "${CA_LLVM_INSTALL_DIR} " )
50
- if (NOT EXISTS "${CA_LLVM_INSTALL_DIR} /lib/cmake/llvm/LLVMConfig.cmake" )
50
+ if (NOT EXISTS "${CA_LLVM_INSTALL_DIR} /lib${CA_LLVM_LIBDIR_SUFFIX} /cmake/llvm/LLVMConfig.cmake" )
51
51
message (FATAL_ERROR
52
- "'${CA_LLVM_INSTALL_DIR} /lib/cmake/llvm/LLVMConfig.cmake' does not exist"
52
+ "'${CA_LLVM_INSTALL_DIR} /lib${CA_LLVM_LIBDIR_SUFFIX} /cmake/llvm/LLVMConfig.cmake' does not exist"
53
53
" (search path set with CA_LLVM_INSTALL_DIR)" )
54
54
endif ()
55
- if (NOT EXISTS "${CA_LLVM_INSTALL_DIR} /lib/cmake/clang/ClangTargets.cmake" )
55
+ if (NOT EXISTS "${CA_LLVM_INSTALL_DIR} /lib${CA_LLVM_LIBDIR_SUFFIX} /cmake/clang/ClangTargets.cmake" )
56
56
message (FATAL_ERROR
57
- "'${CA_LLVM_INSTALL_DIR} /lib/cmake/clang/ClangTargets.cmake' does not exist"
57
+ "'${CA_LLVM_INSTALL_DIR} /lib${CA_LLVM_LIBDIR_SUFFIX} /cmake/clang/ClangTargets.cmake' does not exist"
58
58
" (search path set with CA_LLVM_INSTALL_DIR)" )
59
59
endif ()
60
60
list (APPEND CMAKE_MODULE_PATH
61
- ${CA_LLVM_INSTALL_DIR} /lib/cmake/llvm
62
- ${CA_LLVM_INSTALL_DIR} /lib/cmake/clang)
63
- set (LLVM_DIR ${CA_LLVM_INSTALL_DIR} /lib/cmake/llvm)
61
+ ${CA_LLVM_INSTALL_DIR} /lib${CA_LLVM_LIBDIR_SUFFIX} /cmake/llvm
62
+ ${CA_LLVM_INSTALL_DIR} /lib${CA_LLVM_LIBDIR_SUFFIX} /cmake/clang)
63
+ set (LLVM_DIR ${CA_LLVM_INSTALL_DIR} /lib${CA_LLVM_LIBDIR_SUFFIX} /cmake/llvm)
64
64
65
65
# Include LLVM.
66
66
include (LLVMConfig)
Original file line number Diff line number Diff line change @@ -253,6 +253,9 @@ The builtin CMake options used when invoking CMake on the command line.
253
253
relevant llvm headers and support tools, and their version must match
254
254
a supported LLVM version.
255
255
256
+ * ` CA_LLVM_LIBDIR_SUFFIX ` : Tells the oneAPI Construction Kit what value of
257
+ ` LLVM_LIBDIR_SUFFIX ` was used for building LLVM.
258
+
256
259
* ` CA_ENABLE_API ` : Semi-colon separated list of APIs to enable. Valid values
257
260
are ` cl ` for OpenCL, and ` vk ` for Vulkan. Enabling an API when an optional
258
261
component is not present dependent on license agreement will result in a CMake
Original file line number Diff line number Diff line change @@ -48,7 +48,7 @@ if (LLVMRISCVCODEGEN)
48
48
49
49
if (NOT TARGET compiler-linker-utils)
50
50
set (error "compiler-riscv-utils requires compiler-linker-utils" )
51
- if (NOT EXISTS "${CA_LLVM_INSTALL_DIR} /lib/cmake/lld/LLDConfig.cmake" )
51
+ if (NOT EXISTS "${CA_LLVM_INSTALL_DIR} /lib${CA_LLVM_LIBDIR_SUFFIX} /cmake/lld/LLDConfig.cmake" )
52
52
string (APPEND error " which requires liblld" )
53
53
endif ()
54
54
message (FATAL_ERROR "${error} " )
Original file line number Diff line number Diff line change @@ -105,7 +105,7 @@ set(LLVM_LIBS "LLVMCodeGen" "LLVMCoroutines" "LLVMCoverage"
105
105
# Otherwise, we have to provide the full path to them.
106
106
if (NOT OCK_IN_LLVM_TREE)
107
107
list (TRANSFORM CLANG_LIBS
108
- PREPEND "${CA_LLVM_INSTALL_DIR} /lib/${CMAKE_STATIC_LIBRARY_PREFIX} " )
108
+ PREPEND "${CA_LLVM_INSTALL_DIR} /lib${CA_LLVM_LIBDIR_SUFFIX} /${CMAKE_STATIC_LIBRARY_PREFIX} " )
109
109
list (TRANSFORM CLANG_LIBS
110
110
APPEND "${CMAKE_STATIC_LIBRARY_SUFFIX} " )
111
111
endif ()
Original file line number Diff line number Diff line change @@ -40,8 +40,8 @@ endif()
40
40
41
41
# Determine whether LLVM was built with LLD, in which case add a support
42
42
# library that exposes lld to ComputeMux compiler targets.
43
- if (EXISTS "${CA_LLVM_INSTALL_DIR} /lib/cmake/lld/LLDConfig.cmake" )
44
- list (APPEND CMAKE_MODULE_PATH ${CA_LLVM_INSTALL_DIR} /lib/cmake/lld)
43
+ if (EXISTS "${CA_LLVM_INSTALL_DIR} /lib${CA_LLVM_LIBDIR_SUFFIX} /cmake/lld/LLDConfig.cmake" )
44
+ list (APPEND CMAKE_MODULE_PATH ${CA_LLVM_INSTALL_DIR} /lib${CA_LLVM_LIBDIR_SUFFIX} /cmake/lld)
45
45
include (LLDConfig)
46
46
47
47
add_ca_library(compiler-linker-utils STATIC
@@ -71,7 +71,7 @@ if(EXISTS "${CA_LLVM_INSTALL_DIR}/lib/cmake/lld/LLDConfig.cmake")
71
71
72
72
if (NOT OCK_IN_LLVM_TREE)
73
73
list (TRANSFORM LLD_LIBS
74
- PREPEND "${CA_LLVM_INSTALL_DIR} /lib/${CMAKE_STATIC_LIBRARY_PREFIX} " )
74
+ PREPEND "${CA_LLVM_INSTALL_DIR} /lib${CA_LLVM_LIBDIR_SUFFIX} /${CMAKE_STATIC_LIBRARY_PREFIX} " )
75
75
list (TRANSFORM LLD_LIBS
76
76
APPEND "${CMAKE_STATIC_LIBRARY_SUFFIX} " )
77
77
endif ()
You can’t perform that action at this time.
0 commit comments