diff --git a/Makefile b/Makefile index bf16fa3..d2ccff6 100644 --- a/Makefile +++ b/Makefile @@ -37,7 +37,8 @@ BASH= endif -CLANG_VERSION=$(shell $(BASH) ./llvm_version.sh $(LLVM_PROJ_DIR)) +# Only the major version is needed for Clang, see https://reviews.llvm.org/D125860. +CLANG_VERSION=$(shell $(BASH) ./llvm_version_major.sh $(LLVM_PROJ_DIR)) VERSION:=$(shell $(BASH) ./version.sh) DEBUG_PREFIX_MAP=-fdebug-prefix-map=$(ROOT_DIR)=wasisdk://v$(VERSION) @@ -67,8 +68,8 @@ build/llvm.BUILT: -DLLVM_TARGETS_TO_BUILD=WebAssembly \ -DLLVM_DEFAULT_TARGET_TRIPLE=wasm32-wasi \ -DLLVM_ENABLE_PROJECTS="lld;clang;clang-tools-extra" \ - $(if $(patsubst 9.%,,$(CLANG_VERSION)), \ - $(if $(patsubst 10.%,,$(CLANG_VERSION)), \ + $(if $(patsubst 9,,$(CLANG_VERSION)), \ + $(if $(patsubst 10,,$(CLANG_VERSION)), \ -DDEFAULT_SYSROOT=../share/wasi-sysroot, \ -DDEFAULT_SYSROOT=$(PREFIX)/share/wasi-sysroot), \ -DDEFAULT_SYSROOT=$(PREFIX)/share/wasi-sysroot) \ diff --git a/llvm_version.sh b/llvm_version.sh deleted file mode 100755 index 41434eb..0000000 --- a/llvm_version.sh +++ /dev/null @@ -1,6 +0,0 @@ -#/bin/bash -LLVM_PROJ_DIR=${1:-./src/llvm-project} -MAJOR=`grep "set(LLVM_VERSION_MAJOR" $LLVM_PROJ_DIR/llvm/CMakeLists.txt | awk '{print substr($2, 1, length($2) - 1)}'` -MINOR=`grep "set(LLVM_VERSION_MINOR" $LLVM_PROJ_DIR/llvm/CMakeLists.txt | awk '{print substr($2, 1, length($2) - 1)}'` -PATCH=`grep "set(LLVM_VERSION_PATCH" $LLVM_PROJ_DIR/llvm/CMakeLists.txt | awk '{print substr($2, 1, length($2) - 1)}'` -echo $MAJOR.$MINOR.$PATCH diff --git a/llvm_version_major.sh b/llvm_version_major.sh new file mode 100755 index 0000000..2e5d973 --- /dev/null +++ b/llvm_version_major.sh @@ -0,0 +1,4 @@ +#/bin/bash +LLVM_PROJ_DIR=${1:-./src/llvm-project} +MAJOR=`grep "set(LLVM_VERSION_MAJOR" $LLVM_PROJ_DIR/llvm/CMakeLists.txt | awk '{print substr($2, 1, length($2) - 1)}'` +echo $MAJOR diff --git a/src/llvm-project b/src/llvm-project index 8dfdcc7..08d094a 160000 --- a/src/llvm-project +++ b/src/llvm-project @@ -1 +1 @@ -Subproject commit 8dfdcc7b7bf66834a761bd8de445840ef68e4d1a +Subproject commit 08d094a0e457360ad8b94b017d2dc277e697ca76