Udate to LLVM 19.1.7
Resolves: RHEL-57460
This commit is contained in:
parent
6ea106b713
commit
31e9acaacc
@ -0,0 +1,187 @@
|
|||||||
|
From ee0f56cff40b324bb06e034e247ec85ae9a846bf Mon Sep 17 00:00:00 2001
|
||||||
|
From: Nikita Popov <npopov@redhat.com>
|
||||||
|
Date: Wed, 8 Jan 2025 08:28:18 +0100
|
||||||
|
Subject: [PATCH] [PATCH] [Bolt][CMake] Don't export bolt libraries in
|
||||||
|
LLVMExports.cmake
|
||||||
|
|
||||||
|
Bolt makes use of add_llvm_library and as such ends up exporting
|
||||||
|
its libraries from LLVMExports.cmake, which is not correct.
|
||||||
|
|
||||||
|
Bolt doesn't have its own exports file, and I assume that there
|
||||||
|
is no desire to have one either -- Bolt libraries are not intended
|
||||||
|
to be consumed as a cmake module, right?
|
||||||
|
|
||||||
|
As such, this PR adds a NO_EXPORT option to simplify exclude these
|
||||||
|
libraries from the exports file.
|
||||||
|
|
||||||
|
---
|
||||||
|
This patch originates from this PR:
|
||||||
|
|
||||||
|
https://patch-diff.githubusercontent.com/raw/llvm/llvm-project/pull/121936.
|
||||||
|
|
||||||
|
The commit was:
|
||||||
|
|
||||||
|
https://github.com/nikic/llvm-project/commit/4333a4dd270b5c046c5469b97846e3dae58fb221.patch
|
||||||
|
|
||||||
|
And then it was rebased onto llvmorg-19.1.6.
|
||||||
|
---
|
||||||
|
bolt/lib/Core/CMakeLists.txt | 1 +
|
||||||
|
bolt/lib/Passes/CMakeLists.txt | 1 +
|
||||||
|
bolt/lib/Profile/CMakeLists.txt | 1 +
|
||||||
|
bolt/lib/Rewrite/CMakeLists.txt | 1 +
|
||||||
|
bolt/lib/RuntimeLibs/CMakeLists.txt | 1 +
|
||||||
|
bolt/lib/Target/AArch64/CMakeLists.txt | 1 +
|
||||||
|
bolt/lib/Target/RISCV/CMakeLists.txt | 1 +
|
||||||
|
bolt/lib/Target/X86/CMakeLists.txt | 1 +
|
||||||
|
bolt/lib/Utils/CMakeLists.txt | 1 +
|
||||||
|
llvm/cmake/modules/AddLLVM.cmake | 12 +++++++++---
|
||||||
|
10 files changed, 18 insertions(+), 3 deletions(-)
|
||||||
|
|
||||||
|
diff --git a/bolt/lib/Core/CMakeLists.txt b/bolt/lib/Core/CMakeLists.txt
|
||||||
|
index bb58667066fd..8c1f5d0bb37b 100644
|
||||||
|
--- a/bolt/lib/Core/CMakeLists.txt
|
||||||
|
+++ b/bolt/lib/Core/CMakeLists.txt
|
||||||
|
@@ -35,6 +35,7 @@ add_llvm_library(LLVMBOLTCore
|
||||||
|
ParallelUtilities.cpp
|
||||||
|
Relocation.cpp
|
||||||
|
|
||||||
|
+ NO_EXPORT
|
||||||
|
DISABLE_LLVM_LINK_LLVM_DYLIB
|
||||||
|
LINK_LIBS
|
||||||
|
${LLVM_PTHREAD_LIB}
|
||||||
|
diff --git a/bolt/lib/Passes/CMakeLists.txt b/bolt/lib/Passes/CMakeLists.txt
|
||||||
|
index 407d8b03f739..7367b541545d 100644
|
||||||
|
--- a/bolt/lib/Passes/CMakeLists.txt
|
||||||
|
+++ b/bolt/lib/Passes/CMakeLists.txt
|
||||||
|
@@ -45,6 +45,7 @@ add_llvm_library(LLVMBOLTPasses
|
||||||
|
VeneerElimination.cpp
|
||||||
|
RetpolineInsertion.cpp
|
||||||
|
|
||||||
|
+ NO_EXPORT
|
||||||
|
DISABLE_LLVM_LINK_LLVM_DYLIB
|
||||||
|
|
||||||
|
LINK_LIBS
|
||||||
|
diff --git a/bolt/lib/Profile/CMakeLists.txt b/bolt/lib/Profile/CMakeLists.txt
|
||||||
|
index 9aa4ba0490b0..a2bb4aa074c7 100644
|
||||||
|
--- a/bolt/lib/Profile/CMakeLists.txt
|
||||||
|
+++ b/bolt/lib/Profile/CMakeLists.txt
|
||||||
|
@@ -7,6 +7,7 @@ add_llvm_library(LLVMBOLTProfile
|
||||||
|
YAMLProfileReader.cpp
|
||||||
|
YAMLProfileWriter.cpp
|
||||||
|
|
||||||
|
+ NO_EXPORT
|
||||||
|
DISABLE_LLVM_LINK_LLVM_DYLIB
|
||||||
|
|
||||||
|
LINK_COMPONENTS
|
||||||
|
diff --git a/bolt/lib/Rewrite/CMakeLists.txt b/bolt/lib/Rewrite/CMakeLists.txt
|
||||||
|
index 34993af2623b..6737e89b8451 100644
|
||||||
|
--- a/bolt/lib/Rewrite/CMakeLists.txt
|
||||||
|
+++ b/bolt/lib/Rewrite/CMakeLists.txt
|
||||||
|
@@ -26,6 +26,7 @@ add_llvm_library(LLVMBOLTRewrite
|
||||||
|
RewriteInstance.cpp
|
||||||
|
SDTRewriter.cpp
|
||||||
|
|
||||||
|
+ NO_EXPORT
|
||||||
|
DISABLE_LLVM_LINK_LLVM_DYLIB
|
||||||
|
|
||||||
|
LINK_LIBS
|
||||||
|
diff --git a/bolt/lib/RuntimeLibs/CMakeLists.txt b/bolt/lib/RuntimeLibs/CMakeLists.txt
|
||||||
|
index d3ac71d3e797..b8db7e4a1553 100644
|
||||||
|
--- a/bolt/lib/RuntimeLibs/CMakeLists.txt
|
||||||
|
+++ b/bolt/lib/RuntimeLibs/CMakeLists.txt
|
||||||
|
@@ -11,6 +11,7 @@ add_llvm_library(LLVMBOLTRuntimeLibs
|
||||||
|
HugifyRuntimeLibrary.cpp
|
||||||
|
InstrumentationRuntimeLibrary.cpp
|
||||||
|
|
||||||
|
+ NO_EXPORT
|
||||||
|
DISABLE_LLVM_LINK_LLVM_DYLIB
|
||||||
|
)
|
||||||
|
|
||||||
|
diff --git a/bolt/lib/Target/AArch64/CMakeLists.txt b/bolt/lib/Target/AArch64/CMakeLists.txt
|
||||||
|
index be03e247aa96..526a9645cb54 100644
|
||||||
|
--- a/bolt/lib/Target/AArch64/CMakeLists.txt
|
||||||
|
+++ b/bolt/lib/Target/AArch64/CMakeLists.txt
|
||||||
|
@@ -7,6 +7,7 @@ set(LLVM_LINK_COMPONENTS
|
||||||
|
add_llvm_library(LLVMBOLTTargetAArch64
|
||||||
|
AArch64MCPlusBuilder.cpp
|
||||||
|
|
||||||
|
+ NO_EXPORT
|
||||||
|
DISABLE_LLVM_LINK_LLVM_DYLIB
|
||||||
|
|
||||||
|
DEPENDS
|
||||||
|
diff --git a/bolt/lib/Target/RISCV/CMakeLists.txt b/bolt/lib/Target/RISCV/CMakeLists.txt
|
||||||
|
index 7f9557606320..3955cfc0f089 100644
|
||||||
|
--- a/bolt/lib/Target/RISCV/CMakeLists.txt
|
||||||
|
+++ b/bolt/lib/Target/RISCV/CMakeLists.txt
|
||||||
|
@@ -7,6 +7,7 @@ set(LLVM_LINK_COMPONENTS
|
||||||
|
add_llvm_library(LLVMBOLTTargetRISCV
|
||||||
|
RISCVMCPlusBuilder.cpp
|
||||||
|
|
||||||
|
+ NO_EXPORT
|
||||||
|
DISABLE_LLVM_LINK_LLVM_DYLIB
|
||||||
|
|
||||||
|
DEPENDS
|
||||||
|
diff --git a/bolt/lib/Target/X86/CMakeLists.txt b/bolt/lib/Target/X86/CMakeLists.txt
|
||||||
|
index 2b769bc7e7f5..00100e9b84c9 100644
|
||||||
|
--- a/bolt/lib/Target/X86/CMakeLists.txt
|
||||||
|
+++ b/bolt/lib/Target/X86/CMakeLists.txt
|
||||||
|
@@ -9,6 +9,7 @@ add_llvm_library(LLVMBOLTTargetX86
|
||||||
|
X86MCPlusBuilder.cpp
|
||||||
|
X86MCSymbolizer.cpp
|
||||||
|
|
||||||
|
+ NO_EXPORT
|
||||||
|
DISABLE_LLVM_LINK_LLVM_DYLIB
|
||||||
|
|
||||||
|
DEPENDS
|
||||||
|
diff --git a/bolt/lib/Utils/CMakeLists.txt b/bolt/lib/Utils/CMakeLists.txt
|
||||||
|
index d1403314274b..ceddcfc8f57a 100644
|
||||||
|
--- a/bolt/lib/Utils/CMakeLists.txt
|
||||||
|
+++ b/bolt/lib/Utils/CMakeLists.txt
|
||||||
|
@@ -2,6 +2,7 @@ add_llvm_library(LLVMBOLTUtils
|
||||||
|
CommandLineOpts.cpp
|
||||||
|
Utils.cpp
|
||||||
|
|
||||||
|
+ NO_EXPORT
|
||||||
|
DISABLE_LLVM_LINK_LLVM_DYLIB
|
||||||
|
|
||||||
|
LINK_LIBS
|
||||||
|
diff --git a/llvm/cmake/modules/AddLLVM.cmake b/llvm/cmake/modules/AddLLVM.cmake
|
||||||
|
index 03f4e1f190fd..addf083b7c71 100644
|
||||||
|
--- a/llvm/cmake/modules/AddLLVM.cmake
|
||||||
|
+++ b/llvm/cmake/modules/AddLLVM.cmake
|
||||||
|
@@ -897,7 +897,7 @@ endfunction()
|
||||||
|
|
||||||
|
macro(add_llvm_library name)
|
||||||
|
cmake_parse_arguments(ARG
|
||||||
|
- "SHARED;BUILDTREE_ONLY;MODULE;INSTALL_WITH_TOOLCHAIN"
|
||||||
|
+ "SHARED;BUILDTREE_ONLY;MODULE;INSTALL_WITH_TOOLCHAIN;NO_EXPORT"
|
||||||
|
""
|
||||||
|
""
|
||||||
|
${ARGN})
|
||||||
|
@@ -932,7 +932,11 @@ macro(add_llvm_library name)
|
||||||
|
set(umbrella)
|
||||||
|
endif()
|
||||||
|
|
||||||
|
- get_target_export_arg(${name} LLVM export_to_llvmexports ${umbrella})
|
||||||
|
+ if(ARG_NO_EXPORT)
|
||||||
|
+ set(export_to_llvmexports)
|
||||||
|
+ else()
|
||||||
|
+ get_target_export_arg(${name} LLVM export_to_llvmexports ${umbrella})
|
||||||
|
+ endif()
|
||||||
|
install(TARGETS ${name}
|
||||||
|
${export_to_llvmexports}
|
||||||
|
LIBRARY DESTINATION lib${LLVM_LIBDIR_SUFFIX} COMPONENT ${name}
|
||||||
|
@@ -945,7 +949,9 @@ macro(add_llvm_library name)
|
||||||
|
COMPONENT ${name})
|
||||||
|
endif()
|
||||||
|
endif()
|
||||||
|
- set_property(GLOBAL APPEND PROPERTY LLVM_EXPORTS ${name})
|
||||||
|
+ if(NOT ARG_NO_EXPORT)
|
||||||
|
+ set_property(GLOBAL APPEND PROPERTY LLVM_EXPORTS ${name})
|
||||||
|
+ endif()
|
||||||
|
endif()
|
||||||
|
|
||||||
|
get_subproject_title(subproject_title)
|
||||||
|
--
|
||||||
|
2.47.1
|
||||||
|
|
129
0001-CMake-Add-missing-dependency-108461.patch
Normal file
129
0001-CMake-Add-missing-dependency-108461.patch
Normal file
@ -0,0 +1,129 @@
|
|||||||
|
From 17ff6161b83e6a5e86fcb6a13c5551bba1438405 Mon Sep 17 00:00:00 2001
|
||||||
|
From: Erick Ochoa <github@ceci-nest-pas.me>
|
||||||
|
Date: Thu, 12 Sep 2024 21:16:58 -0400
|
||||||
|
Subject: [PATCH 1/9] [CMake] Add missing dependency (#108461)
|
||||||
|
|
||||||
|
The [`mlir-capi-execution-engine-test` test
|
||||||
|
executable](https://github.com/llvm/llvm-project/blob/main/mlir/test/CAPI/CMakeLists.txt#L26-L34)
|
||||||
|
|
||||||
|
```cmake
|
||||||
|
if(MLIR_ENABLE_EXECUTION_ENGINE)
|
||||||
|
_add_capi_test_executable(mlir-capi-execution-engine-test
|
||||||
|
execution_engine.c
|
||||||
|
LINK_LIBS PRIVATE
|
||||||
|
MLIRCAPIConversion
|
||||||
|
MLIRCAPIExecutionEngine
|
||||||
|
MLIRCAPIRegisterEverything
|
||||||
|
)
|
||||||
|
endif()
|
||||||
|
```
|
||||||
|
|
||||||
|
|
||||||
|
is run by lit tests, but it is not properly listed as a dependency. It
|
||||||
|
is added in places conditionally across the file
|
||||||
|
[`tests/CMakeLists.txt`](https://github.com/llvm/llvm-project/blob/main/mlir/test/CMakeLists.txt#L130-L143)
|
||||||
|
|
||||||
|
```cmake
|
||||||
|
# The native target may not be enabled, in this case we won't
|
||||||
|
# run tests that involves executing on the host: do not build
|
||||||
|
# useless binaries.
|
||||||
|
if(LLVM_ENABLE_PIC AND TARGET ${LLVM_NATIVE_ARCH})
|
||||||
|
list(APPEND MLIR_TEST_DEPENDS
|
||||||
|
mlir-cpu-runner
|
||||||
|
llc
|
||||||
|
mlir_async_runtime
|
||||||
|
mlir-capi-execution-engine-test
|
||||||
|
mlir_c_runner_utils
|
||||||
|
mlir_runner_utils
|
||||||
|
mlir_float16_utils
|
||||||
|
)
|
||||||
|
endif()
|
||||||
|
```
|
||||||
|
|
||||||
|
But this condition is not the same as the one where the test executable
|
||||||
|
is added. [It has been reported on discord that the following error
|
||||||
|
occurred:](https://discord.com/channels/636084430946959380/642426447167881246/1283811636725022730)
|
||||||
|
|
||||||
|
```
|
||||||
|
FAIL: MLIR :: CAPI/execution_engine.c (2 of 2121)
|
||||||
|
******************** TEST 'MLIR :: CAPI/execution_engine.c' FAILED ********************
|
||||||
|
Exit Code: 127
|
||||||
|
Command Output (stdout):
|
||||||
|
--
|
||||||
|
# RUN: at line 10
|
||||||
|
/usr/bin/mlir-capi-execution-engine-test 2>&1 | /usr/bin/FileCheck /builddir/build/BUILD/mlir-19.1.0_rc4-build/mlir-19.1.0-rc4.src/test/CAPI/execution_engine.c
|
||||||
|
# executed command: /usr/bin/mlir-capi-execution-engine-test
|
||||||
|
# .---command stderr------------
|
||||||
|
# | '/usr/bin/mlir-capi-execution-engine-test': command not found
|
||||||
|
# `-----------------------------
|
||||||
|
```
|
||||||
|
|
||||||
|
This error will not be deterministic and is dependent on the order in
|
||||||
|
which tools are built. If by any chance,
|
||||||
|
`mlir-capi-execution-engine-test` is built before the lit tests run,
|
||||||
|
then nothing will happen. But lit tests can be run before
|
||||||
|
`mlir-capi-execution-engine-test` is built.
|
||||||
|
|
||||||
|
This patch adds the `mlir-capi-execution-engine` to the
|
||||||
|
`MLIR_TEST_DEPENDS` list when the `MLIR_ENABLE_EXECUTION_ENGINE` flag is
|
||||||
|
present.
|
||||||
|
|
||||||
|
Happy to make changes like:
|
||||||
|
* removing `mlir-capi-execution-engine-test` from the other place where
|
||||||
|
it is included in the tests
|
||||||
|
* and merge and sort alphabetically these two commands
|
||||||
|
|
||||||
|
```cmake
|
||||||
|
set(MLIR_TEST_DEPENDS
|
||||||
|
FileCheck count not split-file
|
||||||
|
mlir-capi-ir-test
|
||||||
|
mlir-capi-irdl-test
|
||||||
|
mlir-capi-llvm-test
|
||||||
|
mlir-capi-pass-test
|
||||||
|
mlir-capi-quant-test
|
||||||
|
mlir-capi-rewrite-test
|
||||||
|
mlir-capi-sparse-tensor-test
|
||||||
|
mlir-capi-transform-test
|
||||||
|
mlir-capi-transform-interpreter-test
|
||||||
|
mlir-capi-translation-test
|
||||||
|
mlir-linalg-ods-yaml-gen
|
||||||
|
mlir-lsp-server
|
||||||
|
mlir-opt
|
||||||
|
mlir-query
|
||||||
|
mlir-reduce
|
||||||
|
mlir-tblgen
|
||||||
|
mlir-translate
|
||||||
|
tblgen-lsp-server
|
||||||
|
tblgen-to-irdl
|
||||||
|
)
|
||||||
|
|
||||||
|
set(MLIR_TEST_DEPENDS ${MLIR_TEST_DEPENDS}
|
||||||
|
mlir-capi-pdl-test
|
||||||
|
mlir-pdll-lsp-server
|
||||||
|
mlir-pdll
|
||||||
|
)
|
||||||
|
```
|
||||||
|
|
||||||
|
Co-authored-by: Erick Ochoa <erick@ceci-nest-pas.me>
|
||||||
|
---
|
||||||
|
mlir/test/CMakeLists.txt | 4 ++++
|
||||||
|
1 file changed, 4 insertions(+)
|
||||||
|
|
||||||
|
diff --git a/mlir/test/CMakeLists.txt b/mlir/test/CMakeLists.txt
|
||||||
|
index df95e5db11f1..4d2d738b734e 100644
|
||||||
|
--- a/mlir/test/CMakeLists.txt
|
||||||
|
+++ b/mlir/test/CMakeLists.txt
|
||||||
|
@@ -150,6 +150,10 @@ if(MLIR_ENABLE_CUDA_RUNNER)
|
||||||
|
list(APPEND MLIR_TEST_DEPENDS mlir_cuda_runtime)
|
||||||
|
endif()
|
||||||
|
|
||||||
|
+if(MLIR_ENABLE_EXECUTION_ENGINE)
|
||||||
|
+ list(APPEND MLIR_TEST_DEPENDS mlir-capi-execution-engine-test)
|
||||||
|
+endif()
|
||||||
|
+
|
||||||
|
if(MLIR_ENABLE_ROCM_RUNNER)
|
||||||
|
list(APPEND MLIR_TEST_DEPENDS mlir_rocm_runtime)
|
||||||
|
endif()
|
||||||
|
--
|
||||||
|
2.46.0
|
||||||
|
|
38
0001-CMake-Use-correct-exports-for-MLIR-tools.patch
Normal file
38
0001-CMake-Use-correct-exports-for-MLIR-tools.patch
Normal file
@ -0,0 +1,38 @@
|
|||||||
|
From b443e55162861125a50048ae9bc521e98058b273 Mon Sep 17 00:00:00 2001
|
||||||
|
From: Nikita Popov <npopov@redhat.com>
|
||||||
|
Date: Mon, 16 Dec 2024 14:44:43 +0100
|
||||||
|
Subject: [PATCH] [CMake] Use correct exports file for MLIR tools
|
||||||
|
|
||||||
|
llvm_add_tool() currently does not respect the passed project and
|
||||||
|
puts all tools into LLVMExports.cmake. This means that we end up
|
||||||
|
with binaries like mlir-opt in LLVMExports.cmake instead of
|
||||||
|
MLIRTargets.cmake, where they should be.
|
||||||
|
|
||||||
|
Adjust llvm_add_tool() to take the project into account.
|
||||||
|
---
|
||||||
|
llvm/cmake/modules/AddLLVM.cmake | 5 +++--
|
||||||
|
1 file changed, 3 insertions(+), 2 deletions(-)
|
||||||
|
|
||||||
|
diff --git a/llvm/cmake/modules/AddLLVM.cmake b/llvm/cmake/modules/AddLLVM.cmake
|
||||||
|
index 006dfb6de3a199..6cf0ee1a54dbdb 100644
|
||||||
|
--- a/llvm/cmake/modules/AddLLVM.cmake
|
||||||
|
+++ b/llvm/cmake/modules/AddLLVM.cmake
|
||||||
|
@@ -1483,7 +1483,7 @@ macro(llvm_add_tool project name)
|
||||||
|
|
||||||
|
if ( ${name} IN_LIST LLVM_TOOLCHAIN_TOOLS OR NOT LLVM_INSTALL_TOOLCHAIN_ONLY)
|
||||||
|
if( LLVM_BUILD_TOOLS )
|
||||||
|
- get_target_export_arg(${name} LLVM export_to_llvmexports)
|
||||||
|
+ get_target_export_arg(${name} ${project} export_to_llvmexports)
|
||||||
|
install(TARGETS ${name}
|
||||||
|
${export_to_llvmexports}
|
||||||
|
RUNTIME DESTINATION ${${project}_TOOLS_INSTALL_DIR}
|
||||||
|
@@ -1497,7 +1497,8 @@ macro(llvm_add_tool project name)
|
||||||
|
endif()
|
||||||
|
endif()
|
||||||
|
if( LLVM_BUILD_TOOLS )
|
||||||
|
- set_property(GLOBAL APPEND PROPERTY LLVM_EXPORTS ${name})
|
||||||
|
+ string(TOUPPER "${project}" project_upper)
|
||||||
|
+ set_property(GLOBAL APPEND PROPERTY ${project_upper}_EXPORTS ${name})
|
||||||
|
endif()
|
||||||
|
endif()
|
||||||
|
get_subproject_title(subproject_title)
|
80
0001-mlir-Specify-deps-via-LLVM_LINK_COMPONENTS.patch
Normal file
80
0001-mlir-Specify-deps-via-LLVM_LINK_COMPONENTS.patch
Normal file
@ -0,0 +1,80 @@
|
|||||||
|
From c8f93f1958de1f59222a89dd64a573f91105e135 Mon Sep 17 00:00:00 2001
|
||||||
|
From: Konrad Kleine <kkleine@redhat.com>
|
||||||
|
Date: Tue, 3 Dec 2024 20:53:29 +0100
|
||||||
|
Subject: [PATCH] [mlir] Specify deps via `LLVM_LINK_COMPONENTS`
|
||||||
|
|
||||||
|
This specifies the dependencies to link against with
|
||||||
|
`LLVM_LINK_COMPONENTS` for the
|
||||||
|
`mlir/test/Target/LLVM/MLIRTargetLLVMTests` binary.
|
||||||
|
|
||||||
|
Before, the dependencies where directly added to the
|
||||||
|
`target_link_libraries()` call which caused the problems I describe
|
||||||
|
next:
|
||||||
|
|
||||||
|
When doing a build of LLVM with MLIR I want to link against
|
||||||
|
`libLLVM.so` instead of statically linking `libLLVMSupport.a`.
|
||||||
|
MLIR on the other side seems to statically link against
|
||||||
|
`libLLVMSupport.a` because when I link to the shared library `libLLVM.so` I get:
|
||||||
|
|
||||||
|
```
|
||||||
|
CommandLine Error: Option 'aarch64-ptrauth-auth-checks' registered more than once!
|
||||||
|
```
|
||||||
|
|
||||||
|
This error indicates that the `Support` library is linked twice in the `MLIRTargetLLVMTest` binary.
|
||||||
|
|
||||||
|
Here's the creation of the `MLIRTargetLLVMTest` binary before (Notice the
|
||||||
|
`libLLVMSupport.a`):
|
||||||
|
|
||||||
|
```
|
||||||
|
[6535/6847] : && /usr/bin/clang++ -O2 -flto=thin -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-U_FORTIFY_SOURCE,-D_FORTIFY_SOURCE=3 -Wp,-D_GLIBCXX_ASSERTIONS --config=/usr/lib/rpm/redhat/redhat-hardened-clang.cfg -fstack-protector-strong -mbranch-protection=standard -fasynchronous-unwind-tables -D_DEFAULT_SOURCE -Dasm=__asm__ -fPIC -fno-semantic-interposition -fvisibility-inlines-hidden -Werror=date-time -Werror=unguarded-availability-new -Wall -Wextra -Wno-unused-parameter -Wwrite-strings -Wcast-qual -Wmissing-field-initializers -pedantic -Wno-long-long -Wc++98-compat-extra-semi -Wimplicit-fallthrough -Wcovered-switch-default -Wno-noexcept-type -Wnon-virtual-dtor -Wdelete-non-virtual-dtor -Wsuggest-override -Wstring-conversion -Wmisleading-indentation -Wctad-maybe-unsupported -fdiagnostics-color -ffunction-sections -fdata-sections -Wundef -Werror=mismatched-tags -O2 -g -DNDEBUG -Wl,-z,relro -Wl,--as-needed -Wl,-z,pack-relative-relocs -Wl,-z,now --config=/usr/lib/rpm/redhat/redhat-hardened-clang-ld.cfg -flto=thin -ffat-lto-objects -Wl,--build-id=sha1 -Wl,--gc-sections -fno-lto tools/mlir/unittests/Target/LLVM/CMakeFiles/MLIRTargetLLVMTests.dir/SerializeNVVMTarget.cpp.o tools/mlir/unittests/Target/LLVM/CMakeFiles/MLIRTargetLLVMTests.dir/SerializeROCDLTarget.cpp.o tools/mlir/unittests/Target/LLVM/CMakeFiles/MLIRTargetLLVMTests.dir/SerializeToLLVMBitcode.cpp.o -o tools/mlir/unittests/Target/LLVM/MLIRTargetLLVMTests -Wl,-rpath,/builddir/build/BUILD/llvm-19.1.3-build/llvm-project-19.1.3.src/llvm/redhat-linux-build/lib64 lib64/libllvm_gtest_main.a lib64/libllvm_gtest.a lib64/libMLIRTargetLLVM.a lib64/libMLIRNVVMTarget.a lib64/libMLIRROCDLTarget.a lib64/libMLIRGPUDialect.a lib64/libMLIRNVVMDialect.a lib64/libMLIRLLVMDialect.a lib64/libMLIRLLVMToLLVMIRTranslation.a lib64/libMLIRBuiltinToLLVMIRTranslation.a lib64/libMLIRNVVMToLLVMIRTranslation.a lib64/libMLIRROCDLToLLVMIRTranslation.a lib64/libMLIRGPUToLLVMIRTranslation.a lib64/libLLVMAArch64CodeGen.a lib64/libLLVMAArch64Desc.a lib64/libLLVMAArch64Info.a -lpthread lib64/libMLIRTargetLLVM.a lib64/libMLIRROCDLDialect.a lib64/libMLIRExecutionEngineUtils.a lib64/libMLIRGPUDialect.a lib64/libMLIRMemRefDialect.a lib64/libMLIRArithUtils.a lib64/libMLIRDialectUtils.a lib64/libMLIRComplexDialect.a lib64/libMLIRArithAttrToLLVMConversion.a lib64/libMLIRArithDialect.a lib64/libMLIRCastInterfaces.a lib64/libMLIRDialect.a lib64/libMLIRInferIntRangeCommon.a lib64/libMLIRUBDialect.a lib64/libMLIRShapedOpInterfaces.a lib64/libMLIRTargetLLVMIRExport.a lib64/libMLIRDLTIDialect.a lib64/libMLIRLLVMIRTransforms.a lib64/libMLIRNVVMDialect.a lib64/libMLIRLLVMDialect.a lib64/libMLIRFuncDialect.a lib64/libMLIRTransforms.a lib64/libMLIRMemorySlotInterfaces.a lib64/libMLIRCopyOpInterface.a lib64/libMLIRRuntimeVerifiableOpInterface.a lib64/libMLIRTranslateLib.a lib64/libMLIRParser.a lib64/libMLIRBytecodeReader.a lib64/libMLIRAsmParser.a lib64/libMLIRTransformUtils.a lib64/libMLIRSubsetOpInterface.a lib64/libMLIRValueBoundsOpInterface.a lib64/libMLIRDestinationStyleOpInterface.a lib64/libMLIRRewrite.a lib64/libMLIRRewritePDL.a lib64/libMLIRPDLToPDLInterp.a lib64/libMLIRPass.a lib64/libMLIRAnalysis.a lib64/libMLIRControlFlowInterfaces.a lib64/libMLIRInferIntRangeInterface.a lib64/libMLIRCallInterfaces.a lib64/libMLIRDataLayoutInterfaces.a lib64/libMLIRViewLikeInterface.a lib64/libMLIRLoopLikeInterface.a lib64/libMLIRPresburger.a lib64/libMLIRPDLInterpDialect.a lib64/libMLIRFunctionInterfaces.a lib64/libMLIRPDLDialect.a lib64/libMLIRSideEffectInterfaces.a lib64/libMLIRInferTypeOpInterface.a lib64/libMLIRIR.a lib64/libMLIRSupport.a lib64/libLLVM.so.19.1 lib64/libLLVMAArch64Utils.a lib64/libLLVMAsmPrinter.a lib64/libLLVMCFGuard.a lib64/libLLVMGlobalISel.a lib64/libLLVMSelectionDAG.a lib64/libLLVMCodeGen.a lib64/libLLVMScalarOpts.a lib64/libLLVMAggressiveInstCombine.a lib64/libLLVMInstCombine.a lib64/libLLVMBitWriter.a lib64/libLLVMObjCARCOpts.a lib64/libLLVMCodeGenTypes.a lib64/libLLVMTarget.a lib64/libLLVMVectorize.a lib64/libLLVMTransformUtils.a lib64/libLLVMAnalysis.a lib64/libLLVMProfileData.a lib64/libLLVMSymbolize.a lib64/libLLVMDebugInfoDWARF.a lib64/libLLVMDebugInfoPDB.a lib64/libLLVMObject.a lib64/libLLVMMCParser.a lib64/libLLVMMC.a lib64/libLLVMIRReader.a lib64/libLLVMBitReader.a lib64/libLLVMAsmParser.a lib64/libLLVMTextAPI.a lib64/libLLVMDebugInfoCodeView.a lib64/libLLVMDebugInfoMSF.a lib64/libLLVMDebugInfoBTF.a lib64/libLLVMCore.a lib64/libLLVMBinaryFormat.a lib64/libLLVMRemarks.a lib64/libLLVMBitstreamReader.a lib64/libLLVMTargetParser.a lib64/libLLVMSupport.a lib64/libLLVMDemangle.a -lrt -ldl -lm /usr/lib64/libz.so /usr/lib64/libzstd.so && :
|
||||||
|
```
|
||||||
|
|
||||||
|
Here's the full error:
|
||||||
|
|
||||||
|
```
|
||||||
|
[24/25] cd /builddir/build/BUILD/llvm-19.1.3-build/llvm-project-19.1.3.src/llvm/redhat-linux-build/tools/mlir/test && /usr/bin/python3 /builddir/build/BUILD/llvm-19.1.3-build/llvm-project-19.1.3.src/llvm/redhat-linux-build/./bin/llvm-lit -vv /builddir/build/BUILD/llvm-19.1.3-build/llvm-project-19.1.3.src/llvm/redhat-linux-build/tools/mlir/test
|
||||||
|
: CommandLine Error: Option 'aarch64-ptrauth-auth-checks' registered more than once!
|
||||||
|
LLVM ERROR: inconsistency in registered CommandLine options
|
||||||
|
llvm-lit: /builddir/build/BUILD/llvm-19.1.3-build/llvm-project-19.1.3.src/llvm/utils/lit/lit/formats/googletest.py:38: warning: unable to discover google-tests in '/builddir/build/BUILD/llvm-19.1.3-build/llvm-project-19.1.3.src/llvm/redhat-linux-build/tools/mlir/unittests/Target/LLVM/./MLIRTargetLLVMTests': Command '['/builddir/build/BUILD/llvm-19.1.3-build/llvm-project-19.1.3.src/llvm/redhat-linux-build/tools/mlir/unittests/Target/LLVM/./MLIRTargetLLVMTests', '--gtest_list_tests', '--gtest_filter=-*DISABLED_*']' died with <Signals.SIGABRT: 6>.. Process output: b''
|
||||||
|
error: filter did not match any tests (of 2704 discovered). Use '--allow-empty-runs' to suppress this error.
|
||||||
|
FAILED: tools/mlir/test/CMakeFiles/check-mlir /builddir/build/BUILD/llvm-19.1.3-build/llvm-project-19.1.3.src/llvm/redhat-linux-build/tools/mlir/test/CMakeFiles/check-mlir
|
||||||
|
```
|
||||||
|
|
||||||
|
Here's the CMake invocation:
|
||||||
|
|
||||||
|
```
|
||||||
|
/usr/bin/cmake -S . -B redhat-linux-build -DCMAKE_C_FLAGS_RELEASE:STRING=-DNDEBUG -DCMAKE_CXX_FLAGS_RELEASE:STRING=-DNDEBUG -DCMAKE_Fortran_FLAGS_RELEASE:STRING=-DNDEBUG -DCMAKE_VERBOSE_MAKEFILE:BOOL=ON -DCMAKE_INSTALL_DO_STRIP:BOOL=OFF -DCMAKE_INSTALL_PREFIX:PATH=/usr -DINCLUDE_INSTALL_DIR:PATH=/usr/include -DLIB_INSTALL_DIR:PATH=/usr/lib64 -DSYSCONF_INSTALL_DIR:PATH=/etc -DSHARE_INSTALL_PREFIX:PATH=/usr/share -DLIB_SUFFIX=64 -DBUILD_SHARED_LIBS:BOOL=ON -G Ninja '' -DCLANG_BUILD_EXAMPLES:BOOL=OFF -DCLANG_CONFIG_FILE_SYSTEM_DIR=/etc/clang/ -DCLANG_DEFAULT_PIE_ON_LINUX=OFF -DCLANG_DEFAULT_UNWINDLIB=libgcc -DCLANG_ENABLE_ARCMT:BOOL=ON -DCLANG_ENABLE_STATIC_ANALYZER:BOOL=ON -DCLANG_INCLUDE_DOCS:BOOL=ON -DCLANG_INCLUDE_TESTS:BOOL=ON -DCLANG_LINK_CLANG_DYLIB=ON -DCLANG_PLUGIN_SUPPORT:BOOL=ON '-DCLANG_REPOSITORY_STRING=Fedora 19.1.3-5.fc42' -DLLVM_EXTERNAL_CLANG_TOOLS_EXTRA_SOURCE_DIR=../clang-tools-extra -DCLANG_RESOURCE_DIR=../lib/clang/19 -DCOMPILER_RT_INCLUDE_TESTS:BOOL=OFF -DCOMPILER_RT_INSTALL_PATH=/usr/lib/clang/19 -DLLVM_ENABLE_DOXYGEN:BOOL=OFF -DLLVM_ENABLE_SPHINX:BOOL=ON -DLLVM_BUILD_DOCS:BOOL=ON -DSPHINX_EXECUTABLE=/usr/bin/sphinx-build-3 -DSPHINX_OUTPUT_HTML:BOOL=OFF -DSPHINX_OUTPUT_MAN:BOOL=ON -DSPHINX_WARNINGS_AS_ERRORS=OFF -DLLDB_DISABLE_CURSES:BOOL=OFF -DLLDB_DISABLE_LIBEDIT:BOOL=OFF -DLLDB_DISABLE_PYTHON:BOOL=OFF -DLLDB_ENFORCE_STRICT_TEST_REQUIREMENTS:BOOL=ON -DLLVM_APPEND_VC_REV:BOOL=OFF -DLLVM_BUILD_EXAMPLES:BOOL=OFF -DLLVM_BUILD_EXTERNAL_COMPILER_RT:BOOL=ON -DLLVM_BUILD_LLVM_DYLIB:BOOL=ON -DLLVM_BUILD_RUNTIME:BOOL=ON -DLLVM_BUILD_TOOLS:BOOL=ON -DLLVM_BUILD_UTILS:BOOL=ON -DLLVM_COMMON_CMAKE_UTILS=/usr/share/llvm/cmake -DLLVM_DEFAULT_TARGET_TRIPLE=aarch64-redhat-linux-gnu -DLLVM_DYLIB_COMPONENTS=all -DLLVM_ENABLE_EH=ON -DLLVM_ENABLE_FFI:BOOL=ON -DLLVM_ENABLE_LIBCXX:BOOL=OFF -DLLVM_ENABLE_PER_TARGET_RUNTIME_DIR=ON '-DLLVM_ENABLE_PROJECTS=clang;clang-tools-extra;lld;lldb;mlir' -DLLVM_ENABLE_RTTI:BOOL=ON '-DLLVM_ENABLE_RUNTIMES=compiler-rt;openmp;offload' -DLLVM_ENABLE_ZLIB:BOOL=ON -DLLVM_EXPERIMENTAL_TARGETS_TO_BUILD=AVR -DLLVM_INCLUDE_BENCHMARKS=OFF -DLLVM_INCLUDE_EXAMPLES:BOOL=ON -DLLVM_INCLUDE_TOOLS:BOOL=ON -DLLVM_INCLUDE_UTILS:BOOL=ON -DLLVM_INSTALL_TOOLCHAIN_ONLY:BOOL=OFF -DLLVM_INSTALL_UTILS:BOOL=ON -DLLVM_LINK_LLVM_DYLIB:BOOL=ON -DLLVM_PARALLEL_LINK_JOBS=1 -DLLVM_TARGETS_TO_BUILD=all -DLLVM_TOOLS_INSTALL_DIR:PATH=bin -DLLVM_UNREACHABLE_OPTIMIZE:BOOL=OFF -DLLVM_USE_PERF:BOOL=ON -DLLVM_UTILS_INSTALL_DIR:PATH=bin -DMLIR_INCLUDE_DOCS:BOOL=ON -DMLIR_INCLUDE_TESTS:BOOL=ON -DMLIR_INCLUDE_INTEGRATION_TESTS:BOOL=OFF -DMLIR_INSTALL_AGGREGATE_OBJECTS=OFF -DMLIR_BUILD_MLIR_C_DYLIB=ON -DMLIR_ENABLE_BINDINGS_PYTHON:BOOL=ON -DOPENMP_INSTALL_LIBDIR=lib64 -DLIBOMP_INSTALL_ALIASES=OFF -DLLVM_BUILD_TESTS:BOOL=ON -DLLVM_INCLUDE_TESTS:BOOL=ON -DLLVM_INSTALL_GTEST:BOOL=ON -DLLVM_LIT_ARGS=-vv -DLLVM_UNITTEST_LINK_FLAGS=-fno-lto -DBUILD_SHARED_LIBS:BOOL=OFF -DCMAKE_BUILD_TYPE=RelWithDebInfo -DCMAKE_INSTALL_PREFIX=/usr -DENABLE_LINKER_BUILD_ID:BOOL=ON -DOFFLOAD_INSTALL_LIBDIR=lib64 -DPython3_EXECUTABLE=/usr/bin/python3 -DCMAKE_SKIP_INSTALL_RPATH:BOOL=ON -DPPC_LINUX_DEFAULT_IEEELONGDOUBLE=ON -DLLVM_LIBDIR_SUFFIX=64 -DLLVM_BINUTILS_INCDIR=/usr/include -DLLVM_VERSION_SUFFIX=
|
||||||
|
```
|
||||||
|
---
|
||||||
|
mlir/unittests/Target/LLVM/CMakeLists.txt | 5 ++---
|
||||||
|
1 file changed, 2 insertions(+), 3 deletions(-)
|
||||||
|
|
||||||
|
diff --git a/mlir/unittests/Target/LLVM/CMakeLists.txt b/mlir/unittests/Target/LLVM/CMakeLists.txt
|
||||||
|
index 6d612548a94c..0c61d222dedf 100644
|
||||||
|
--- a/mlir/unittests/Target/LLVM/CMakeLists.txt
|
||||||
|
+++ b/mlir/unittests/Target/LLVM/CMakeLists.txt
|
||||||
|
@@ -1,11 +1,11 @@
|
||||||
|
+set(LLVM_LINK_COMPONENTS nativecodegen)
|
||||||
|
+
|
||||||
|
add_mlir_unittest(MLIRTargetLLVMTests
|
||||||
|
SerializeNVVMTarget.cpp
|
||||||
|
SerializeROCDLTarget.cpp
|
||||||
|
SerializeToLLVMBitcode.cpp
|
||||||
|
)
|
||||||
|
|
||||||
|
-llvm_map_components_to_libnames(llvm_libs nativecodegen)
|
||||||
|
-
|
||||||
|
target_link_libraries(MLIRTargetLLVMTests
|
||||||
|
PRIVATE
|
||||||
|
MLIRTargetLLVM
|
||||||
|
@@ -19,7 +19,6 @@ target_link_libraries(MLIRTargetLLVMTests
|
||||||
|
MLIRNVVMToLLVMIRTranslation
|
||||||
|
MLIRROCDLToLLVMIRTranslation
|
||||||
|
MLIRGPUToLLVMIRTranslation
|
||||||
|
- ${llvm_libs}
|
||||||
|
)
|
||||||
|
|
||||||
|
if (DEFINED LLVM_NATIVE_TARGET)
|
||||||
|
--
|
||||||
|
2.46.0
|
||||||
|
|
77
0001-mlir-python-Reuse-the-library-directory.patch
Normal file
77
0001-mlir-python-Reuse-the-library-directory.patch
Normal file
@ -0,0 +1,77 @@
|
|||||||
|
From 1d043550c7601ca776b0318b9b913e5ecf325baf Mon Sep 17 00:00:00 2001
|
||||||
|
From: Tulio Magno Quites Machado Filho <tuliom@redhat.com>
|
||||||
|
Date: Tue, 5 Sep 2023 10:35:37 -0300
|
||||||
|
Subject: [PATCH] Reuse the library directory
|
||||||
|
|
||||||
|
Prefer to get the path to the shared libraries from config.llvm_shlib_dir.
|
||||||
|
Fallback to the previous path only if config.llvm_shlib_dir is not
|
||||||
|
defined.
|
||||||
|
|
||||||
|
This ensures the test will pass regardless of the build configuration
|
||||||
|
used downstream.
|
||||||
|
---
|
||||||
|
mlir/test/lit.cfg.py | 1 +
|
||||||
|
mlir/test/python/execution_engine.py | 12 +++++++-----
|
||||||
|
2 files changed, 8 insertions(+), 5 deletions(-)
|
||||||
|
|
||||||
|
diff --git a/mlir/test/lit.cfg.py b/mlir/test/lit.cfg.py
|
||||||
|
--- a/mlir/test/lit.cfg.py 2024-08-05 10:40:33.000000000 +0200
|
||||||
|
+++ b/mlir/test/lit.cfg.py 2024-08-14 19:17:55.160470316 +0200
|
||||||
|
@@ -164,6 +164,7 @@
|
||||||
|
ToolSubst("transform-opt-ch2", unresolved="ignore"),
|
||||||
|
ToolSubst("transform-opt-ch3", unresolved="ignore"),
|
||||||
|
ToolSubst("transform-opt-ch4", unresolved="ignore"),
|
||||||
|
+ ToolSubst("%llvm_shlib_dir", config.llvm_shlib_dir, unresolved="ignore"),
|
||||||
|
ToolSubst("mlir-transform-opt", unresolved="ignore"),
|
||||||
|
ToolSubst("%mlir_lib_dir", config.mlir_lib_dir, unresolved="ignore"),
|
||||||
|
ToolSubst("%mlir_src_dir", config.mlir_src_root, unresolved="ignore"),
|
||||||
|
diff -ruN mlir-19.1.0-rc2.src.orig/test/python/execution_engine.py mlir-19.1.0-rc2.src/test/python/execution_engine.py
|
||||||
|
--- a/mlir/test/python/execution_engine.py 2024-08-05 10:40:33.000000000 +0200
|
||||||
|
+++ b/mlir/test/python/execution_engine.py 2024-08-14 19:17:20.822219824 +0200
|
||||||
|
@@ -1,4 +1,4 @@
|
||||||
|
-# RUN: %PYTHON %s 2>&1 | FileCheck %s
|
||||||
|
+# RUN: env LLVM_SHLIB_DIR=%llvm_shlib_dir %PYTHON %s 2>&1 | FileCheck %s
|
||||||
|
# REQUIRES: host-supports-jit
|
||||||
|
import gc, sys, os, tempfile
|
||||||
|
from mlir.ir import *
|
||||||
|
@@ -6,6 +6,9 @@
|
||||||
|
from mlir.execution_engine import *
|
||||||
|
from mlir.runtime import *
|
||||||
|
|
||||||
|
+_DEFAULT_LIB_DIR = "../../../../lib"
|
||||||
|
+LIB_DIR = os.getenv("LLVM_SHLIB_DIR", _DEFAULT_LIB_DIR)
|
||||||
|
+
|
||||||
|
|
||||||
|
# Log everything to stderr and flush so that we have a unified stream to match
|
||||||
|
# errors/info emitted by MLIR to stderr.
|
||||||
|
@@ -613,6 +616,7 @@
|
||||||
|
shared_libs = [
|
||||||
|
"../../../../bin/mlir_runner_utils.dll",
|
||||||
|
"../../../../bin/mlir_c_runner_utils.dll",
|
||||||
|
+
|
||||||
|
]
|
||||||
|
elif sys.platform == "darwin":
|
||||||
|
shared_libs = [
|
||||||
|
@@ -621,8 +625,9 @@
|
||||||
|
]
|
||||||
|
else:
|
||||||
|
shared_libs = [
|
||||||
|
- "../../../../lib/libmlir_runner_utils.so",
|
||||||
|
- "../../../../lib/libmlir_c_runner_utils.so",
|
||||||
|
+ LIB_DIR + "/libmlir_runner_utils.so",
|
||||||
|
+ LIB_DIR + "/libmlir_c_runner_utils.so",
|
||||||
|
+
|
||||||
|
]
|
||||||
|
|
||||||
|
execution_engine = ExecutionEngine(
|
||||||
|
@@ -664,8 +669,8 @@
|
||||||
|
]
|
||||||
|
else:
|
||||||
|
shared_libs = [
|
||||||
|
- "../../../../lib/libmlir_runner_utils.so",
|
||||||
|
- "../../../../lib/libmlir_c_runner_utils.so",
|
||||||
|
+ LIB_DIR + "/libmlir_runner_utils.so",
|
||||||
|
+ LIB_DIR + "/libmlir_c_runner_utils.so",
|
||||||
|
]
|
||||||
|
|
||||||
|
execution_engine = ExecutionEngine(
|
51
0001-openmp-Support-CET-in-z_Linux_asm.S-123213.patch
Normal file
51
0001-openmp-Support-CET-in-z_Linux_asm.S-123213.patch
Normal file
@ -0,0 +1,51 @@
|
|||||||
|
From 90a05f32166c4a45224a5eedbec9c5c7e21d2dbf Mon Sep 17 00:00:00 2001
|
||||||
|
From: Nikita Popov <npopov@redhat.com>
|
||||||
|
Date: Fri, 17 Jan 2025 09:26:49 +0100
|
||||||
|
Subject: [PATCH] [openmp] Support CET in z_Linux_asm.S (#123213)
|
||||||
|
|
||||||
|
When libomp is built with -cf-protection, add endbr instructions to the
|
||||||
|
start of functions for Intel CET support.
|
||||||
|
---
|
||||||
|
openmp/runtime/src/z_Linux_asm.S | 12 ++++++++++++
|
||||||
|
1 file changed, 12 insertions(+)
|
||||||
|
|
||||||
|
diff --git a/openmp/runtime/src/z_Linux_asm.S b/openmp/runtime/src/z_Linux_asm.S
|
||||||
|
index cc5344cdd124..0bf9f07a13f1 100644
|
||||||
|
--- a/openmp/runtime/src/z_Linux_asm.S
|
||||||
|
+++ b/openmp/runtime/src/z_Linux_asm.S
|
||||||
|
@@ -19,6 +19,16 @@
|
||||||
|
|
||||||
|
#if KMP_ARCH_X86 || KMP_ARCH_X86_64
|
||||||
|
|
||||||
|
+# if defined(__ELF__) && defined(__CET__) && defined(__has_include)
|
||||||
|
+# if __has_include(<cet.h>)
|
||||||
|
+# include <cet.h>
|
||||||
|
+# endif
|
||||||
|
+# endif
|
||||||
|
+
|
||||||
|
+# if !defined(_CET_ENDBR)
|
||||||
|
+# define _CET_ENDBR
|
||||||
|
+# endif
|
||||||
|
+
|
||||||
|
# if KMP_MIC
|
||||||
|
// the 'delay r16/r32/r64' should be used instead of the 'pause'.
|
||||||
|
// The delay operation has the effect of removing the current thread from
|
||||||
|
@@ -66,6 +76,7 @@
|
||||||
|
ALIGN 4
|
||||||
|
.globl KMP_PREFIX_UNDERSCORE($0)
|
||||||
|
KMP_PREFIX_UNDERSCORE($0):
|
||||||
|
+ _CET_ENDBR
|
||||||
|
.endmacro
|
||||||
|
# else // KMP_OS_DARWIN
|
||||||
|
# define KMP_PREFIX_UNDERSCORE(x) x //no extra underscore for Linux* OS symbols
|
||||||
|
@@ -92,6 +103,7 @@ KMP_PREFIX_UNDERSCORE($0):
|
||||||
|
.globl KMP_PREFIX_UNDERSCORE(\proc)
|
||||||
|
KMP_PREFIX_UNDERSCORE(\proc):
|
||||||
|
.cfi_startproc
|
||||||
|
+ _CET_ENDBR
|
||||||
|
.endm
|
||||||
|
.macro KMP_CFI_DEF_OFFSET sz
|
||||||
|
.cfi_def_cfa_offset \sz
|
||||||
|
--
|
||||||
|
2.47.1
|
||||||
|
|
22
Makefile
22
Makefile
@ -4,22 +4,32 @@
|
|||||||
# Tweak this to centos-stream-9-x86_64 to build for CentOS
|
# Tweak this to centos-stream-9-x86_64 to build for CentOS
|
||||||
MOCK_CHROOT?=fedora-rawhide-x86_64
|
MOCK_CHROOT?=fedora-rawhide-x86_64
|
||||||
MOCK_OPTS?=
|
MOCK_OPTS?=
|
||||||
MOCK_OPTS_RELEASE?=--no-clean --no-cleanup-after $(MOCK_OPTS)
|
MOCK_OPTS_RELEASE?=--no-clean --no-cleanup-after --without lto_build $(MOCK_OPTS)
|
||||||
MOCK_OPTS_SNAPSHOT?=$(MOCK_OPTS_RELEASE) --with snapshot_build $(MOCK_OPTS)
|
MOCK_OPTS_SNAPSHOT?=$(MOCK_OPTS_RELEASE) --with snapshot_build $(MOCK_OPTS)
|
||||||
YYYYMMDD=$(shell date +%Y%m%d)
|
YYYYMMDD?=$(shell date +%Y%m%d)
|
||||||
SOURCEDIR=$(shell pwd)
|
SOURCEDIR=$(shell pwd)
|
||||||
SPEC=llvm.spec
|
SPEC=llvm.spec
|
||||||
# When nothing is given, this will be determined based on
|
# When nothing is given, this will be determined based on release or snapshot
|
||||||
# release or snapshot builds.
|
# builds.
|
||||||
SRPM_PATH?=
|
SRPM_PATH?=
|
||||||
|
# Provide a path to your local llvm-project clone to build a snapshot of that
|
||||||
|
# tree.
|
||||||
|
GIT_TREE?=
|
||||||
|
|
||||||
######### Get sources
|
######### Get sources
|
||||||
|
|
||||||
.PHONY: get-sources-snapshot
|
.PHONY: get-sources-snapshot
|
||||||
## Downloads all sources we need for a snapshot build.
|
## Downloads all sources we need for a snapshot build.
|
||||||
get-sources-snapshot:
|
get-sources-snapshot:
|
||||||
YYYYMMDD=$(YYYYMMDD) ./.copr/snapshot-info.sh > $(SOURCEDIR)/version.spec.inc
|
YYYYMMDD=$(YYYYMMDD) GIT_TREE=$(GIT_TREE) ./.copr/snapshot-info.sh > $(SOURCEDIR)/version.spec.inc
|
||||||
|
ifeq ($(GIT_TREE),)
|
||||||
spectool -g --define "_sourcedir $(SOURCEDIR)" --define "_with_snapshot_build 1" $(SPEC)
|
spectool -g --define "_sourcedir $(SOURCEDIR)" --define "_with_snapshot_build 1" $(SPEC)
|
||||||
|
else
|
||||||
|
$(info Creating tarball from git tree: $(GIT_TREE))
|
||||||
|
$(eval llvm_snapshot_git_revision:=$(shell git -C $(GIT_TREE) rev-parse HEAD))
|
||||||
|
git -C $(GIT_TREE) archive --format=tar.gz -o $(PWD)/$(llvm_snapshot_git_revision).tar.gz --prefix=llvm-project-$(llvm_snapshot_git_revision)/ HEAD
|
||||||
|
endif
|
||||||
|
|
||||||
|
|
||||||
.PHONY: get-sources-release
|
.PHONY: get-sources-release
|
||||||
## Downloads all sources we need for a release build.
|
## Downloads all sources we need for a release build.
|
||||||
@ -89,7 +99,7 @@ edit-last-failing-script: get-last-run-script
|
|||||||
######### Re-run the last failing script from mock
|
######### Re-run the last failing script from mock
|
||||||
|
|
||||||
.PHONY: mockbuild-rerun-last-script
|
.PHONY: mockbuild-rerun-last-script
|
||||||
## Re-runs the last failing or running script of your release/mock mockbuild.
|
## Re-runs the last failing or running script of your release/snapshot mock mockbuild.
|
||||||
mockbuild-rerun-last-script: get-last-run-script
|
mockbuild-rerun-last-script: get-last-run-script
|
||||||
mock --root=$(MOCK_CHROOT) --shell 'sh -e $(last_run_script)'
|
mock --root=$(MOCK_CHROOT) --shell 'sh -e $(last_run_script)'
|
||||||
|
|
||||||
|
24
cstdint.patch
Normal file
24
cstdint.patch
Normal file
@ -0,0 +1,24 @@
|
|||||||
|
diff -ruN llvm-19.1.7-build.orig/llvm-project-19.1.7.src/mlir/include/mlir/Dialect/Affine/IR/ValueBoundsOpInterfaceImpl.h llvm-19.1.7-build/llvm-project-19.1.7.src/mlir/include/mlir/Dialect/Affine/IR/ValueBoundsOpInterfaceImpl.h
|
||||||
|
--- a/mlir/include/mlir/Dialect/Affine/IR/ValueBoundsOpInterfaceImpl.h 2025-01-14 10:41:02.000000000 +0100
|
||||||
|
+++ b/mlir/include/mlir/Dialect/Affine/IR/ValueBoundsOpInterfaceImpl.h 2025-01-17 08:31:49.581864809 +0100
|
||||||
|
@@ -9,6 +9,7 @@
|
||||||
|
#ifndef MLIR_DIALECT_AFFINE_IR_VALUEBOUNDSOPINTERFACEIMPL_H
|
||||||
|
#define MLIR_DIALECT_AFFINE_IR_VALUEBOUNDSOPINTERFACEIMPL_H
|
||||||
|
|
||||||
|
+#include <cstdint>
|
||||||
|
#include "mlir/Support/LLVM.h"
|
||||||
|
|
||||||
|
namespace mlir {
|
||||||
|
diff -ruN llvm-19.1.7-build.orig/llvm-project-19.1.7.src/mlir/include/mlir/Support/LLVM.h llvm-19.1.7-build/llvm-project-19.1.7.src/mlir/include/mlir/Support/LLVM.h
|
||||||
|
--- a/mlir/include/mlir/Support/LLVM.h 2025-01-14 10:41:02.000000000 +0100
|
||||||
|
+++ b/mlir/include/mlir/Support/LLVM.h 2025-01-17 10:20:19.356337873 +0100
|
||||||
|
@@ -18,6 +18,9 @@
|
||||||
|
#ifndef MLIR_SUPPORT_LLVM_H
|
||||||
|
#define MLIR_SUPPORT_LLVM_H
|
||||||
|
|
||||||
|
+
|
||||||
|
+
|
||||||
|
+#include <cstdint>
|
||||||
|
// We include this header because it cannot be practically forward
|
||||||
|
// declared, and are effectively language features.
|
||||||
|
#include "llvm/Support/Casting.h"
|
@ -1,3 +1,5 @@
|
|||||||
|
## LLVM #############################################################
|
||||||
|
|
||||||
# This library has no dependencies.
|
# This library has no dependencies.
|
||||||
addFilter("llvm-libs.x86_64: E: shared-lib-without-dependency-information /usr/lib64/libRemarks.so.[0-9]+")
|
addFilter("llvm-libs.x86_64: E: shared-lib-without-dependency-information /usr/lib64/libRemarks.so.[0-9]+")
|
||||||
addFilter("llvm-googletest.x86_64: W: devel-file-in-non-devel-package")
|
addFilter("llvm-googletest.x86_64: W: devel-file-in-non-devel-package")
|
||||||
@ -16,3 +18,32 @@ addFilter("llvm-googletest.x86_64: W: no-documentation")
|
|||||||
addFilter("llvm-libs.x86_64: W: no-documentation")
|
addFilter("llvm-libs.x86_64: W: no-documentation")
|
||||||
addFilter("llvm-static.x86_64: W: no-documentation")
|
addFilter("llvm-static.x86_64: W: no-documentation")
|
||||||
addFilter("llvm-test.x86_64: W: no-documentation")
|
addFilter("llvm-test.x86_64: W: no-documentation")
|
||||||
|
|
||||||
|
## COMPILER-RT ######################################################
|
||||||
|
|
||||||
|
# This is a devel package
|
||||||
|
addFilter("W: devel-file-in-non-devel-package")
|
||||||
|
|
||||||
|
# These symlinks are dangling on x64_64
|
||||||
|
addFilter("compiler-rt.x86_64: W: dangling-relative-symlink /usr/lib64/clang/[0-9]+.[0-9]+.[0-9]+/")
|
||||||
|
|
||||||
|
addFilter("E: hardcoded-library-path in ../../lib/clang/")
|
||||||
|
|
||||||
|
|
||||||
|
## LIBOMP ###########################################################
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
## CLANG ############################################################
|
||||||
|
|
||||||
|
clang needs libstdc++-devel installed in order to compile c++ programs.
|
||||||
|
|
||||||
|
addFilter("E: devel-dependency libstdc\+\+-devel")
|
||||||
|
|
||||||
|
addFilter("E: explicit-lib-dependency libstdc\+\+-devel")
|
||||||
|
|
||||||
|
# clang installs libear to /usr/lib on all arches, so we have to use
|
||||||
|
|
||||||
|
# a hard-coded /usr/lib path in order to move it to the python3 sitelib.
|
||||||
|
|
||||||
|
addFilter("E: hardcoded-library-path in %{_prefix}/lib/{libear")
|
||||||
|
568
llvm.spec
568
llvm.spec
@ -2,7 +2,7 @@
|
|||||||
#region version
|
#region version
|
||||||
%global maj_ver 19
|
%global maj_ver 19
|
||||||
%global min_ver 1
|
%global min_ver 1
|
||||||
%global patch_ver 5
|
%global patch_ver 7
|
||||||
#global rc_ver 4
|
#global rc_ver 4
|
||||||
|
|
||||||
%bcond_with snapshot_build
|
%bcond_with snapshot_build
|
||||||
@ -41,6 +41,38 @@
|
|||||||
%bcond_without lldb
|
%bcond_without lldb
|
||||||
%endif
|
%endif
|
||||||
|
|
||||||
|
%if %{without compat_build} && 0%{?fedora} >= 41
|
||||||
|
%ifarch %{ix86}
|
||||||
|
%bcond_with mlir
|
||||||
|
%else
|
||||||
|
%bcond_without mlir
|
||||||
|
%endif
|
||||||
|
%else
|
||||||
|
%bcond_with mlir
|
||||||
|
%endif
|
||||||
|
|
||||||
|
# The libcxx build condition also enables libcxxabi and libunwind.
|
||||||
|
# Fedora 41 is the first version that enabled FatLTO for clang-built files.
|
||||||
|
# Without FatLTO, we can't enable ThinLTO and link using GNU LD.
|
||||||
|
%if %{without compat_build} && 0%{?fedora} >= 41
|
||||||
|
%bcond_without libcxx
|
||||||
|
%else
|
||||||
|
%bcond_with libcxx
|
||||||
|
%endif
|
||||||
|
|
||||||
|
# I've called the build condition "build_bolt" to indicate that this does not
|
||||||
|
# necessarily "use" BOLT in order to build LLVM.
|
||||||
|
%if %{without compat_build} && 0%{?fedora} >= 41
|
||||||
|
# BOLT only supports aarch64 and x86_64
|
||||||
|
%ifarch aarch64 x86_64
|
||||||
|
%bcond_without build_bolt
|
||||||
|
%else
|
||||||
|
%bcond_with build_bolt
|
||||||
|
%endif
|
||||||
|
%else
|
||||||
|
%bcond_with build_bolt
|
||||||
|
%endif
|
||||||
|
|
||||||
# Disable LTO on x86 and riscv in order to reduce memory consumption.
|
# Disable LTO on x86 and riscv in order to reduce memory consumption.
|
||||||
%ifarch %ix86 riscv64
|
%ifarch %ix86 riscv64
|
||||||
%bcond_with lto_build
|
%bcond_with lto_build
|
||||||
@ -151,8 +183,7 @@
|
|||||||
# export ASMFLAGS=$CFLAGS
|
# export ASMFLAGS=$CFLAGS
|
||||||
#endregion COMPILER-RT globals
|
#endregion COMPILER-RT globals
|
||||||
|
|
||||||
#region LLD globals
|
#region openmp globals
|
||||||
|
|
||||||
%global pkg_name_libomp libomp%{pkg_suffix}
|
%global pkg_name_libomp libomp%{pkg_suffix}
|
||||||
|
|
||||||
%global so_suffix %{maj_ver}.%{min_ver}
|
%global so_suffix %{maj_ver}.%{min_ver}
|
||||||
@ -166,8 +197,7 @@
|
|||||||
%else
|
%else
|
||||||
%global libomp_arch %{_arch}
|
%global libomp_arch %{_arch}
|
||||||
%endif
|
%endif
|
||||||
|
#endregion openmp globals
|
||||||
#endregion LLD globals
|
|
||||||
|
|
||||||
#region LLD globals
|
#region LLD globals
|
||||||
%global pkg_name_lld lld%{pkg_suffix}
|
%global pkg_name_lld lld%{pkg_suffix}
|
||||||
@ -178,11 +208,25 @@
|
|||||||
#endregion LLDB globals
|
#endregion LLDB globals
|
||||||
#endregion globals
|
#endregion globals
|
||||||
|
|
||||||
|
#region MLIR globals
|
||||||
|
%global pkg_name_mlir mlir%{pkg_suffix}
|
||||||
|
#endregion MLIR globals
|
||||||
|
|
||||||
|
#region libcxx globals
|
||||||
|
%global pkg_name_libcxx libcxx
|
||||||
|
%global pkg_name_libcxxabi libcxxabi
|
||||||
|
%global pkg_name_llvm_libunwind llvm-libunwind
|
||||||
|
#endregion libcxx globals
|
||||||
|
|
||||||
|
#region BOLT globals
|
||||||
|
%global pkg_name_bolt llvm-bolt%{pkg_suffix}
|
||||||
|
#endregion BOLT globals
|
||||||
|
|
||||||
#region packages
|
#region packages
|
||||||
#region main package
|
#region main package
|
||||||
Name: %{pkg_name_llvm}
|
Name: %{pkg_name_llvm}
|
||||||
Version: %{maj_ver}.%{min_ver}.%{patch_ver}%{?rc_ver:~rc%{rc_ver}}%{?llvm_snapshot_version_suffix:~%{llvm_snapshot_version_suffix}}
|
Version: %{maj_ver}.%{min_ver}.%{patch_ver}%{?rc_ver:~rc%{rc_ver}}%{?llvm_snapshot_version_suffix:~%{llvm_snapshot_version_suffix}}
|
||||||
Release: 2%{?dist}
|
Release: 1%{?dist}
|
||||||
Summary: The Low Level Virtual Machine
|
Summary: The Low Level Virtual Machine
|
||||||
|
|
||||||
License: Apache-2.0 WITH LLVM-exception OR NCSA
|
License: Apache-2.0 WITH LLVM-exception OR NCSA
|
||||||
@ -239,6 +283,7 @@ Source1000: version.spec.inc
|
|||||||
#region OpenMP patches
|
#region OpenMP patches
|
||||||
Patch1900: 0001-openmp-Add-option-to-disable-tsan-tests-111548.patch
|
Patch1900: 0001-openmp-Add-option-to-disable-tsan-tests-111548.patch
|
||||||
Patch1901: 0001-openmp-Use-core_siblings_list-if-physical_package_id.patch
|
Patch1901: 0001-openmp-Use-core_siblings_list-if-physical_package_id.patch
|
||||||
|
Patch1910: 0001-openmp-Support-CET-in-z_Linux_asm.S-123213.patch
|
||||||
#endregion OpenMP patches
|
#endregion OpenMP patches
|
||||||
|
|
||||||
#region CLANG patches
|
#region CLANG patches
|
||||||
@ -254,6 +299,22 @@ Patch103: 0001-Workaround-a-bug-in-ORC-on-ppc64le.patch
|
|||||||
# this might no longer be needed.
|
# this might no longer be needed.
|
||||||
Patch104: 0001-Driver-Give-devtoolset-path-precedence-over-Installe.patch
|
Patch104: 0001-Driver-Give-devtoolset-path-precedence-over-Installe.patch
|
||||||
|
|
||||||
|
#region MLIR patches
|
||||||
|
# See https://github.com/llvm/llvm-project/pull/108579
|
||||||
|
Patch1904: 0001-mlir-python-Reuse-the-library-directory.patch
|
||||||
|
# See https://github.com/llvm/llvm-project/pull/108461
|
||||||
|
Patch1905: 0001-CMake-Add-missing-dependency-108461.patch
|
||||||
|
# See https://github.com/llvm/llvm-project/pull/118542
|
||||||
|
Patch1906: 0001-mlir-Specify-deps-via-LLVM_LINK_COMPONENTS.patch
|
||||||
|
# See https://github.com/llvm/llvm-project/pull/120079
|
||||||
|
Patch1907: 0001-CMake-Use-correct-exports-for-MLIR-tools.patch
|
||||||
|
Patch1908: cstdint.patch
|
||||||
|
#endregion MLIR patches
|
||||||
|
|
||||||
|
#region BOLT patches
|
||||||
|
Patch1909: 0001-19-PATCH-Bolt-CMake-Don-t-export-bolt-libraries-in-LLVM.patch
|
||||||
|
#endregion BOLT patches
|
||||||
|
|
||||||
#region LLD patches
|
#region LLD patches
|
||||||
Patch1800: 0001-18-Always-build-shared-libs-for-LLD.patch
|
Patch1800: 0001-18-Always-build-shared-libs-for-LLD.patch
|
||||||
Patch1902: 0001-19-Always-build-shared-libs-for-LLD.patch
|
Patch1902: 0001-19-Always-build-shared-libs-for-LLD.patch
|
||||||
@ -283,6 +344,7 @@ Patch1903: 0001-profile-Use-base-vaddr-for-__llvm_write_binary_ids-n.patch
|
|||||||
%if %{defined gts_version}
|
%if %{defined gts_version}
|
||||||
# Required for 64-bit atomics on i686.
|
# Required for 64-bit atomics on i686.
|
||||||
BuildRequires: gcc-toolset-%{gts_version}-libatomic-devel
|
BuildRequires: gcc-toolset-%{gts_version}-libatomic-devel
|
||||||
|
BuildRequires: gcc-toolset-%{gts_version}-gcc-c++
|
||||||
%endif
|
%endif
|
||||||
BuildRequires: gcc
|
BuildRequires: gcc
|
||||||
BuildRequires: gcc-c++
|
BuildRequires: gcc-c++
|
||||||
@ -363,6 +425,15 @@ BuildRequires: perl(Term::ANSIColor)
|
|||||||
BuildRequires: perl(Text::ParseWords)
|
BuildRequires: perl(Text::ParseWords)
|
||||||
BuildRequires: perl(Sys::Hostname)
|
BuildRequires: perl(Sys::Hostname)
|
||||||
|
|
||||||
|
%if %{with mlir}
|
||||||
|
BuildRequires: python%{python3_pkgversion}-numpy
|
||||||
|
BuildRequires: python%{python3_pkgversion}-pybind11
|
||||||
|
BuildRequires: python%{python3_pkgversion}-pyyaml
|
||||||
|
%if %{maj_ver} >= 20
|
||||||
|
BuildRequires: python%{python3_pkgversion}-nanobind-devel
|
||||||
|
%endif
|
||||||
|
%endif
|
||||||
|
|
||||||
BuildRequires: graphviz
|
BuildRequires: graphviz
|
||||||
|
|
||||||
# This is required because we need "ps" when running LLDB tests
|
# This is required because we need "ps" when running LLDB tests
|
||||||
@ -761,6 +832,140 @@ Obsoletes: python3-lldb < 18.9
|
|||||||
The package contains the LLDB Python module.
|
The package contains the LLDB Python module.
|
||||||
%endif
|
%endif
|
||||||
#endregion LLDB packages
|
#endregion LLDB packages
|
||||||
|
|
||||||
|
#region MLIR packages
|
||||||
|
%if %{with mlir}
|
||||||
|
%package -n %{pkg_name_mlir}
|
||||||
|
Summary: Multi-Level Intermediate Representation Overview
|
||||||
|
License: Apache-2.0 WITH LLVM-exception
|
||||||
|
URL: http://mlir.llvm.org
|
||||||
|
|
||||||
|
%description -n %{pkg_name_mlir}
|
||||||
|
The MLIR project is a novel approach to building reusable and extensible
|
||||||
|
compiler infrastructure. MLIR aims to address software fragmentation,
|
||||||
|
improve compilation for heterogeneous hardware, significantly reduce
|
||||||
|
the cost of building domain specific compilers, and aid in connecting
|
||||||
|
existing compilers together.
|
||||||
|
|
||||||
|
%package -n %{pkg_name_mlir}-static
|
||||||
|
Summary: MLIR static files
|
||||||
|
Requires: %{pkg_name_mlir}%{?_isa} = %{version}-%{release}
|
||||||
|
|
||||||
|
%description -n %{pkg_name_mlir}-static
|
||||||
|
MLIR static files.
|
||||||
|
|
||||||
|
%package -n %{pkg_name_mlir}-devel
|
||||||
|
Summary: MLIR development files
|
||||||
|
Requires: %{pkg_name_mlir}%{?_isa} = %{version}-%{release}
|
||||||
|
Requires: %{pkg_name_mlir}-static%{?_isa} = %{version}-%{release}
|
||||||
|
|
||||||
|
%description -n %{pkg_name_mlir}-devel
|
||||||
|
MLIR development files.
|
||||||
|
|
||||||
|
%package -n python%{python3_pkgversion}-mlir
|
||||||
|
%{?python_provide:%python_provide python%{python3_pkgversion}-mlir}
|
||||||
|
Summary: MLIR python bindings
|
||||||
|
|
||||||
|
Requires: python%{python3_pkgversion}
|
||||||
|
Requires: python%{python3_pkgversion}-numpy
|
||||||
|
|
||||||
|
%description -n python%{python3_pkgversion}-mlir
|
||||||
|
MLIR python bindings.
|
||||||
|
%endif
|
||||||
|
#endregion MLIR packages
|
||||||
|
|
||||||
|
#region libcxx packages
|
||||||
|
%if %{with libcxx}
|
||||||
|
%package -n %{pkg_name_libcxx}
|
||||||
|
Summary: C++ standard library targeting C++11
|
||||||
|
License: Apache-2.0 WITH LLVM-exception OR MIT OR NCSA
|
||||||
|
URL: http://libcxx.llvm.org/
|
||||||
|
|
||||||
|
Requires: %{pkg_name_libcxxabi}%{?_isa} = %{version}-%{release}
|
||||||
|
|
||||||
|
%description -n %{pkg_name_libcxx}
|
||||||
|
libc++ is a new implementation of the C++ standard library, targeting C++11 and above.
|
||||||
|
|
||||||
|
|
||||||
|
%package -n %{pkg_name_libcxx}-devel
|
||||||
|
Summary: Headers and libraries for %{pkg_name_libcxx} devel
|
||||||
|
Requires: %{pkg_name_libcxx}%{?_isa} = %{version}-%{release}
|
||||||
|
Requires: %{pkg_name_libcxxabi}-devel
|
||||||
|
|
||||||
|
%description -n %{pkg_name_libcxx}-devel
|
||||||
|
Headers and libraries for %{pkg_name_libcxx} devel.
|
||||||
|
|
||||||
|
%package -n %{pkg_name_libcxx}-static
|
||||||
|
Summary: Static libraries for %{pkg_name_libcxx}
|
||||||
|
|
||||||
|
%description -n %{pkg_name_libcxx}-static
|
||||||
|
Static libraries for %{pkg_name_libcxx}.
|
||||||
|
|
||||||
|
%package -n %{pkg_name_libcxxabi}
|
||||||
|
Summary: Low level support for a standard C++ library
|
||||||
|
|
||||||
|
%description -n %{pkg_name_libcxxabi}
|
||||||
|
libcxxabi provides low level support for a standard C++ library.
|
||||||
|
|
||||||
|
%package -n %{pkg_name_libcxx}abi-devel
|
||||||
|
Summary: Headers and libraries for %{pkg_name_libcxxabi} devel
|
||||||
|
Requires: %{pkg_name_libcxxabi}%{?_isa} = %{version}-%{release}
|
||||||
|
|
||||||
|
%description -n %{pkg_name_libcxxabi}-devel
|
||||||
|
Headers and libraries for %{pkg_name_libcxxabi} devel.
|
||||||
|
|
||||||
|
%package -n %{pkg_name_libcxxabi}-static
|
||||||
|
Summary: Static libraries for %{pkg_name_libcxxabi}
|
||||||
|
|
||||||
|
%description -n %{pkg_name_libcxxabi}-static
|
||||||
|
Static libraries for %{pkg_name_libcxxabi}.
|
||||||
|
|
||||||
|
%package -n %{pkg_name_llvm_libunwind}
|
||||||
|
Summary: LLVM libunwind
|
||||||
|
|
||||||
|
%description -n %{pkg_name_llvm_libunwind}
|
||||||
|
|
||||||
|
LLVM libunwind is an implementation of the interface defined by the HP libunwind
|
||||||
|
project. It was contributed Apple as a way to enable clang++ to port to
|
||||||
|
platforms that do not have a system unwinder. It is intended to be a small and
|
||||||
|
fast implementation of the ABI, leaving off some features of HP's libunwind
|
||||||
|
that never materialized (e.g. remote unwinding).
|
||||||
|
|
||||||
|
%package -n %{pkg_name_llvm_libunwind}-devel
|
||||||
|
Summary: LLVM libunwind development files
|
||||||
|
Provides: %{pkg_name_llvm_libunwind}(major) = %{maj_ver}
|
||||||
|
Requires: %{pkg_name_llvm_libunwind}%{?_isa} = %{version}-%{release}
|
||||||
|
|
||||||
|
%description -n %{pkg_name_llvm_libunwind}-devel
|
||||||
|
Unversioned shared library for LLVM libunwind
|
||||||
|
|
||||||
|
%package -n %{pkg_name_llvm_libunwind}-static
|
||||||
|
Summary: Static library for LLVM libunwind
|
||||||
|
|
||||||
|
%description -n %{pkg_name_llvm_libunwind}-static
|
||||||
|
Static library for LLVM libunwind.
|
||||||
|
|
||||||
|
%endif
|
||||||
|
#endregion libcxx packages
|
||||||
|
|
||||||
|
#region BOLT packages
|
||||||
|
%if %{with build_bolt}
|
||||||
|
%package -n %{pkg_name_bolt}
|
||||||
|
Summary: A post-link optimizer developed to speed up large applications
|
||||||
|
License: Apache-2.0 WITH LLVM-exception
|
||||||
|
URL: https://github.com/llvm/llvm-project/tree/main/bolt
|
||||||
|
|
||||||
|
# As hinted by bolt documentation
|
||||||
|
Recommends: gperftools-devel
|
||||||
|
|
||||||
|
%description -n %{pkg_name_bolt}
|
||||||
|
|
||||||
|
BOLT is a post-link optimizer developed to speed up large applications.
|
||||||
|
It achieves the improvements by optimizing application's code layout based on
|
||||||
|
execution profile gathered by sampling profiler, such as Linux `perf` tool.
|
||||||
|
%endif
|
||||||
|
#endregion BOLT packages
|
||||||
|
|
||||||
#endregion packages
|
#endregion packages
|
||||||
|
|
||||||
#region prep
|
#region prep
|
||||||
@ -834,6 +1039,12 @@ The package contains the LLDB Python module.
|
|||||||
|
|
||||||
#endregion COMPILER-RT preparation
|
#endregion COMPILER-RT preparation
|
||||||
|
|
||||||
|
#region libcxx preparation
|
||||||
|
%if %{with libcxx}
|
||||||
|
%py3_shebang_fix libcxx/utils/
|
||||||
|
%endif
|
||||||
|
#endregion libcxx preparation
|
||||||
|
|
||||||
#endregion prep
|
#endregion prep
|
||||||
|
|
||||||
#region build
|
#region build
|
||||||
@ -854,10 +1065,44 @@ The package contains the LLDB Python module.
|
|||||||
%endif
|
%endif
|
||||||
|
|
||||||
%global projects clang;clang-tools-extra;lld
|
%global projects clang;clang-tools-extra;lld
|
||||||
|
%global runtimes compiler-rt;openmp;offload
|
||||||
|
|
||||||
%if %{with lldb}
|
%if %{with lldb}
|
||||||
%global projects %{projects};lldb
|
%global projects %{projects};lldb
|
||||||
%endif
|
%endif
|
||||||
|
|
||||||
|
%if %{with mlir}
|
||||||
|
%global projects %{projects};mlir
|
||||||
|
%endif
|
||||||
|
|
||||||
|
%if %{with build_bolt}
|
||||||
|
%global projects %{projects};bolt
|
||||||
|
%endif
|
||||||
|
|
||||||
|
%if %{with libcxx}
|
||||||
|
%global runtimes %{runtimes};libcxx;libcxxabi;libunwind
|
||||||
|
%endif
|
||||||
|
|
||||||
|
%global cfg_file_content --gcc-triple=%{_target_cpu}-redhat-linux
|
||||||
|
|
||||||
|
# We want to use DWARF-5 on all snapshot builds.
|
||||||
|
%if %{without snapshot_build} && %{defined rhel} && 0%{?rhel} < 10
|
||||||
|
%global cfg_file_content %{cfg_file_content} -gdwarf-4 -g0
|
||||||
|
%endif
|
||||||
|
|
||||||
|
%if %{defined gts_version}
|
||||||
|
%global cfg_file_content %{cfg_file_content} --gcc-install-dir=/opt/rh/gcc-toolset-%{gts_version}/root/%{_exec_prefix}/lib/gcc/%{_target_cpu}-redhat-linux/%{gts_version}
|
||||||
|
%endif
|
||||||
|
|
||||||
|
# Already use the new clang config file for the current build. This ensures
|
||||||
|
# consistency between the runtimes and non-runtimes builds and makes sure that
|
||||||
|
# the new configuration will work without going through a rebuild cycle.
|
||||||
|
# Don't do this on RHEL 8, which does not build using clang.
|
||||||
|
%if %{defined gts_version} && 0%{?rhel} != 8
|
||||||
|
echo "%{cfg_file_content}" > /tmp/clang.cfg
|
||||||
|
%global optflags %{optflags} --config /tmp/clang.cfg
|
||||||
|
%endif
|
||||||
|
|
||||||
# Copy CFLAGS into ASMFLAGS, so -fcf-protection is used when compiling assembly files.
|
# Copy CFLAGS into ASMFLAGS, so -fcf-protection is used when compiling assembly files.
|
||||||
export ASMFLAGS="%{build_cflags}"
|
export ASMFLAGS="%{build_cflags}"
|
||||||
|
|
||||||
@ -958,6 +1203,31 @@ popd
|
|||||||
%endif
|
%endif
|
||||||
#endregion lldb options
|
#endregion lldb options
|
||||||
|
|
||||||
|
#region libcxx options
|
||||||
|
%if %{with libcxx}
|
||||||
|
%global cmake_config_args %{cmake_config_args} \\\
|
||||||
|
-DCMAKE_POSITION_INDEPENDENT_CODE=ON \\\
|
||||||
|
-DLIBCXX_INCLUDE_BENCHMARKS=OFF \\\
|
||||||
|
-DLIBCXX_STATICALLY_LINK_ABI_IN_STATIC_LIBRARY=ON \\\
|
||||||
|
-DLIBCXX_ENABLE_ABI_LINKER_SCRIPT=ON \\\
|
||||||
|
-DLIBCXXABI_USE_LLVM_UNWINDER=OFF \\\
|
||||||
|
-DLIBUNWIND_INSTALL_INCLUDE_DIR=%{_includedir}/llvm-libunwind
|
||||||
|
|
||||||
|
# If we don't set the .._INSTALL_LIBRARY_DIR variables,
|
||||||
|
# the *.so files will be placed in a subdirectory that includes the triple
|
||||||
|
%global cmake_config_args %{cmake_config_args} \\\
|
||||||
|
-DLIBCXX_INSTALL_LIBRARY_DIR=%{_libdir} \\\
|
||||||
|
-DLIBCXXABI_INSTALL_LIBRARY_DIR=%{_libdir} \\\
|
||||||
|
-DLIBUNWIND_INSTALL_LIBRARY_DIR=%{_libdir}
|
||||||
|
|
||||||
|
# If we don't adjust this, we will install into this unwanted location:
|
||||||
|
# /usr/include/i686-redhat-linux-gnu/c++/v1/__config_site
|
||||||
|
%global cmake_config_args %{cmake_config_args} \\\
|
||||||
|
-DLIBCXX_INSTALL_INCLUDE_TARGET_DIR=%{_includedir}/c++/v1
|
||||||
|
|
||||||
|
%endif
|
||||||
|
#endregion libcxx options
|
||||||
|
|
||||||
#region llvm options
|
#region llvm options
|
||||||
%global cmake_config_args %{cmake_config_args} \\\
|
%global cmake_config_args %{cmake_config_args} \\\
|
||||||
-DLLVM_APPEND_VC_REV:BOOL=OFF \\\
|
-DLLVM_APPEND_VC_REV:BOOL=OFF \\\
|
||||||
@ -973,13 +1243,12 @@ popd
|
|||||||
-DLLVM_ENABLE_LIBCXX:BOOL=OFF \\\
|
-DLLVM_ENABLE_LIBCXX:BOOL=OFF \\\
|
||||||
-DLLVM_ENABLE_PER_TARGET_RUNTIME_DIR=ON \\\
|
-DLLVM_ENABLE_PER_TARGET_RUNTIME_DIR=ON \\\
|
||||||
-DLLVM_ENABLE_PROJECTS="%{projects}" \\\
|
-DLLVM_ENABLE_PROJECTS="%{projects}" \\\
|
||||||
-DLLVM_ENABLE_RTTI:BOOL=ON \\\
|
-DLLVM_ENABLE_RUNTIMES="%{runtimes}" \\\
|
||||||
-DLLVM_ENABLE_RUNTIMES="compiler-rt;openmp;offload" \\\
|
|
||||||
-DLLVM_ENABLE_ZLIB:BOOL=FORCE_ON \\\
|
-DLLVM_ENABLE_ZLIB:BOOL=FORCE_ON \\\
|
||||||
-DLLVM_ENABLE_ZSTD:BOOL=FORCE_ON \\\
|
-DLLVM_ENABLE_ZSTD:BOOL=FORCE_ON \\\
|
||||||
-DLLVM_EXPERIMENTAL_TARGETS_TO_BUILD=%{experimental_targets_to_build} \\\
|
-DLLVM_EXPERIMENTAL_TARGETS_TO_BUILD=%{experimental_targets_to_build} \\\
|
||||||
-DLLVM_INCLUDE_BENCHMARKS=OFF \\\
|
-DLLVM_INCLUDE_BENCHMARKS=OFF \\\
|
||||||
-DLLVM_INCLUDE_EXAMPLES:BOOL=ON \\\
|
-DLLVM_INCLUDE_EXAMPLES:BOOL=OFF \\\
|
||||||
-DLLVM_INCLUDE_TOOLS:BOOL=ON \\\
|
-DLLVM_INCLUDE_TOOLS:BOOL=ON \\\
|
||||||
-DLLVM_INCLUDE_UTILS:BOOL=ON \\\
|
-DLLVM_INCLUDE_UTILS:BOOL=ON \\\
|
||||||
-DLLVM_INSTALL_TOOLCHAIN_ONLY:BOOL=OFF \\\
|
-DLLVM_INSTALL_TOOLCHAIN_ONLY:BOOL=OFF \\\
|
||||||
@ -991,6 +1260,18 @@ popd
|
|||||||
-DLLVM_UTILS_INSTALL_DIR:PATH=bin
|
-DLLVM_UTILS_INSTALL_DIR:PATH=bin
|
||||||
#endregion llvm options
|
#endregion llvm options
|
||||||
|
|
||||||
|
#region mlir options
|
||||||
|
%if %{with mlir}
|
||||||
|
%global cmake_config_args %{cmake_config_args} \\\
|
||||||
|
-DMLIR_INCLUDE_DOCS:BOOL=ON \\\
|
||||||
|
-DMLIR_INCLUDE_TESTS:BOOL=ON \\\
|
||||||
|
-DMLIR_INCLUDE_INTEGRATION_TESTS:BOOL=OFF \\\
|
||||||
|
-DMLIR_INSTALL_AGGREGATE_OBJECTS=OFF \\\
|
||||||
|
-DMLIR_BUILD_MLIR_C_DYLIB=ON \\\
|
||||||
|
-DMLIR_ENABLE_BINDINGS_PYTHON:BOOL=ON
|
||||||
|
%endif
|
||||||
|
#endregion mlir options
|
||||||
|
|
||||||
#region openmp options
|
#region openmp options
|
||||||
%global cmake_config_args %{cmake_config_args} \\\
|
%global cmake_config_args %{cmake_config_args} \\\
|
||||||
-DOPENMP_INSTALL_LIBDIR=%{unprefixed_libdir} \\\
|
-DOPENMP_INSTALL_LIBDIR=%{unprefixed_libdir} \\\
|
||||||
@ -1404,6 +1685,41 @@ ln -vsf "../../../${liblldb}" %{buildroot}%{python3_sitearch}/lldb/_lldb.so
|
|||||||
%endif
|
%endif
|
||||||
#endregion LLDB installation
|
#endregion LLDB installation
|
||||||
|
|
||||||
|
#region mlir installation
|
||||||
|
%if %{with mlir}
|
||||||
|
mkdir -p %{buildroot}/%{python3_sitearch}
|
||||||
|
mv %{buildroot}%{_prefix}/python_packages/mlir_core/mlir %{buildroot}/%{python3_sitearch}
|
||||||
|
# These directories should be empty now.
|
||||||
|
rmdir %{buildroot}%{_prefix}/python_packages/mlir_core %{buildroot}%{_prefix}/python_packages
|
||||||
|
# Unneeded files.
|
||||||
|
rm -rf %{buildroot}%{_prefix}/src/python
|
||||||
|
%endif
|
||||||
|
#endregion mlir installation
|
||||||
|
|
||||||
|
#region libcxx installation
|
||||||
|
%if %{with libcxx}
|
||||||
|
# We can't install the unversionned path on default location because that would conflict with
|
||||||
|
# https://src.fedoraproject.org/rpms/libunwind
|
||||||
|
#
|
||||||
|
# The versionned path has a different soname (libunwind.so.1 compared to
|
||||||
|
# libunwind.so.8) so they can live together in %%{_libdir}
|
||||||
|
#
|
||||||
|
# ABI wise, even though llvm-libunwind's library is named libunwind, it doesn't
|
||||||
|
# have the exact same ABI as gcc's libunwind (it actually provides a subset).
|
||||||
|
rm %{buildroot}%{_libdir}/libunwind.so
|
||||||
|
mkdir -p %{buildroot}/%{_libdir}/llvm-unwind/
|
||||||
|
|
||||||
|
pushd %{buildroot}/%{_libdir}/llvm-unwind
|
||||||
|
ln -s ../libunwind.so.1.0 libunwind.so
|
||||||
|
popd
|
||||||
|
%endif
|
||||||
|
#endregion libcxx installation
|
||||||
|
|
||||||
|
#region BOLT installation
|
||||||
|
# We don't ship libLLVMBOLT*.a
|
||||||
|
rm -f %{buildroot}%{_libdir}/libLLVMBOLT*.a
|
||||||
|
#endregion BOLT installation
|
||||||
|
|
||||||
%if %{with compat_build}
|
%if %{with compat_build}
|
||||||
# Add version suffix to binaries. Do this at the end so it includes any
|
# Add version suffix to binaries. Do this at the end so it includes any
|
||||||
# additional binaries that may be been added by other steps.
|
# additional binaries that may be been added by other steps.
|
||||||
@ -1495,6 +1811,9 @@ function reset_test_opts()
|
|||||||
# Set for filtering out unit tests.
|
# Set for filtering out unit tests.
|
||||||
# See http://google.github.io/googletest/advanced.html#running-a-subset-of-the-tests
|
# See http://google.github.io/googletest/advanced.html#running-a-subset-of-the-tests
|
||||||
unset GTEST_FILTER
|
unset GTEST_FILTER
|
||||||
|
|
||||||
|
# Some test (e.g. mlir) require this to be set.
|
||||||
|
unset PYTHONPATH
|
||||||
}
|
}
|
||||||
|
|
||||||
# Convert array of test names into a regex.
|
# Convert array of test names into a regex.
|
||||||
@ -1521,6 +1840,21 @@ function test_list_to_regex()
|
|||||||
# Add enclosing parenthesis
|
# Add enclosing parenthesis
|
||||||
echo "($arr)"
|
echo "($arr)"
|
||||||
}
|
}
|
||||||
|
|
||||||
|
# Similar to test_list_to_regex() except that this function exports
|
||||||
|
# the LIT_FILTER_OUT if there are tests in the given list.
|
||||||
|
# If there are no tests, the LIT_FILTER_OUT is unset in order to
|
||||||
|
# avoid issues with the llvm test system.
|
||||||
|
function adjust_lit_filter_out()
|
||||||
|
{
|
||||||
|
local -n arr=$1
|
||||||
|
local res=$(test_list_to_regex test_list_filter_out)
|
||||||
|
if [[ "$res" != "()" ]]; then
|
||||||
|
export LIT_FILTER_OUT=$res
|
||||||
|
else
|
||||||
|
unset LIT_FILTER_OUT
|
||||||
|
fi
|
||||||
|
}
|
||||||
#endregion Helper functions
|
#endregion Helper functions
|
||||||
|
|
||||||
#region Test LLVM lit
|
#region Test LLVM lit
|
||||||
@ -1608,7 +1942,7 @@ test_list_filter_out+=("libomp :: worksharing/for/omp_for_schedule_guided.c")
|
|||||||
%endif
|
%endif
|
||||||
|
|
||||||
%ifarch aarch64 s390x
|
%ifarch aarch64 s390x
|
||||||
# The following test has been failling intermittently on aarch64 and s390x.
|
# The following test has been failing intermittently on aarch64 and s390x.
|
||||||
# Re-enable it after https://github.com/llvm/llvm-project/issues/117773
|
# Re-enable it after https://github.com/llvm/llvm-project/issues/117773
|
||||||
# gets fixed.
|
# gets fixed.
|
||||||
test_list_filter_out+=("libarcher :: races/taskwait-depend.c")
|
test_list_filter_out+=("libarcher :: races/taskwait-depend.c")
|
||||||
@ -1713,7 +2047,7 @@ export LIT_XFAIL="$LIT_XFAIL;offloading/thread_state_1.c"
|
|||||||
export LIT_XFAIL="$LIT_XFAIL;offloading/thread_state_2.c"
|
export LIT_XFAIL="$LIT_XFAIL;offloading/thread_state_2.c"
|
||||||
%endif
|
%endif
|
||||||
|
|
||||||
export LIT_FILTER_OUT=$(test_list_to_regex test_list_filter_out)
|
adjust_lit_filter_out test_list_filter_out
|
||||||
|
|
||||||
%if 0%{?rhel}
|
%if 0%{?rhel}
|
||||||
# libomp tests are often very slow on s390x brew builders
|
# libomp tests are often very slow on s390x brew builders
|
||||||
@ -1746,12 +2080,85 @@ export LIT_FILTER_OUT=$(test_list_to_regex test_list_filter_out)
|
|||||||
%endif
|
%endif
|
||||||
%endif
|
%endif
|
||||||
|
|
||||||
|
#region test libcxx
|
||||||
|
# TODO(kkleine): Fedora rawhide didn't contain check runs. Evaluate if we want them here.
|
||||||
|
#endregion test libcxx
|
||||||
|
|
||||||
|
|
||||||
#region Test LLD
|
#region Test LLD
|
||||||
reset_test_opts
|
reset_test_opts
|
||||||
%cmake_build --target check-lld
|
%cmake_build --target check-lld
|
||||||
#endregion Test LLD
|
#endregion Test LLD
|
||||||
|
|
||||||
|
#region Test MLIR
|
||||||
|
%if %{with mlir}
|
||||||
|
reset_test_opts
|
||||||
|
|
||||||
|
%if %{maj_ver} < 20
|
||||||
|
# The ml_dtypes python module required by mlir/test/python/execution_engine.py
|
||||||
|
# isn't packaged. But in LLVM 20 the execution_engine.py is modified to only
|
||||||
|
# run certain tests if ml_dtypes is present.
|
||||||
|
test_list_filter_out+=("MLIR :: python/execution_engine.py")
|
||||||
|
test_list_filter_out+=("MLIR :: python/multithreaded_tests.py")
|
||||||
|
%endif
|
||||||
|
|
||||||
|
%ifarch s390x
|
||||||
|
# s390x does not support half-float
|
||||||
|
test_list_filter_out+=("MLIR :: python/ir/array_attributes.py")
|
||||||
|
%endif
|
||||||
|
|
||||||
|
adjust_lit_filter_out test_list_filter_out
|
||||||
|
|
||||||
|
export PYTHONPATH=%{buildroot}/%{python3_sitearch}
|
||||||
|
%cmake_build --target check-mlir
|
||||||
|
%endif
|
||||||
|
#endregion Test MLIR
|
||||||
|
|
||||||
|
#region BOLT tests
|
||||||
|
%if %{with build_bolt}
|
||||||
|
%if %{maj_ver} < 20
|
||||||
|
export LIT_XFAIL="$LIT_XFAIL;AArch64/build_id.c"
|
||||||
|
export LIT_XFAIL="$LIT_XFAIL;AArch64/plt-call.test"
|
||||||
|
export LIT_XFAIL="$LIT_XFAIL;X86/linux-static-keys.s"
|
||||||
|
export LIT_XFAIL="$LIT_XFAIL;X86/plt-call.test"
|
||||||
|
%endif
|
||||||
|
|
||||||
|
# Beginning with LLVM 20 this test has the "non-root-user" requirement
|
||||||
|
# and then the test should pass. But now it is flaky, hence we can only
|
||||||
|
# filter it out.
|
||||||
|
test_list_filter_out+=("BOLT :: unreadable-profile.test")
|
||||||
|
|
||||||
|
%ifarch aarch64
|
||||||
|
# Failing test cases on aarch64
|
||||||
|
# TODO(kkleine): The following used to fail on aarch64 but passed today.
|
||||||
|
#export LIT_XFAIL="$LIT_XFAIL;cache+-deprecated.test"
|
||||||
|
#export LIT_XFAIL="$LIT_XFAIL;bolt-icf.test"
|
||||||
|
#export LIT_XFAIL="$LIT_XFAIL;R_ABS.pic.lld.cpp"
|
||||||
|
|
||||||
|
# The following tests require LSE in order to run.
|
||||||
|
# More info at: https://github.com/llvm/llvm-project/issues/86485
|
||||||
|
if ! grep -q atomics /proc/cpuinfo; then
|
||||||
|
test_list_filter_out+=("BOLT :: runtime/AArch64/basic-instrumentation.test")
|
||||||
|
test_list_filter_out+=("BOLT :: runtime/AArch64/hook-fini.test")
|
||||||
|
test_list_filter_out+=("BOLT :: runtime/AArch64/instrumentation-ind-call.c")
|
||||||
|
test_list_filter_out+=("BOLT :: runtime/exceptions-instrumentation.test")
|
||||||
|
test_list_filter_out+=("BOLT :: runtime/instrumentation-indirect-2.c")
|
||||||
|
test_list_filter_out+=("BOLT :: runtime/pie-exceptions-split.test")
|
||||||
|
fi
|
||||||
|
%endif
|
||||||
|
|
||||||
|
%if %{maj_ver} < 20
|
||||||
|
%ifarch x86_64
|
||||||
|
# BOLT-ERROR: instrumentation of static binary currently does not support profile output on binary
|
||||||
|
# finalization, so it requires -instrumentation-sleep-time=N (N>0) usage
|
||||||
|
export LIT_XFAIL="$LIT_XFAIL;X86/internal-call-instrument.s"
|
||||||
|
%endif
|
||||||
|
%endif
|
||||||
|
|
||||||
|
%cmake_build --target check-bolt
|
||||||
|
%endif
|
||||||
|
#endregion BOLT tests
|
||||||
|
|
||||||
%endif
|
%endif
|
||||||
|
|
||||||
%if %{with snapshot_build}
|
%if %{with snapshot_build}
|
||||||
@ -2094,7 +2501,7 @@ fi
|
|||||||
%{install_libdir}/libLTO.so*
|
%{install_libdir}/libLTO.so*
|
||||||
%{install_libdir}/libRemarks.so*
|
%{install_libdir}/libRemarks.so*
|
||||||
%if %{with compat_build}
|
%if %{with compat_build}
|
||||||
%config(noreplace) /etc/ld.so.conf.d/%{name}-%{_arch}.conf
|
%config(noreplace) %{_sysconfdir}/ld.so.conf.d/%{pkg_name_llvm}-%{_arch}.conf
|
||||||
%endif
|
%endif
|
||||||
%if %{with bundle_compat_lib}
|
%if %{with bundle_compat_lib}
|
||||||
%{_libdir}/libLLVM.so.%{compat_maj_ver}*
|
%{_libdir}/libLLVM.so.%{compat_maj_ver}*
|
||||||
@ -2417,6 +2824,9 @@ fi
|
|||||||
# libomptarget is not supported on 32-bit systems.
|
# libomptarget is not supported on 32-bit systems.
|
||||||
# s390x does not support the offloading plugins.
|
# s390x does not support the offloading plugins.
|
||||||
%{install_libdir}/libomptarget.so.%{so_suffix}
|
%{install_libdir}/libomptarget.so.%{so_suffix}
|
||||||
|
%if %{maj_ver} >= 20
|
||||||
|
%{install_libdir}/libLLVMOffload.so.%{so_suffix}
|
||||||
|
%endif
|
||||||
%endif
|
%endif
|
||||||
|
|
||||||
%files -n %{pkg_name_libomp}-devel
|
%files -n %{pkg_name_libomp}-devel
|
||||||
@ -2431,9 +2841,18 @@ fi
|
|||||||
# libomptarget is not supported on 32-bit systems.
|
# libomptarget is not supported on 32-bit systems.
|
||||||
# s390x does not support the offloading plugins.
|
# s390x does not support the offloading plugins.
|
||||||
%{install_libdir}/libomptarget.devicertl.a
|
%{install_libdir}/libomptarget.devicertl.a
|
||||||
|
%if %{maj_ver} >= 20
|
||||||
|
%{install_libdir}/libomptarget-amdgpu*.bc
|
||||||
|
%{install_libdir}/libomptarget-nvptx*.bc
|
||||||
|
%else
|
||||||
%{install_libdir}/libomptarget-amdgpu-*.bc
|
%{install_libdir}/libomptarget-amdgpu-*.bc
|
||||||
%{install_libdir}/libomptarget-nvptx-*.bc
|
%{install_libdir}/libomptarget-nvptx-*.bc
|
||||||
|
%endif
|
||||||
%{install_libdir}/libomptarget.so
|
%{install_libdir}/libomptarget.so
|
||||||
|
%if %{maj_ver} >= 20
|
||||||
|
%{install_libdir}/libLLVMOffload.so
|
||||||
|
%{install_includedir}/offload
|
||||||
|
%endif
|
||||||
%endif
|
%endif
|
||||||
|
|
||||||
#endregion OPENMP files
|
#endregion OPENMP files
|
||||||
@ -2510,10 +2929,135 @@ fi
|
|||||||
%{python3_sitearch}/lldb
|
%{python3_sitearch}/lldb
|
||||||
%endif
|
%endif
|
||||||
#endregion LLDB files
|
#endregion LLDB files
|
||||||
|
|
||||||
|
|
||||||
|
#region MLIR files
|
||||||
|
%if %{with mlir}
|
||||||
|
%files -n %{pkg_name_mlir}
|
||||||
|
%license LICENSE.TXT
|
||||||
|
%{_libdir}/libmlir_arm_runner_utils.so.%{maj_ver}*
|
||||||
|
%{_libdir}/libmlir_arm_sme_abi_stubs.so.%{maj_ver}*
|
||||||
|
%{_libdir}/libmlir_async_runtime.so.%{maj_ver}*
|
||||||
|
%{_libdir}/libmlir_c_runner_utils.so.%{maj_ver}*
|
||||||
|
%{_libdir}/libmlir_float16_utils.so.%{maj_ver}*
|
||||||
|
%{_libdir}/libmlir_runner_utils.so.%{maj_ver}*
|
||||||
|
%{_libdir}/libMLIR*.so.%{maj_ver}*
|
||||||
|
|
||||||
|
%files -n %{pkg_name_mlir}-static
|
||||||
|
%{_libdir}/libMLIR*.a
|
||||||
|
|
||||||
|
%files -n %{pkg_name_mlir}-devel
|
||||||
|
%{_bindir}/mlir-cpu-runner
|
||||||
|
%{_bindir}/mlir-linalg-ods-yaml-gen
|
||||||
|
%{_bindir}/mlir-lsp-server
|
||||||
|
%{_bindir}/mlir-opt
|
||||||
|
%{_bindir}/mlir-pdll
|
||||||
|
%{_bindir}/mlir-pdll-lsp-server
|
||||||
|
%{_bindir}/mlir-query
|
||||||
|
%{_bindir}/mlir-reduce
|
||||||
|
%if %{maj_ver} >= 20
|
||||||
|
%{_bindir}/mlir-rewrite
|
||||||
|
%endif
|
||||||
|
%{_bindir}/mlir-tblgen
|
||||||
|
%{_bindir}/mlir-translate
|
||||||
|
%{_bindir}/tblgen-lsp-server
|
||||||
|
%{_bindir}/tblgen-to-irdl
|
||||||
|
%{_includedir}/mlir
|
||||||
|
%{_includedir}/mlir-c
|
||||||
|
%{_libdir}/cmake/mlir
|
||||||
|
%{_libdir}/libmlir_arm_runner_utils.so
|
||||||
|
%{_libdir}/libmlir_arm_sme_abi_stubs.so
|
||||||
|
%{_libdir}/libmlir_async_runtime.so
|
||||||
|
%{_libdir}/libmlir_c_runner_utils.so
|
||||||
|
%{_libdir}/libmlir_float16_utils.so
|
||||||
|
%{_libdir}/libmlir_runner_utils.so
|
||||||
|
%{_libdir}/libMLIR*.so
|
||||||
|
|
||||||
|
%files -n python%{python3_pkgversion}-%{pkg_name_mlir}
|
||||||
|
%{python3_sitearch}/mlir/
|
||||||
|
%endif
|
||||||
|
#endregion MLIR files
|
||||||
|
|
||||||
|
#region libcxx files
|
||||||
|
%if %{with libcxx}
|
||||||
|
|
||||||
|
%files -n %{pkg_name_libcxx}
|
||||||
|
%license libcxx/LICENSE.TXT
|
||||||
|
%doc libcxx/CREDITS.TXT libcxx/TODO.TXT
|
||||||
|
%{_libdir}/libc++.so.*
|
||||||
|
|
||||||
|
%files -n %{pkg_name_libcxx}-devel
|
||||||
|
%{_includedir}/c++/
|
||||||
|
%exclude %{_includedir}/c++/v1/cxxabi.h
|
||||||
|
%exclude %{_includedir}/c++/v1/__cxxabi_config.h
|
||||||
|
%{_libdir}/libc++.so
|
||||||
|
%{_libdir}/libc++.modules.json
|
||||||
|
%{_datadir}/libc++/v1/*
|
||||||
|
|
||||||
|
%files -n %{pkg_name_libcxx}-static
|
||||||
|
%license libcxx/LICENSE.TXT
|
||||||
|
%{_libdir}/libc++.a
|
||||||
|
%{_libdir}/libc++experimental.a
|
||||||
|
|
||||||
|
%files -n %{pkg_name_libcxxabi}
|
||||||
|
%license libcxxabi/LICENSE.TXT
|
||||||
|
%doc libcxxabi/CREDITS.TXT
|
||||||
|
%{_libdir}/libc++abi.so.*
|
||||||
|
|
||||||
|
%files -n %{pkg_name_libcxxabi}-devel
|
||||||
|
%{_includedir}/c++/v1/cxxabi.h
|
||||||
|
%{_includedir}/c++/v1/__cxxabi_config.h
|
||||||
|
%{_libdir}/libc++abi.so
|
||||||
|
|
||||||
|
%files -n %{pkg_name_libcxxabi}-static
|
||||||
|
%{_libdir}/libc++abi.a
|
||||||
|
|
||||||
|
%files -n %{pkg_name_llvm_libunwind}
|
||||||
|
%license libunwind/LICENSE.TXT
|
||||||
|
%{_libdir}/libunwind.so.1
|
||||||
|
%{_libdir}/libunwind.so.1.0
|
||||||
|
|
||||||
|
%files -n %{pkg_name_llvm_libunwind}-devel
|
||||||
|
%{_includedir}/llvm-libunwind/__libunwind_config.h
|
||||||
|
%{_includedir}/llvm-libunwind/libunwind.h
|
||||||
|
%{_includedir}/llvm-libunwind/libunwind.modulemap
|
||||||
|
%{_includedir}/llvm-libunwind/mach-o/compact_unwind_encoding.h
|
||||||
|
%{_includedir}/llvm-libunwind/unwind.h
|
||||||
|
%{_includedir}/llvm-libunwind/unwind_arm_ehabi.h
|
||||||
|
%{_includedir}/llvm-libunwind/unwind_itanium.h
|
||||||
|
%dir %{_libdir}/llvm-unwind
|
||||||
|
%{_libdir}/llvm-unwind/libunwind.so
|
||||||
|
|
||||||
|
%files -n %{pkg_name_llvm_libunwind}-static
|
||||||
|
%{_libdir}/libunwind.a
|
||||||
|
%endif
|
||||||
|
#endregion libcxx files
|
||||||
|
|
||||||
|
#region BOLT files
|
||||||
|
%if %{with build_bolt}
|
||||||
|
%files -n %{pkg_name_bolt}
|
||||||
|
%license bolt/LICENSE.TXT
|
||||||
|
%{_bindir}/llvm-bolt
|
||||||
|
%if %{maj_ver} >= 20
|
||||||
|
%{_bindir}/llvm-bolt-binary-analysis
|
||||||
|
%endif
|
||||||
|
%{_bindir}/llvm-boltdiff
|
||||||
|
%{_bindir}/llvm-bolt-heatmap
|
||||||
|
%{_bindir}/merge-fdata
|
||||||
|
%{_bindir}/perf2bolt
|
||||||
|
|
||||||
|
%{_libdir}/libbolt_rt_hugify.a
|
||||||
|
%{_libdir}/libbolt_rt_instr.a
|
||||||
|
%endif
|
||||||
|
#endregion BOLT files
|
||||||
|
|
||||||
#endregion files
|
#endregion files
|
||||||
|
|
||||||
#region changelog
|
#region changelog
|
||||||
%changelog
|
%changelog
|
||||||
|
* Thu Jan 23 2025 Konrad Kleine <kkleine@redhat.com> - 19.1.7-1
|
||||||
|
* Update to LLVM 19.1.7 (RHEL-57460)
|
||||||
|
|
||||||
* Mon Dec 09 2024 Konrad Kleine <kkleine@redhat.com> - 19.1.5-2
|
* Mon Dec 09 2024 Konrad Kleine <kkleine@redhat.com> - 19.1.5-2
|
||||||
- Disable libomp tests on s390x RHEL entirely.
|
- Disable libomp tests on s390x RHEL entirely.
|
||||||
|
|
||||||
|
4
sources
4
sources
@ -1,4 +1,4 @@
|
|||||||
SHA512 (llvm-project-19.1.5.src.tar.xz) = 648854e9c91fdcc5c677ce3800e046f2060b998a45cf9f7eebe02898431b3924f9348b6fc366102cd4fdda72dcb8f32076f98aa69927e0e20b3f1007fba10b22
|
SHA512 (llvm-project-19.1.7.src.tar.xz) = c7d63286d662707a9cd54758c9e3aaf52794a91900c484c4a6efa62d90bc719d5e7a345e4192feeb0c9fd11c82570d64677c781e5be1d645556b6aa018e47ec8
|
||||||
SHA512 (llvm-project-19.1.5.src.tar.xz.sig) = a438c86ce882eb1ac3e50842937068794ed162bb1b7ded68a2fe3ec2ab4f57cc38aee667cfb46afe6da22eef7ed1cb65820a473f63bd5a0dc6aad41df7bfad54
|
SHA512 (llvm-project-19.1.7.src.tar.xz.sig) = 195797b06ac80a742e0ccbc03a50dc06dd2e04377d783d5474e3e72c5a75203b60292b047929312a411d22b137a239943fba414a4d136a2be14cbff978eb6bda
|
||||||
SHA512 (llvm-project-18.1.8.src.tar.xz) = 25eeee9984c8b4d0fbc240df90f33cbb000d3b0414baff5c8982beafcc5e59e7ef18f6f85d95b3a5f60cb3d4cd4f877c80487b5768bc21bc833f107698ad93db
|
SHA512 (llvm-project-18.1.8.src.tar.xz) = 25eeee9984c8b4d0fbc240df90f33cbb000d3b0414baff5c8982beafcc5e59e7ef18f6f85d95b3a5f60cb3d4cd4f877c80487b5768bc21bc833f107698ad93db
|
||||||
SHA512 (llvm-project-18.1.8.src.tar.xz.sig) = ddfd1e8a06756759af6cbe488c82a6d6a62ba91f3e8a0eb4cece561321824f5d165b08ed91010588790b76e19790931d2651b24dba8567e3b151d3cb43bec25b
|
SHA512 (llvm-project-18.1.8.src.tar.xz.sig) = ddfd1e8a06756759af6cbe488c82a6d6a62ba91f3e8a0eb4cece561321824f5d165b08ed91010588790b76e19790931d2651b24dba8567e3b151d3cb43bec25b
|
||||||
|
Loading…
Reference in New Issue
Block a user