From 453e5d4aa045fd5579d6a54bdc9ba7c678e29677 Mon Sep 17 00:00:00 2001 From: Anutosh Bhat Date: Tue, 3 Dec 2024 23:21:00 +0530 Subject: [PATCH] Update llvm to 19.1.5 (#1431) * update to llvm 19.1.5 --- recipes/recipes_emscripten/llvm/build.sh | 13 +++-- .../skip_undefined_symbols_at_link_step.patch | 48 ------------------- recipes/recipes_emscripten/llvm/recipe.yaml | 7 ++- 3 files changed, 12 insertions(+), 56 deletions(-) delete mode 100644 recipes/recipes_emscripten/llvm/patches/skip_undefined_symbols_at_link_step.patch diff --git a/recipes/recipes_emscripten/llvm/build.sh b/recipes/recipes_emscripten/llvm/build.sh index 32ea40395..8557f4d88 100644 --- a/recipes/recipes_emscripten/llvm/build.sh +++ b/recipes/recipes_emscripten/llvm/build.sh @@ -9,7 +9,7 @@ export LDFLAGS="" # Configure step -emcmake cmake ${CMAKE_ARGS} -S ../llvm -B . \ +cmake ${CMAKE_ARGS} -S ../llvm -B . \ -DCMAKE_BUILD_TYPE=MinSizeRel \ -DCMAKE_PREFIX_PATH=$PREFIX \ -DCMAKE_INSTALL_PREFIX=$PREFIX \ @@ -22,13 +22,18 @@ emcmake cmake ${CMAKE_ARGS} -S ../llvm -B . \ -DLLVM_ENABLE_PROJECTS="clang;lld" \ -DCMAKE_VERBOSE_MAKEFILE=ON \ -DLLVM_ENABLE_THREADS=OFF \ - -DCMAKE_CXX_FLAGS="-Dwait4=__syscall_wait4 -isystem $EMSCRIPTEN_FORGE_EMSDK_DIR/upstream/emscripten/cache/sysroot/include/c++/v1" + -DLLVM_ENABLE_ZSTD=OFF \ + -DLLVM_ENABLE_LIBXML2=OFF \ + -DCLANG_ENABLE_STATIC_ANALYZER=OFF \ + -DCLANG_ENABLE_ARCMT=OFF \ + -DCLANG_ENABLE_BOOTSTRAP=OFF \ + -DCMAKE_CXX_FLAGS="-Dwait4=__syscall_wait4" # Build step -emmake make -j4 +make -j4 # Install step -emmake make install +make install # Copy all files with ".wasm" extension to $PREFIX/bin cp $SRC_DIR/build/bin/*.wasm $PREFIX/bin \ No newline at end of file diff --git a/recipes/recipes_emscripten/llvm/patches/skip_undefined_symbols_at_link_step.patch b/recipes/recipes_emscripten/llvm/patches/skip_undefined_symbols_at_link_step.patch deleted file mode 100644 index 50ff0590b..000000000 --- a/recipes/recipes_emscripten/llvm/patches/skip_undefined_symbols_at_link_step.patch +++ /dev/null @@ -1,48 +0,0 @@ -diff --git a/clang/lib/Interpreter/IncrementalExecutor.h b/clang/lib/Interpreter/IncrementalExecutor.h -index 7954cde36588..dbd61f0b8b1e 100644 ---- a/clang/lib/Interpreter/IncrementalExecutor.h -+++ b/clang/lib/Interpreter/IncrementalExecutor.h -@@ -56,7 +56,7 @@ public: - virtual llvm::Error addModule(PartialTranslationUnit &PTU); - virtual llvm::Error removeModule(PartialTranslationUnit &PTU); - virtual llvm::Error runCtors() const; -- llvm::Error cleanUp(); -+ virtual llvm::Error cleanUp(); - llvm::Expected - getSymbolAddress(llvm::StringRef Name, SymbolNameKind NameKind) const; - -diff --git a/clang/lib/Interpreter/Wasm.cpp b/clang/lib/Interpreter/Wasm.cpp -index 1001410aa0f2..ef0b54d7884b 100644 ---- a/clang/lib/Interpreter/Wasm.cpp -+++ b/clang/lib/Interpreter/Wasm.cpp -@@ -79,6 +79,7 @@ llvm::Error WasmIncrementalExecutor::addModule(PartialTranslationUnit &PTU) { - "--experimental-pic", - "--no-export-dynamic", - "--stack-first", -+ "--allow-undefined", - OutputFileName.c_str(), - "-o", - OutputFileName.c_str()}; -@@ -109,6 +110,10 @@ llvm::Error WasmIncrementalExecutor::runCtors() const { - return llvm::Error::success(); - } - -+llvm::Error WasmIncrementalExecutor::cleanUp() { -+ return llvm::Error::success(); -+} -+ - WasmIncrementalExecutor::~WasmIncrementalExecutor() = default; - - } // namespace clang -diff --git a/clang/lib/Interpreter/Wasm.h b/clang/lib/Interpreter/Wasm.h -index b1fd88024f14..4632613326d3 100644 ---- a/clang/lib/Interpreter/Wasm.h -+++ b/clang/lib/Interpreter/Wasm.h -@@ -28,6 +28,7 @@ public: - llvm::Error addModule(PartialTranslationUnit &PTU) override; - llvm::Error removeModule(PartialTranslationUnit &PTU) override; - llvm::Error runCtors() const override; -+ llvm::Error cleanUp() override; - - ~WasmIncrementalExecutor() override; - }; diff --git a/recipes/recipes_emscripten/llvm/recipe.yaml b/recipes/recipes_emscripten/llvm/recipe.yaml index dbb9a9e4b..a97a0a754 100644 --- a/recipes/recipes_emscripten/llvm/recipe.yaml +++ b/recipes/recipes_emscripten/llvm/recipe.yaml @@ -1,5 +1,5 @@ context: - version: 19.1.4 + version: 19.1.5 package: name: llvm @@ -8,13 +8,12 @@ package: source: url: https://github.com/llvm/llvm-project/archive/refs/tags/llvmorg-${{ version }}.tar.gz - sha256: 010e1fd3cabee8799bd2f8a6fbc68f28207494f315cf9da7057a2820f79fd531 + sha256: e2204b9903cd9d7ee833a2f56a18bef40a33df4793e31cc090906b32cbd8a1f5 patches: - patches/cross_compile.patch - - patches/skip_undefined_symbols_at_link_step.patch build: - number: 2 + number: 0 requirements: build: