From 9df1bbc848063ff7613aa06050936f29fd437719 Mon Sep 17 00:00:00 2001 From: Etan Kissling Date: Sat, 25 Jan 2025 01:57:04 +0100 Subject: [PATCH] Bump libunwind to `llvmorg-16.0.4` (#76) - https://github.com/llvm/llvm-project/releases/tag/llvmorg-16.0.4 --- UpdateLibunwind | 2 +- vendor/libunwind/llvm/CMakeLists.txt | 2 +- .../llvm/cmake/modules/HandleLLVMOptions.cmake | 10 ++++++++++ 3 files changed, 12 insertions(+), 2 deletions(-) diff --git a/UpdateLibunwind b/UpdateLibunwind index 70658a5..752ef35 100755 --- a/UpdateLibunwind +++ b/UpdateLibunwind @@ -5,7 +5,7 @@ cd -P -- "$(dirname -- "${BASH_SOURCE[0]}")" git diff --exit-code -- . ':(exclude)UpdateLibunwind' > /dev/null || { echo "Commit changes before updating!" ; exit 1 ; } # https://github.com/llvm/llvm-project/releases -COMMIT="${1:-llvmorg-16.0.3}" +COMMIT="${1:-llvmorg-16.0.4}" pushd vendor >/dev/null rm -rf libunwind diff --git a/vendor/libunwind/llvm/CMakeLists.txt b/vendor/libunwind/llvm/CMakeLists.txt index 4510126..8e9bc28 100644 --- a/vendor/libunwind/llvm/CMakeLists.txt +++ b/vendor/libunwind/llvm/CMakeLists.txt @@ -22,7 +22,7 @@ if(NOT DEFINED LLVM_VERSION_MINOR) set(LLVM_VERSION_MINOR 0) endif() if(NOT DEFINED LLVM_VERSION_PATCH) - set(LLVM_VERSION_PATCH 3) + set(LLVM_VERSION_PATCH 4) endif() if(NOT DEFINED LLVM_VERSION_SUFFIX) set(LLVM_VERSION_SUFFIX) diff --git a/vendor/libunwind/llvm/cmake/modules/HandleLLVMOptions.cmake b/vendor/libunwind/llvm/cmake/modules/HandleLLVMOptions.cmake index 6119ecd..78be03d 100644 --- a/vendor/libunwind/llvm/cmake/modules/HandleLLVMOptions.cmake +++ b/vendor/libunwind/llvm/cmake/modules/HandleLLVMOptions.cmake @@ -582,6 +582,16 @@ if ( LLVM_COMPILER_IS_GCC_COMPATIBLE OR CMAKE_CXX_COMPILER_ID MATCHES "XL" ) add_flag_if_supported("-Werror=unguarded-availability-new" WERROR_UNGUARDED_AVAILABILITY_NEW) endif( LLVM_COMPILER_IS_GCC_COMPATIBLE OR CMAKE_CXX_COMPILER_ID MATCHES "XL" ) +if ( LLVM_COMPILER_IS_GCC_COMPATIBLE ) + # LLVM data structures like llvm::User and llvm::MDNode rely on + # the value of object storage persisting beyond the lifetime of the + # object (#24952). This is not standard compliant and causes a runtime + # crash if LLVM is built with GCC and LTO enabled (#57740). Until + # these bugs are fixed, we need to disable dead store eliminations + # based on object lifetime. + add_flag_if_supported("-fno-lifetime-dse" CMAKE_CXX_FLAGS) +endif ( LLVM_COMPILER_IS_GCC_COMPATIBLE ) + # Modules enablement for GCC-compatible compilers: if ( LLVM_COMPILER_IS_GCC_COMPATIBLE AND LLVM_ENABLE_MODULES ) set(OLD_CMAKE_REQUIRED_FLAGS ${CMAKE_REQUIRED_FLAGS})