mirror of
https://github.com/beefytech/Beef.git
synced 2025-06-08 03:28:20 +02:00
Linux LLVM 19 fixes
This commit is contained in:
parent
dd6c4988e5
commit
baeaf1ebe9
4 changed files with 123 additions and 123 deletions
|
@ -119,7 +119,7 @@ add_executable(${PROJECT_NAME}
|
|||
${SRC_FILES}
|
||||
)
|
||||
|
||||
find_package(LLVM 18.1 CONFIG COMPONENTS)
|
||||
find_package(LLVM 19.1 CONFIG COMPONENTS)
|
||||
|
||||
if (LLVM_FOUND)
|
||||
message(STATUS "Found LLVM ${LLVM_PACKAGE_VERSION}")
|
||||
|
|
|
@ -168,7 +168,7 @@ file(GLOB SRC_FILES
|
|||
Backend/BeModule.cpp
|
||||
)
|
||||
|
||||
find_package(LLVM 18.1 CONFIG COMPONENTS)
|
||||
find_package(LLVM 19.1 CONFIG COMPONENTS)
|
||||
|
||||
if (LLVM_FOUND)
|
||||
message(STATUS "Found LLVM ${LLVM_PACKAGE_VERSION}")
|
||||
|
@ -177,7 +177,7 @@ if (LLVM_FOUND)
|
|||
include_directories(${LLVM_INCLUDE_DIRS})
|
||||
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)
|
||||
else()
|
||||
message(FATAL_ERROR "LLVM not found")
|
||||
|
|
|
@ -5699,7 +5699,7 @@ llvm::Type* BfIRCodeGen::GetLLVMTypeById(int id)
|
|||
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)
|
||||
{
|
||||
#if 0
|
||||
|
@ -5802,7 +5802,7 @@ static void addSanitizers(const llvm::Triple& TargetTriple, BfCodeGenOptions& Co
|
|||
#endif
|
||||
}
|
||||
|
||||
// LLVM/Clang 18.1.4
|
||||
// LLVM/Clang 19.1.7
|
||||
static void addKCFIPass(const llvm::Triple& TargetTriple, const BfCodeGenOptions& codeGenOpts, llvm::PassBuilder& PB)
|
||||
{
|
||||
#if 0
|
||||
|
|
|
@ -43,7 +43,7 @@ else
|
|||
echo "Ninja isn't installed, consider installing it for faster build speeds."
|
||||
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 llvm-config 2>/dev/null)
|
||||
LLVM_FOUND=0
|
||||
|
@ -59,7 +59,7 @@ if [ -n "$LLVM_CONFIG" ]; then
|
|||
LLVM_PREFIX=$($LLVM_CONFIG --prefix)
|
||||
LLVM_DIR="$LLVM_PREFIX/lib/cmake/llvm"
|
||||
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"
|
||||
if [ -x "$LLVM_CONFIG" ]; then
|
||||
LLVM_VERSION=$($LLVM_CONFIG --version)
|
||||
|
@ -80,7 +80,7 @@ set -e
|
|||
### Dependencies ###
|
||||
|
||||
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
|
||||
fi
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue