about summary refs log tree commit diff homepage
path: root/scripts/build/p-llvm.inc
diff options
context:
space:
mode:
authorMichael Herstine <sp1ff@pobox.com>2024-02-27 18:02:04 -0800
committerMartinNowack <2443641+MartinNowack@users.noreply.github.com>2024-02-28 10:11:23 +0000
commita01f46c09137d521e736042bfb0395321f21e0fc (patch)
tree4e81715ae150b8f2d6044dbc807dadd154ce4cc9 /scripts/build/p-llvm.inc
parent399ea405d485474350a58a590d50154732000c2f (diff)
downloadklee-a01f46c09137d521e736042bfb0395321f21e0fc.tar.gz
Compare LLVM_VERSION_SHORT to "140" rather than "14".
In commit 2b07721, support was added to p-libcxx.inc & p-llvm.inc
for LLVM versions 14+ (in which, apparently, certain build flags
were changed). To detect these recent versions, the variable
LLVM_VERSION_SHORT was compared numerically to "14"-- the intent
obviously being to express "LLVM version 14 or later".

However, in both v-clang.inc & v-llvm.inc, LLVM_VERSION_SHORT
is defined as the concatenation of LLVM_VERSION_MAJOR and
LLVM_VERSION_MINOR. Therefore, on a machine with, say, LLVM
13.0 installed, LLVM_VERSION_SHORT will be "130" which compares
as larger than "14".

This patch changes the comparison to be against "140".
Diffstat (limited to 'scripts/build/p-llvm.inc')
-rw-r--r--scripts/build/p-llvm.inc2
1 files changed, 1 insertions, 1 deletions
diff --git a/scripts/build/p-llvm.inc b/scripts/build/p-llvm.inc
index 462d69f5..107878da 100644
--- a/scripts/build/p-llvm.inc
+++ b/scripts/build/p-llvm.inc
@@ -183,7 +183,7 @@ configure_llvm() {
         "-DLLVM_BUILD_STATIC:BOOL=OFF"
         "-DLIBCLANG_BUILD_STATIC:BOOL=OFF"
     )
-    if [[ "${LLVM_VERSION_SHORT}" -ge "14" ]]; then
+    if [[ "${LLVM_VERSION_SHORT}" -ge "140" ]]; then
       CONFIG+=("-DLLVM_ENABLE_PROJECTS=${ENABLED_LLVM_PROJECTS}")
       CONFIG+=("-DLLVM_ENABLE_RUNTIMES=libcxx;libcxxabi")
     else