1
0
Fork 0
mirror of https://github.com/beefytech/Beef.git synced 2025-06-08 11:38:21 +02:00

Linux LLVM 19 fixes

This commit is contained in:
Brian Fiete 2025-03-20 09:34:28 -04:00
parent dd6c4988e5
commit baeaf1ebe9
4 changed files with 123 additions and 123 deletions

View file

@ -119,7 +119,7 @@ add_executable(${PROJECT_NAME}
${SRC_FILES} ${SRC_FILES}
) )
find_package(LLVM 18.1 CONFIG COMPONENTS) find_package(LLVM 19.1 CONFIG COMPONENTS)
if (LLVM_FOUND) if (LLVM_FOUND)
message(STATUS "Found LLVM ${LLVM_PACKAGE_VERSION}") message(STATUS "Found LLVM ${LLVM_PACKAGE_VERSION}")

View file

@ -168,7 +168,7 @@ file(GLOB SRC_FILES
Backend/BeModule.cpp Backend/BeModule.cpp
) )
find_package(LLVM 18.1 CONFIG COMPONENTS) find_package(LLVM 19.1 CONFIG COMPONENTS)
if (LLVM_FOUND) if (LLVM_FOUND)
message(STATUS "Found LLVM ${LLVM_PACKAGE_VERSION}") message(STATUS "Found LLVM ${LLVM_PACKAGE_VERSION}")
@ -177,7 +177,7 @@ if (LLVM_FOUND)
include_directories(${LLVM_INCLUDE_DIRS}) include_directories(${LLVM_INCLUDE_DIRS})
add_definitions(${LLVM_DEFINITIONS}) add_definitions(${LLVM_DEFINITIONS})
string(APPEND TARGET_LIBS_OS "-lLLVM-18 ${LLVM_SYSTEM_LIBS}") string(APPEND TARGET_LIBS_OS "-lLLVM-19 ${LLVM_SYSTEM_LIBS}")
string(STRIP ${TARGET_LIBS_OS} TARGET_LIBS_OS) string(STRIP ${TARGET_LIBS_OS} TARGET_LIBS_OS)
else() else()
message(FATAL_ERROR "LLVM not found") message(FATAL_ERROR "LLVM not found")

View file

@ -5699,7 +5699,7 @@ llvm::Type* BfIRCodeGen::GetLLVMTypeById(int id)
return GetTypeEntry(id).mType->mLLVMType; return GetTypeEntry(id).mType->mLLVMType;
} }
// LLVM/Clang 18.1.4 // LLVM/Clang 19.1.7
static void addSanitizers(const llvm::Triple& TargetTriple, BfCodeGenOptions& CodeGenOpts, llvm::PassBuilder& PB) static void addSanitizers(const llvm::Triple& TargetTriple, BfCodeGenOptions& CodeGenOpts, llvm::PassBuilder& PB)
{ {
#if 0 #if 0
@ -5802,7 +5802,7 @@ static void addSanitizers(const llvm::Triple& TargetTriple, BfCodeGenOptions& Co
#endif #endif
} }
// LLVM/Clang 18.1.4 // LLVM/Clang 19.1.7
static void addKCFIPass(const llvm::Triple& TargetTriple, const BfCodeGenOptions& codeGenOpts, llvm::PassBuilder& PB) static void addKCFIPass(const llvm::Triple& TargetTriple, const BfCodeGenOptions& codeGenOpts, llvm::PassBuilder& PB)
{ {
#if 0 #if 0

View file

@ -43,7 +43,7 @@ else
echo "Ninja isn't installed, consider installing it for faster build speeds." echo "Ninja isn't installed, consider installing it for faster build speeds."
fi fi
LLVM_CONFIG=$(command -v llvm-config-18 2>/dev/null || LLVM_CONFIG=$(command -v llvm-config-19 2>/dev/null ||
command -v /usr/lib/llvm18/bin/llvm-config 2>/dev/null || command -v /usr/lib/llvm18/bin/llvm-config 2>/dev/null ||
command -v llvm-config 2>/dev/null) command -v llvm-config 2>/dev/null)
LLVM_FOUND=0 LLVM_FOUND=0
@ -59,7 +59,7 @@ if [ -n "$LLVM_CONFIG" ]; then
LLVM_PREFIX=$($LLVM_CONFIG --prefix) LLVM_PREFIX=$($LLVM_CONFIG --prefix)
LLVM_DIR="$LLVM_PREFIX/lib/cmake/llvm" LLVM_DIR="$LLVM_PREFIX/lib/cmake/llvm"
else else
# If first attempt didn't find 18.1, explicitly try the llvm18 path # If first attempt didn't find 19.1, explicitly try the llvm18 path
LLVM_CONFIG="/usr/lib/llvm18/bin/llvm-config" LLVM_CONFIG="/usr/lib/llvm18/bin/llvm-config"
if [ -x "$LLVM_CONFIG" ]; then if [ -x "$LLVM_CONFIG" ]; then
LLVM_VERSION=$($LLVM_CONFIG --version) LLVM_VERSION=$($LLVM_CONFIG --version)
@ -80,7 +80,7 @@ set -e
### Dependencies ### ### Dependencies ###
if [ $LLVM_FOUND == 0 ]; then if [ $LLVM_FOUND == 0 ]; then
echo "ERROR: LLVM 18.1 was not detected on your system. Please install the package 'llvm-18-dev' and try again." >&2 echo "ERROR: LLVM 19.1 was not detected on your system. Please install the package 'llvm-19-dev' and try again." >&2
exit exit
fi fi