New package: llvm22-22.1.1

This commit is contained in:
Duncaen
2026-03-24 00:47:03 +01:00
parent fc2789115d
commit fed2df9d35
57 changed files with 1729 additions and 6 deletions
+4
View File
@@ -940,14 +940,17 @@ libuchardet.so.0 uchardet-0.0.6_1
libgtksourceviewmm-3.0.so.0 gtksourceviewmm-3.2.0_1
libyajl.so.2 yajl-2.0.1_1
libconfuse.so.2 confuse-3.2.1_1
liblldb.so.22.1 liblldb22-22.1.1_1
liblldb.so.21.1 liblldb21-21.1.4_1
liblldb.so.19.1 liblldb19-19.1.0_1
liblldb.so.18.1 liblldb18-18.1.8_1
liblldb.so.17 liblldb17-17.0.6_3
libclang.so.22.1 libclang22-22.1.1_1
libclang.so.21.1 libclang21-21.1.4_1
libclang.so.19.1 libclang19-19.1.0_1
libclang.so.18.1 libclang18-18.1.8_1
libclang.so.17 libclang17-17.0.6_1
libclang-cpp.so.22.1 libclang-cpp22-22.1.1_1
libclang-cpp.so.21.1 libclang-cpp21-21.1.4_1
libclang-cpp.so.19.1 libclang-cpp19-19.1.0_1
libclang-cpp.so.18.1 libclang-cpp18-18.1.8_1
@@ -956,6 +959,7 @@ libLLVM-17.so libllvm17-17.0.6_1
libLLVM.so.18.1 libllvm18-18.1.8_1
libLLVM.so.19.1 libllvm19-19.1.0_1
libLLVM.so.21.1 libllvm21-21.1.4_1
libLLVM.so.22.1 libllvm22-22.1.1_1
libLLVMSPIRVLib.so.18.1 SPIRV-LLVM-Translator-18.1.2_1
libLLVMSPIRVLib.so.19.1 SPIRV-LLVM-Translator19-19.1.1_1
libLLVMSPIRVLib.so.21.1 SPIRV-LLVM-Translator21-21.1.1_1
+1
View File
@@ -0,0 +1 @@
llvm22
+1
View File
@@ -0,0 +1 @@
llvm22
+1
View File
@@ -0,0 +1 @@
llvm22
+1
View File
@@ -0,0 +1 @@
llvm22
+1
View File
@@ -0,0 +1 @@
llvm22
+1
View File
@@ -0,0 +1 @@
llvm22
+1
View File
@@ -0,0 +1 @@
llvm22
+1
View File
@@ -0,0 +1 @@
llvm22
+1
View File
@@ -0,0 +1 @@
llvm22
+1
View File
@@ -0,0 +1 @@
llvm22
+1
View File
@@ -0,0 +1 @@
llvm22
+1 -1
View File
@@ -1 +1 @@
llvm21
llvm22
+1 -1
View File
@@ -1 +1 @@
llvm21
llvm22
+1 -1
View File
@@ -1 +1 @@
llvm21
llvm22
+1 -1
View File
@@ -1 +1 @@
llvm21
llvm22
+1
View File
@@ -0,0 +1 @@
llvm22
+1
View File
@@ -0,0 +1 @@
llvm22
+1
View File
@@ -0,0 +1 @@
llvm22
+1
View File
@@ -0,0 +1 @@
llvm22
+1
View File
@@ -0,0 +1 @@
llvm22
+1
View File
@@ -0,0 +1 @@
llvm22
+1
View File
@@ -0,0 +1 @@
llvm22
+1
View File
@@ -0,0 +1 @@
llvm22
+1
View File
@@ -0,0 +1 @@
llvm22
+1 -1
View File
@@ -1 +1 @@
llvm21
llvm22
+1 -1
View File
@@ -1 +1 @@
llvm21
llvm22
+1
View File
@@ -0,0 +1 @@
llvm22
+1
View File
@@ -0,0 +1 @@
llvm22
+1
View File
@@ -0,0 +1 @@
llvm22
@@ -0,0 +1,9 @@
#include <bits/wordsize.h>
#if __WORDSIZE == 32
#include "llvm-config-32.h"
#elif __WORDSIZE == 64
#include "llvm-config-64.h"
#else
#error "Unknown word size"
#endif
+13
View File
@@ -0,0 +1,13 @@
diff --git a/llvm/include/llvm/ADT/SmallVector.h b/llvm/include/llvm/ADT/SmallVector.h
index 2e6d2dc6ce90..be2cf6cc1fee 100644
--- a/llvm/include/llvm/ADT/SmallVector.h
+++ b/llvm/include/llvm/ADT/SmallVector.h
@@ -1163,7 +1163,7 @@ template <typename T> struct CalculateSmallVectorDefaultInlinedElements {
// happens on a 32-bit host and then fails due to sizeof(T) *increasing* on a
// 64-bit host, is expected to be very rare.
static_assert(
- sizeof(T) <= 256,
+ sizeof(T) <= 288,
"You are trying to use a default number of inlined elements for "
"`SmallVector<T>` but `sizeof(T)` is really big! Please use an "
"explicit number of inlined elements with `SmallVector<T, N>` to make "
@@ -0,0 +1,37 @@
From 2354350bcc890c13016d67f4c060b32cb1cd693c Mon Sep 17 00:00:00 2001
From: q66 <q66@chimera-linux.org>
Date: Sat, 4 Nov 2023 08:44:01 +0100
Subject: [PATCH 01/25] llvm: always set a larger stack size explicitly
---
llvm/lib/Support/Threading.cpp | 14 --------------
1 file changed, 14 deletions(-)
diff --git a/llvm/lib/Support/Threading.cpp b/llvm/lib/Support/Threading.cpp
index 7cc7ba44c..b91b8f4bb 100644
--- a/llvm/lib/Support/Threading.cpp
+++ b/llvm/lib/Support/Threading.cpp
@@ -77,21 +77,7 @@ unsigned llvm::ThreadPoolStrategy::compute_thread_count() const {
// keyword.
#include "llvm/Support/thread.h"
-#if defined(__APPLE__)
- // Darwin's default stack size for threads except the main one is only 512KB,
- // which is not enough for some/many normal LLVM compilations. This implements
- // the same interface as std::thread but requests the same stack size as the
- // main thread (8MB) before creation.
const std::optional<unsigned> llvm::thread::DefaultStackSize = 8 * 1024 * 1024;
-#elif defined(_AIX)
- // On AIX, the default pthread stack size limit is ~192k for 64-bit programs.
- // This limit is easily reached when doing link-time thinLTO. AIX library
- // developers have used 4MB, so we'll do the same.
-const std::optional<unsigned> llvm::thread::DefaultStackSize = 4 * 1024 * 1024;
-#else
-const std::optional<unsigned> llvm::thread::DefaultStackSize;
-#endif
-
#endif
--
2.42.0
@@ -0,0 +1,29 @@
armv7l is referred to as armhf in LLVM. While compiler-rt/CMakeLists.txt
already performs this replacement, it does not seem to be applied in all
places where it is needed.
In compiler-rt/lib/builtins/CMakeLists.txt, the incorrect value is used,
which prevents creation of the clang_rt.builtins-${arch}.sources.txt file
for the target architecture, because armv7l is not included in the
BUILTIN_SUPPORTED_ARCH list.
As a result, compiler-rt/test/builtins/CMakeLists.txt is unable to read the
clang_rt.builtins-armhf.sources.txt file.
CMake Error at /builddir/llvm22-22.1.1/compiler-rt/test/builtins/CMakeLists.txt:110 (file):
file failed to open for reading (No such file or directory):
/builddir/llvm22-22.1.1/llvm/build/./lib/../lib/clang/22/lib/linux/clang_rt.builtins-armhf.sources.txt
--- a/compiler-rt/cmake/Modules/CompilerRTUtils.cmake
+++ b/compiler-rt/cmake/Modules/CompilerRTUtils.cmake
@@ -413,6 +413,10 @@
set(COMPILER_RT_DEFAULT_TARGET_ARCH "i386")
endif()
+ if("${COMPILER_RT_DEFAULT_TARGET_ARCH}" MATCHES "^armv7l$")
+ set(COMPILER_RT_DEFAULT_TARGET_ARCH "armhf")
+ endif()
+
# If we are directly targeting a GPU we need to check that the compiler is
# compatible and pass some default arguments.
if(COMPILER_RT_DEFAULT_TARGET_ONLY)
@@ -0,0 +1,44 @@
From 352974169f0d2b5da3d5321f588f5e3b5941330e Mon Sep 17 00:00:00 2001
From: Andrea Brancaleoni <miwaxe@gmail.com>
Date: Tue, 8 Sep 2015 22:14:57 +0200
Subject: [PATCH 2/7] fix unwind chain inclusion
---
lib/Headers/unwind.h | 9 +++++----
1 file changed, 5 insertions(+), 4 deletions(-)
diff --git a/lib/Headers/unwind.h b/lib/Headers/unwind.h
index 303d792..44e10cc 100644
--- a/clang/lib/Headers/unwind.h
+++ b/clang/lib/Headers/unwind.h
@@ -9,9 +9,6 @@
/* See "Data Definitions for libgcc_s" in the Linux Standard Base.*/
-#ifndef __CLANG_UNWIND_H
-#define __CLANG_UNWIND_H
-
#if defined(__APPLE__) && __has_include_next(<unwind.h>)
/* Darwin (from 11.x on) provide an unwind.h. If that's available,
* use it. libunwind wraps some of its definitions in #ifdef _GNU_SOURCE,
@@ -39,6 +36,9 @@
# endif
#else
+#ifndef __CLANG_UNWIND_H
+#define __CLANG_UNWIND_H
+
#include <stdint.h>
#ifdef __cplusplus
@@ -322,6 +322,7 @@ _Unwind_Ptr _Unwind_GetTextRelBase(struct _Unwind_Context *);
}
#endif
+#endif /* __CLANG_UNWIND_H */
+
#endif
-#endif /* __CLANG_UNWIND_H */
--
2.5.1
@@ -0,0 +1,13 @@
--- a/clang/lib/Driver/ToolChains/Linux.cpp
+++ b/clang/lib/Driver/ToolChains/Linux.cpp
@@ -504,10 +504,6 @@ std::string Linux::getDynamicLinker(const ArgList &Args) const {
Loader = "ld.so.1";
break;
case llvm::Triple::ppc64:
- LibDir = "lib64";
- Loader =
- (tools::ppc::hasPPCAbiArg(Args, "elfv2")) ? "ld64.so.2" : "ld64.so.1";
- break;
case llvm::Triple::ppc64le:
LibDir = "lib64";
Loader =
@@ -0,0 +1,22 @@
Based on patch from Alpine:
https://gitlab.alpinelinux.org/alpine/aports/-/blob/693203c42aa1cde88cb547173ef67a98824973fd/main/llvm-runtimes/compiler-rt-sanitizer-supported-arch.patch
Sanitizer code is broken on armhf, armv7, s390x, x86, and probably riscv64 on musl,
i.e. enable it only on x86_64, aarch64, and ppc64le.
--- a/compiler-rt/cmake/Modules/AllSupportedArchDefs.cmake
+++ b/compiler-rt/cmake/Modules/AllSupportedArchDefs.cmake
@@ -28,9 +28,13 @@
set(ARM32 ${ARM32} armv7)
endif()
+if (LIBCXX_HAS_MUSL_LIBC)
+set(ALL_SANITIZER_COMMON_SUPPORTED_ARCH ${X86_64} ${ARM64} ${PPC64})
+else()
set(ALL_SANITIZER_COMMON_SUPPORTED_ARCH ${X86} ${X86_64} ${PPC64} ${RISCV64}
${ARM32} ${ARM64} ${MIPS32} ${MIPS64} ${S390X} ${SPARC} ${SPARCV9}
${HEXAGON} ${LOONGARCH64})
+endif()
set(ALL_ASAN_SUPPORTED_ARCH ${X86} ${X86_64} ${ARM32} ${ARM64} ${RISCV64}
${MIPS32} ${MIPS64} ${PPC64} ${S390X} ${SPARC} ${SPARCV9} ${HEXAGON}
${LOONGARCH64})
@@ -0,0 +1,12 @@
We want to always use clang and not rely on cmake to choose a gcc cross compiler.
--- a/llvm/cmake/modules/CrossCompile.cmake
+++ b/llvm/cmake/modules/CrossCompile.cmake
@@ -23,7 +23,7 @@
if (EXISTS ${LLVM_MAIN_SRC_DIR}/cmake/platforms/${toolchain}.cmake)
set(CROSS_TOOLCHAIN_FLAGS_INIT
-DCMAKE_TOOLCHAIN_FILE=\"${LLVM_MAIN_SRC_DIR}/cmake/platforms/${toolchain}.cmake\")
- elseif (NOT CMAKE_CROSSCOMPILING)
+ else()
set(CROSS_TOOLCHAIN_FLAGS_INIT
-DCMAKE_C_COMPILER=${CMAKE_C_COMPILER}
-DCMAKE_CXX_COMPILER=${CMAKE_CXX_COMPILER}
@@ -0,0 +1,18 @@
commit 9af31d021e83dce4e98f06d8e732f4afb481cd08
Author: Daniel Martinez <danielmartinez@cock.li>
Date: Sat Aug 3 18:04:04 2024 -0400
disable lldb docs as they depend on some sphinx packages we don't have
diff --git a/lldb/CMakeLists.txt b/lldb/CMakeLists.txt
index 59cdc4593463..e7c2c38b50a9 100644
--- a/lldb/CMakeLists.txt
+++ b/lldb/CMakeLists.txt
@@ -124,7 +124,6 @@ add_subdirectory(utils/TableGen)
add_subdirectory(source)
add_subdirectory(tools)
-add_subdirectory(docs)
if (LLDB_ENABLE_PYTHON)
if(LLDB_BUILD_FRAMEWORK)
@@ -0,0 +1,12 @@
This is needed to make the get_host_tool_path calls in libclc use the
host/native binaries when cross compiling.
--- a/llvm/runtimes/CMakeLists.txt
+++ b/llvm/runtimes/CMakeLists.txt
@@ -270,6 +270,7 @@
-DLLVM_ENABLE_PROJECTS_USED=${LLVM_ENABLE_PROJECTS_USED}
-DLLVM_ENABLE_PER_TARGET_RUNTIME_DIR=${LLVM_ENABLE_PER_TARGET_RUNTIME_DIR}
-DLLVM_BUILD_TOOLS=${LLVM_BUILD_TOOLS}
+ -DLLVM_NATIVE_TOOL_DIR=${LLVM_NATIVE_TOOL_DIR}
-DCMAKE_C_COMPILER_WORKS=ON
-DCMAKE_CXX_COMPILER_WORKS=ON
-DCMAKE_Fortran_COMPILER_WORKS=ON
+28
View File
@@ -0,0 +1,28 @@
commit 92984acc52fb95566d9387948c2655507328438b
Author: Daniel Martinez <danielmartinez@cock.li>
Date: Wed Jul 31 21:14:52 2024 -0400
Allow flang-new binary to be specified for omp modules
This allows the path of the flang-new binary to be specified as a
cmake configuration.
This is useful when cross compiling, as flang-new may exist
on the build machine, which should be used instead of the host.
For example, by passing "-DFLANG_NEW_NATIVE_EXE=/usr/bin/flang-new",
that binary will be used instead of just built host compiler.
diff --git a/llvm/runtimes/CMakeLists.txt b/llvm/runtimes/CMakeLists.txt
index 42b1b86ebaad..41921aaeaeb2 100644
--- a/llvm/runtimes/CMakeLists.txt
+++ b/llvm/runtimes/CMakeLists.txt
@@ -522,7 +522,7 @@
if("openmp" IN_LIST LLVM_ENABLE_RUNTIMES OR "offload" IN_LIST LLVM_ENABLE_RUNTIMES)
if (${LLVM_TOOL_FLANG_BUILD})
message(STATUS "Configuring build of omp_lib.mod and omp_lib_kinds.mod via flang")
- set(LIBOMP_FORTRAN_MODULES_COMPILER "${CMAKE_BINARY_DIR}/bin/flang")
+ set(LIBOMP_FORTRAN_MODULES_COMPILER "${CMAKE_BINARY_DIR}/bin/flang" CACHE INTERNAL "")
set(LIBOMP_MODULES_INSTALL_PATH "${CMAKE_INSTALL_INCLUDEDIR}/flang")
# TODO: This is a workaround until flang becomes a first-class project
# in llvm/CMakeList.txt. Until then, this line ensures that flang is
@@ -0,0 +1,11 @@
--- a/llvm/utils/TableGen/CMakeLists.txt
+++ b/llvm/utils/TableGen/CMakeLists.txt
@@ -17,6 +17,8 @@
# At least one source file must be included directly to avoid CMake problems.
# E.g. CMake derives which linker to use from the types of sources added.
add_tablegen(llvm-min-tblgen LLVM_HEADERS
+ DESTINATION "${LLVM_TOOLS_INSTALL_DIR}"
+ EXPORT LLVM
llvm-min-tblgen.cpp
$<TARGET_OBJECTS:obj.LLVMTableGenBasic>
@@ -0,0 +1,35 @@
See: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=109180
Avoid the following undefined reference:
/usr/lib/gcc/armv7l-linux-gnueabihf/12.2.0/../../../../armv7l-linux-gnueabihf/bin/ld: projects/libcxx/src/CMakeFiles/cxx_shared.dir/locale.cpp.o: in function `std::__1::__time_get_c_storage<char>::__x() const [clone .localalias]':
locale.cpp:(.text._ZNKSt3__120__time_get_c_storageIcE3__xEv+0xb4): undefined reference to `std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >::~basic_string()'
/usr/lib/gcc/armv7l-linux-gnueabihf/12.2.0/../../../../armv7l-linux-gnueabihf/bin/ld: projects/libcxx/src/CMakeFiles/cxx_shared.dir/locale.cpp.o: in function `std::__1::__time_get_c_storage<char>::__X() const [clone .localalias]':
diff --git a/libcxx/CMakeLists.txt b/libcxx/CMakeLists.txt
index b8ac536588d3..65e5a1365634 100644
--- a/libcxx/CMakeLists.txt
+++ b/libcxx/CMakeLists.txt
@@ -308,6 +308,8 @@ endif()
option(LIBCXX_HERMETIC_STATIC_LIBRARY
"Do not export any symbols from the static library." ${LIBCXX_HERMETIC_STATIC_LIBRARY_DEFAULT})
+option(LIBCXX_VOID_GCC_BUG_109180_WORKAROUND OFF)
+
#===============================================================================
# Check option configurations
#===============================================================================
diff --git a/libcxx/src/CMakeLists.txt b/libcxx/src/CMakeLists.txt
index 35b466527096..5b0efa171616 100644
--- a/libcxx/src/CMakeLists.txt
+++ b/libcxx/src/CMakeLists.txt
@@ -155,6 +155,10 @@ if (LIBCXX_GENERATE_COVERAGE AND NOT LIBCXX_COVERAGE_LIBRARY)
endif()
add_library_flags_if(LIBCXX_COVERAGE_LIBRARY "${LIBCXX_COVERAGE_LIBRARY}")
+if (LIBCXX_VOID_GCC_BUG_109180_WORKAROUND)
+ set_source_files_properties(string.cpp PROPERTIES COMPILE_FLAGS -fno-inline)
+endif()
+
if (APPLE AND LLVM_USE_SANITIZER)
if (("${LLVM_USE_SANITIZER}" STREQUAL "Address") OR
("${LLVM_USE_SANITIZER}" STREQUAL "Address;Undefined") OR
+26
View File
@@ -0,0 +1,26 @@
--- a/libcxx/include/__cxx03/locale
+++ b/libcxx/include/__cxx03/locale
@@ -727,7 +727,11 @@
__libcpp_remove_reference_t<decltype(errno)> __save_errno = errno;
errno = 0;
char* __p2;
+#if defined(__linux__) && !defined(__GLIBC__)
+ long long __ll = strtoll(__a, &__p2, __base);
+#else
long long __ll = strtoll_l(__a, &__p2, __base, _LIBCPP_GET_C_LOCALE);
+#endif
__libcpp_remove_reference_t<decltype(errno)> __current_errno = errno;
if (__current_errno == 0)
errno = __save_errno;
@@ -759,7 +763,11 @@
__libcpp_remove_reference_t<decltype(errno)> __save_errno = errno;
errno = 0;
char* __p2;
+#if defined(__linux__) && !defined(__GLIBC__)
+ unsigned long long __ll = strtoull(__a, &__p2, __base);
+#else
unsigned long long __ll = strtoull_l(__a, &__p2, __base, _LIBCPP_GET_C_LOCALE);
+#endif
__libcpp_remove_reference_t<decltype(errno)> __current_errno = errno;
if (__current_errno == 0)
errno = __save_errno;
@@ -0,0 +1,11 @@
--- a/libcxx/CMakeLists.txt
+++ b/libcxx/CMakeLists.txt
@@ -769,6 +769,8 @@ function(cxx_link_system_libraries target)
target_link_libraries(${target} PRIVATE atomic)
endif()
+#ssp target_link_libraries(${target} PRIVATE ssp_nonshared)
+
if (MINGW)
target_link_libraries(${target} PRIVATE "${MINGW_LIBRARIES}")
endif()
+25
View File
@@ -0,0 +1,25 @@
Also link to -ldl to prevent undefined references.
--- a/libcxxabi/src/CMakeLists.txt
+++ b/libcxxabi/src/CMakeLists.txt
@@ -73,6 +73,7 @@
endif()
add_library_flags_if(LIBCXXABI_HAS_C_LIB c)
+ add_library_flags_if(LIBCXXABI_HAS_C_LIB dl)
endif()
if (LIBCXXABI_USE_LLVM_UNWINDER)
--- a/libcxx/CMakeLists.txt
+++ b/libcxx/CMakeLists.txt
@@ -745,6 +745,10 @@
if (LIBCXX_HAS_PTHREAD_LIB)
target_compile_definitions(${target} PRIVATE -D_LIBCPP_LINK_PTHREAD_LIB)
endif()
+ if (LIBCXX_HAS_C_LIB)
+ target_link_libraries(${target} PRIVATE dl)
+ endif()
+
if (LIBCXX_HAS_RT_LIB)
target_compile_definitions(${target} PRIVATE -D_LIBCPP_LINK_RT_LIB)
endif()
@@ -0,0 +1,32 @@
Since lldb-tblgen is now being installed, it needs to be build during cross
builds, even if its not directly used.
--- a/lldb/utils/TableGen/CMakeLists.txt
+++ b/lldb/utils/TableGen/CMakeLists.txt
@@ -1,18 +1,10 @@
-# tablegen targets get exported via llvm for LLVMConfig.cmake. So standalone
-# builds of lldb can potentially import this via LLVMConfig and also attempt to
-# build it in tree. So only build it if it doesn't exist.
-if (NOT DEFINED LLDB_TABLEGEN_EXE)
- if (TARGET lldb-tblgen)
- set(LLDB_TABLEGEN_EXE $<TARGET_FILE:lldb-tblgen> CACHE STRING "")
- else()
- set(LLVM_LINK_COMPONENTS Support)
+set(LLVM_LINK_COMPONENTS Support)
- add_tablegen(lldb-tblgen LLDB
- DESTINATION "${CMAKE_INSTALL_BINDIR}"
- LLDBOptionDefEmitter.cpp
- LLDBPropertyDefEmitter.cpp
- LLDBTableGen.cpp
- LLDBTableGenUtils.cpp
- )
- endif()
-endif()
+add_tablegen(lldb-tblgen LLDB
+ DESTINATION "${CMAKE_INSTALL_BINDIR}"
+ EXPORT LLDB
+ LLDBOptionDefEmitter.cpp
+ LLDBPropertyDefEmitter.cpp
+ LLDBTableGen.cpp
+ LLDBTableGenUtils.cpp
+ )
@@ -0,0 +1,32 @@
From faca3fbd15d0c3108493c3c54cd93138e049ac43 Mon Sep 17 00:00:00 2001
From: Andrea Brancaleoni <miwaxe@gmail.com>
Date: Tue, 8 Sep 2015 22:03:02 +0200
Subject: [PATCH 3/3] musl
---
include/llvm/Analysis/TargetLibraryInfo.h | 9 +++++++++
lib/Support/DynamicLibrary.cpp | 2 +-
lib/Support/Unix/Signals.inc | 6 +++---
utils/unittest/googletest/src/gtest.cc | 1 +
5 files changed, 17 insertions(+), 6 deletions(-)
diff --git a/include/llvm/Analysis/TargetLibraryInfo.h b/include/llvm/Analysis/TargetLibraryInfo.h
index 34a8a1e3..1214ece5 100644
--- a/llvm/include/llvm/Analysis/TargetLibraryInfo.h
+++ b/llvm/include/llvm/Analysis/TargetLibraryInfo.h
@@ -18,6 +18,15 @@
#include "llvm/IR/PassManager.h"
#include "llvm/Pass.h"
+#undef fopen64
+#undef fseeko64
+#undef fstat64
+#undef fstatvfs64
+#undef ftello64
+#undef lstat64
+#undef stat64
+#undef tmpfile64
+
namespace llvm {
template <typename T> class ArrayRef;
class Triple;
@@ -0,0 +1,18 @@
This allows us to override the optimization level as not all platforms can
deal with -O3.
--- a/llvm/CMakeLists.txt
+++ b/llvm/CMakeLists.txt
@@ -918,6 +918,12 @@ if( MINGW AND NOT "${CMAKE_CXX_COMPILER_ID}" MATCHES "Clang" )
llvm_replace_compiler_option(CMAKE_CXX_FLAGS_RELEASE "-O3" "-O2")
endif()
+set(VOID_CXX_OPT_FLAGS "" CACHE STRING "Optimization level to use")
+
+if (NOT VOID_CXX_OPT_FLAGS STREQUAL "")
+ llvm_replace_compiler_option(CMAKE_CXX_FLAGS_RELEASE "-O3" "${VOID_CXX_OPT_FLAGS}")
+endif()
+
# Put this before tblgen. Else we have a circular dependence.
add_subdirectory(lib/Demangle)
add_subdirectory(lib/Support)
@@ -0,0 +1,32 @@
From f3dbdd49c06bfafc1d6138094cf42889c14d38b6 Mon Sep 17 00:00:00 2001
From: Samuel Holland <samuel@sholland.org>
Date: Sun, 3 Nov 2019 10:57:27 -0600
Subject: [PATCH] [LLVM][PowerPC] Assume BigPIC if no PIC level is specified
---
llvm/lib/Target/PowerPC/PPCAsmPrinter.cpp | 2 +-
llvm/lib/Target/PowerPC/PPCMCInstLower.cpp | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
--- a/llvm/lib/Target/PowerPC/PPCAsmPrinter.cpp
+++ b/llvm/lib/Target/PowerPC/PPCAsmPrinter.cpp
@@ -736,7 +736,7 @@
// Add 32768 offset to the symbol so we follow up the latest GOT/PLT ABI.
if (Kind == PPC::S_PLT && Subtarget->isSecurePlt() &&
- M->getPICLevel() == PICLevel::BigPIC)
+ M->getPICLevel() != PICLevel::SmallPIC)
TlsRef = MCBinaryExpr::createAdd(
TlsRef, MCConstantExpr::create(32768, OutContext), OutContext);
const MachineOperand &MO = MI->getOperand(2);
--- a/llvm/lib/Target/PowerPC/PPCMCInstLower.cpp
+++ b/llvm/lib/Target/PowerPC/PPCMCInstLower.cpp
@@ -139,7 +139,7 @@
const MCExpr *Expr = MCSymbolRefExpr::create(Symbol, RefKind, Ctx);
// If -msecure-plt -fPIC, add 32768 to symbol.
if (Subtarget->isSecurePlt() && TM.isPositionIndependent() &&
- M->getPICLevel() == PICLevel::BigPIC &&
+ M->getPICLevel() != PICLevel::SmallPIC &&
MO.getTargetFlags() == PPCII::MO_PLT)
Expr =
MCBinaryExpr::createAdd(Expr, MCConstantExpr::create(32768, Ctx), Ctx);
@@ -0,0 +1,24 @@
Fix failures in AllocationTests/MappedMemoryTest.* on aarch64:
Failing Tests (8):
LLVM-Unit :: Support/./SupportTests/AllocationTests/MappedMemoryTest.AllocAndRelease/3
LLVM-Unit :: Support/./SupportTests/AllocationTests/MappedMemoryTest.DuplicateNear/3
LLVM-Unit :: Support/./SupportTests/AllocationTests/MappedMemoryTest.EnabledWrite/3
LLVM-Unit :: Support/./SupportTests/AllocationTests/MappedMemoryTest.MultipleAllocAndRelease/3
LLVM-Unit :: Support/./SupportTests/AllocationTests/MappedMemoryTest.SuccessiveNear/3
LLVM-Unit :: Support/./SupportTests/AllocationTests/MappedMemoryTest.UnalignedNear/3
LLVM-Unit :: Support/./SupportTests/AllocationTests/MappedMemoryTest.ZeroNear/3
LLVM-Unit :: Support/./SupportTests/AllocationTests/MappedMemoryTest.ZeroSizeNear/3
Upstream-Issue: https://bugs.llvm.org/show_bug.cgi?id=14278#c10
--- a/llvm/lib/Support/Unix/Memory.inc
+++ b/llvm/lib/Support/Unix/Memory.inc
@@ -58,7 +58,7 @@ static int getPosixProtectionFlags(unsigned Flags) {
return PROT_READ | PROT_WRITE | PROT_EXEC;
case llvm::sys::Memory::MF_EXEC:
-#if defined(__FreeBSD__) || defined(__powerpc__)
+#if defined(__FreeBSD__) || defined(__powerpc__) || (defined(__linux__) && defined(__aarch64__))
// On PowerPC, having an executable page that has no read permission
// can have unintended consequences. The function InvalidateInstruction-
// Cache uses instructions dcbf and icbi, both of which are treated by
@@ -0,0 +1,20 @@
--- a/openmp/CMakeLists.txt
+++ b/openmp/CMakeLists.txt
@@ -35,7 +35,7 @@
set(OPENMP_LIBDIR_SUFFIX "" CACHE STRING
"Suffix of lib installation directory, e.g. 64 => lib64")
# Do not use OPENMP_LIBDIR_SUFFIX directly, use OPENMP_INSTALL_LIBDIR.
- set(OPENMP_INSTALL_LIBDIR "lib${OPENMP_LIBDIR_SUFFIX}" CACHE STRING
+ set(OPENMP_INSTALL_LIBDIR "lib${OPENMP_LIBDIR_SUFFIX}/${LLVM_DEFAULT_TARGET_TRIPLE}" CACHE STRING
"Path where built OpenMP libraries should be installed.")
# Group test settings.
@@ -67,7 +67,7 @@
set(OPENMP_INSTALL_LIBDIR lib${LLVM_LIBDIR_SUFFIX}/${LLVM_DEFAULT_TARGET_TRIPLE} CACHE STRING
"Path where built openmp libraries should be installed.")
else()
- set(OPENMP_INSTALL_LIBDIR "lib${LLVM_LIBDIR_SUFFIX}" CACHE STRING
+ set(OPENMP_INSTALL_LIBDIR "lib${LLVM_LIBDIR_SUFFIX}/${LLVM_DEFAULT_TARGET_TRIPLE}" CACHE STRING
"Path where built OpenMP libraries should be installed.")
endif()
+21
View File
@@ -0,0 +1,21 @@
--- a/llvm/CMakeLists.txt
+++ b/llvm/CMakeLists.txt
@@ -583,6 +583,7 @@ if (LLVM_ENABLE_Z3_SOLVER)
if (NOT Z3_FOUND)
message(FATAL_ERROR "LLVM_ENABLE_Z3_SOLVER cannot be enabled when Z3 is not available.")
endif()
+ set(Z3_LIBRARIES z3)
set(LLVM_WITH_Z3 1)
endif()
--- a/llvm/lib/Support/CMakeLists.txt
+++ b/llvm/lib/Support/CMakeLists.txt
@@ -86,7 +86,7 @@ endif()
# Link Z3 if the user wants to build it.
if(LLVM_WITH_Z3)
- set(system_libs ${system_libs} ${Z3_LIBRARIES})
+ set(system_libs ${system_libs} z3)
endif()
# Override the C runtime allocator on Windows and embed it into LLVM tools & libraries
File diff suppressed because it is too large Load Diff
+3
View File
@@ -0,0 +1,3 @@
site="https://github.com/llvm/llvm-project/releases"
pattern="llvmorg-\K(19)\.(\d+)\.+\d+(-rc\d+)?"
ignore="*-rc*"
+1
View File
@@ -0,0 +1 @@
llvm22
+1
View File
@@ -0,0 +1 @@
llvm22