From 2ca4ee64a6870249189ec90d0a1f25fb448e7413 Mon Sep 17 00:00:00 2001 From: Carlos Segarra Date: Tue, 20 Feb 2024 12:08:32 +0000 Subject: [PATCH] llvm: bump to version 18 rc2 to fix the frontend bug with openmp --- LLVM.makefile | 1 + docker/llvm.dockerfile | 6 ++++-- faasmtools/env.py | 3 ++- tasks/llvm.py | 6 ------ 4 files changed, 7 insertions(+), 9 deletions(-) diff --git a/LLVM.makefile b/LLVM.makefile index af8a3fc..c61b5dc 100644 --- a/LLVM.makefile +++ b/LLVM.makefile @@ -173,6 +173,7 @@ LIBCXX_CMAKE_FLAGS = \ -DLIBCXXABI_HAS_EXTERNAL_THREAD_API:BOOL=OFF \ -DLIBCXXABI_BUILD_EXTERNAL_THREAD_LIBRARY:BOOL=OFF \ -DLIBCXXABI_HAS_WIN32_THREAD_API:BOOL=OFF \ + -DLIBCXXABI_USE_LLVM_UNWINDER=OFF \ -DLIBCXX_ENABLE_PIC:BOOL=$(2) \ -DUNIX:BOOL=ON \ --debug-trycompile diff --git a/docker/llvm.dockerfile b/docker/llvm.dockerfile index a4d0f39..bce05ab 100644 --- a/docker/llvm.dockerfile +++ b/docker/llvm.dockerfile @@ -21,8 +21,10 @@ RUN apt update \ && apt install -y \ autoconf \ build-essential \ - # This clang version is needed to help us build LLVM from source below - clang-${LLVM_VERSION_MAJOR} \ + # This clang version is needed to help us build LLVM from source below. + # Pin it to one number as it can drift away from the WASM-compiling + # LLVM version + clang-17 \ curl \ git \ gpg \ diff --git a/faasmtools/env.py b/faasmtools/env.py index c3a54bd..5855e05 100644 --- a/faasmtools/env.py +++ b/faasmtools/env.py @@ -13,7 +13,8 @@ VERSION_FILE = join(PROJ_ROOT, "VERSION") # LLVM variables -LLVM_VERSION = "17.0.6" +# LLVM_VERSION = "17.0.6" +LLVM_VERSION = "18.1.0-rc2" LLVM_DIR = join("/opt", "llvm-project") LLVM_MAKEFILE = join(PROJ_ROOT, "LLVM.makefile") WASI_LIBC_DIR = join(THIRD_PARTY_DIR, "wasi-libc") diff --git a/tasks/llvm.py b/tasks/llvm.py index 0b5c6ef..fa8376c 100644 --- a/tasks/llvm.py +++ b/tasks/llvm.py @@ -43,12 +43,6 @@ def do_llvm_clone(): git_cmd = " ".join(git_cmd) run(git_cmd, shell=True, check=True) - # TODO: do we even need this patch anymore? - # llvm_patches_dir = join(PATCHES_DIR, "llvm-project") - # for patch in listdir(llvm_patches_dir): - # git_cmd = "git apply {}".format(join(llvm_patches_dir, patch)) - # run(git_cmd, shell=True, check=True, cwd=LLVM_DIR) - def do_llvm_build(target, clean_target=None): build_env = environ.copy()