Skip to content

Commit

Permalink
Separate LLVM_VERSION from the dir which can have -asan
Browse files Browse the repository at this point in the history
  • Loading branch information
CouleeApps committed Apr 5, 2023
1 parent 9962341 commit 3584504
Showing 1 changed file with 9 additions and 3 deletions.
12 changes: 9 additions & 3 deletions core/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -75,12 +75,18 @@ if(NOT LLDB_PATH)
set(LLDB_PATH ${LLVM_PATH})
else()
set(LLVM_VERSION 16.0.0 CACHE STRING "Version of LLVM to use")
if(ASAN)
# Require asan clang to prevent spurious use-after-poison reports
set(LLVM_VERSION_DIR "${LLVM_VERSION}-asan")
else()
set(LLVM_VERSION_DIR "${LLVM_VERSION}")
endif()
if(DEFINED ENV{LLVM_INSTALL_DIR})
set(LLDB_PATH $ENV{LLVM_INSTALL_DIR}/${LLVM_VERSION})
set(LLDB_PATH $ENV{LLVM_INSTALL_DIR}/${LLVM_VERSION_DIR})
elseif(WIN32)
set(LLDB_PATH $ENV{HOMEDRIVE}$ENV{HOMEPATH}/libclang/${LLVM_VERSION})
set(LLDB_PATH $ENV{HOMEDRIVE}$ENV{HOMEPATH}/libclang/${LLVM_VERSION_DIR})
else()
set(LLDB_PATH $ENV{HOME}/libclang/${LLVM_VERSION})
set(LLDB_PATH $ENV{HOME}/libclang/${LLVM_VERSION_DIR})
endif()
endif()
endif()
Expand Down

0 comments on commit 3584504

Please sign in to comment.