mirror of
https://github.com/Ed94/Odin.git
synced 2026-08-05 23:28:48 +00:00
Merge pull request #2154 from Kelimion/llvm-15-check
Panic if LLVM > 14.
This commit is contained in:
@@ -44,6 +44,12 @@ config_darwin() {
|
|||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
MAX_LLVM_VERSION=("14.999.999")
|
||||||
|
if [ $(version $($LLVM_CONFIG --version)) -gt $(version $MAX_LLVM_VERSION) ]; then
|
||||||
|
echo "Tried to use " $(which $LLVM_CONFIG) "version" $($LLVM_CONFIG --version)
|
||||||
|
panic "Requirement: llvm-config must be base version smaller than 15"
|
||||||
|
fi
|
||||||
|
|
||||||
LDFLAGS="$LDFLAGS -liconv -ldl"
|
LDFLAGS="$LDFLAGS -liconv -ldl"
|
||||||
CXXFLAGS="$CXXFLAGS $($LLVM_CONFIG --cxxflags --ldflags)"
|
CXXFLAGS="$CXXFLAGS $($LLVM_CONFIG --cxxflags --ldflags)"
|
||||||
LDFLAGS="$LDFLAGS -lLLVM-C"
|
LDFLAGS="$LDFLAGS -lLLVM-C"
|
||||||
@@ -97,6 +103,12 @@ config_linux() {
|
|||||||
panic "Requirement: llvm-config must be base version greater than 11"
|
panic "Requirement: llvm-config must be base version greater than 11"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
MAX_LLVM_VERSION=("14.999.999")
|
||||||
|
if [ $(version $($LLVM_CONFIG --version)) -gt $(version $MAX_LLVM_VERSION) ]; then
|
||||||
|
echo "Tried to use " $(which $LLVM_CONFIG) "version" $($LLVM_CONFIG --version)
|
||||||
|
panic "Requirement: llvm-config must be base version smaller than 15"
|
||||||
|
fi
|
||||||
|
|
||||||
LDFLAGS="$LDFLAGS -ldl"
|
LDFLAGS="$LDFLAGS -ldl"
|
||||||
CXXFLAGS="$CXXFLAGS $($LLVM_CONFIG --cxxflags --ldflags)"
|
CXXFLAGS="$CXXFLAGS $($LLVM_CONFIG --cxxflags --ldflags)"
|
||||||
LDFLAGS="$LDFLAGS $($LLVM_CONFIG --libs core native --system-libs --libfiles) -Wl,-rpath=\$ORIGIN"
|
LDFLAGS="$LDFLAGS $($LLVM_CONFIG --libs core native --system-libs --libfiles) -Wl,-rpath=\$ORIGIN"
|
||||||
|
|||||||
@@ -53,6 +53,9 @@ gb_global Timings global_timings = {0};
|
|||||||
#if LLVM_VERSION_MAJOR < 11
|
#if LLVM_VERSION_MAJOR < 11
|
||||||
#error LLVM Version 11+ is required => "brew install llvm@11"
|
#error LLVM Version 11+ is required => "brew install llvm@11"
|
||||||
#endif
|
#endif
|
||||||
|
#if LLVM_VERSION_MAJOR > 14
|
||||||
|
#error LLVM Version 11..=14 is required => "brew install llvm@14"
|
||||||
|
#endif
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#include "query_data.cpp"
|
#include "query_data.cpp"
|
||||||
|
|||||||
Reference in New Issue
Block a user