Skip to content

Commit

Permalink
CMake: Adapt to changed compiler-rt libs base dir with LLVM 16
Browse files Browse the repository at this point in the history
  • Loading branch information
kinke committed Jun 11, 2023
1 parent 5654d52 commit 1075fb6
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -782,7 +782,11 @@ else()
endif()
set(LDC_INSTALL_LLVM_RUNTIME_LIBS ${LDC_INSTALL_LLVM_RUNTIME_LIBS_DEFAULT} CACHE BOOL "Copy/install LLVM compiler-rt libraries (ASan, libFuzzer, ...) from LLVM/Clang into LDC lib dir when available.")
function(copy_compilerrt_lib llvm_lib_name ldc_lib_name fixup_dylib)
set(llvm_lib_path ${LLVM_LIBRARY_DIRS}/clang/${LLVM_VERSION_BASE_STRING}/lib/${llvm_lib_name})
if(LDC_LLVM_VER LESS 1600)
set(llvm_lib_path ${LLVM_LIBRARY_DIRS}/clang/${LLVM_VERSION_BASE_STRING}/lib/${llvm_lib_name})
else()
set(llvm_lib_path ${LLVM_LIBRARY_DIRS}/clang/${LLVM_VERSION_MAJOR}/lib/${llvm_lib_name})
endif()
if(EXISTS ${llvm_lib_path})
message(STATUS "-- - ${llvm_lib_path} --> ${ldc_lib_name}")
set(ldc_lib_path ${PROJECT_BINARY_DIR}/lib${LIB_SUFFIX}/${ldc_lib_name})
Expand Down

0 comments on commit 1075fb6

Please sign in to comment.