Revert "Apply cmake export patch"

This reverts commit ef72749089.
This commit is contained in:
serge-sans-paille 2020-11-12 17:35:14 +00:00
parent ef72749089
commit 8c4ee42420
3 changed files with 3 additions and 109 deletions

View File

@ -1,48 +0,0 @@
diff -Naur a/llvm/cmake/modules/AddLLVM.cmake b/llvm/cmake/modules/AddLLVM.cmake
--- a/llvm/cmake/modules/AddLLVM.cmake 2020-08-20 16:24:59.000000000 +0000
+++ b/llvm/cmake/modules/AddLLVM.cmake 2020-09-15 07:09:05.411311520 +0000
@@ -760,7 +760,11 @@
if(${name} IN_LIST LLVM_DISTRIBUTION_COMPONENTS OR
(in_llvm_libs AND "llvm-libraries" IN_LIST LLVM_DISTRIBUTION_COMPONENTS) OR
NOT LLVM_DISTRIBUTION_COMPONENTS)
- set(export_to_llvmexports EXPORT LLVMExports)
+ if (ARG_SHARED)
+ set(export_to_llvmexports EXPORT LLVMExports)
+ else()
+ set(export_to_llvmexports EXPORT LLVMStaticExports)
+ endif()
set_property(GLOBAL PROPERTY LLVM_HAS_EXPORTS True)
endif()
diff -Naur a/llvm/cmake/modules/CMakeLists.txt b/llvm/cmake/modules/CMakeLists.txt
--- a/llvm/cmake/modules/CMakeLists.txt 2020-08-20 16:24:59.000000000 +0000
+++ b/llvm/cmake/modules/CMakeLists.txt 2020-09-15 07:09:05.411311520 +0000
@@ -79,6 +79,7 @@
# source files are put in the same cmake directory.
set(LLVM_CONFIG_EXPORTS_FILE "${LLVM_EXPORTS_FILE}")
set(LLVM_CONFIG_EXPORTS "${LLVM_EXPORTS};${LLVM_EXPORTS_BUILDTREE_ONLY}")
+set(LLVM_CONFIG_STATIC_EXPORTS_FILE "\${LLVM_CMAKE_DIR}/LLVMStaticExports.cmake")
set(llvm_config_include_buildtree_only_exports
"include(\"${LLVM_BUILDTREEONLY_EXPORTS_FILE}\")")
configure_file(
@@ -139,6 +140,8 @@
if(llvm_has_exports)
install(EXPORT LLVMExports DESTINATION ${LLVM_INSTALL_PACKAGE_DIR}
COMPONENT cmake-exports)
+ install(EXPORT LLVMStaticExports DESTINATION ${LLVM_INSTALL_PACKAGE_DIR}
+ COMPONENT cmake-exports)
endif()
install(FILES
diff -Naur a/llvm/cmake/modules/LLVMConfig.cmake.in b/llvm/cmake/modules/LLVMConfig.cmake.in
--- a/llvm/cmake/modules/LLVMConfig.cmake.in 2020-08-20 16:24:59.000000000 +0000
+++ b/llvm/cmake/modules/LLVMConfig.cmake.in 2020-09-15 07:09:05.411311520 +0000
@@ -103,6 +103,8 @@
set(LLVM_EXPORTED_TARGETS "@LLVM_CONFIG_EXPORTS@")
include("@LLVM_CONFIG_EXPORTS_FILE@")
@llvm_config_include_buildtree_only_exports@
+
+ include("@LLVM_CONFIG_STATIC_EXPORTS_FILE@" OPTIONAL)
endif()
# By creating intrinsics_gen, omp_gen and acc_gen here, subprojects that depend

View File

@ -1,48 +0,0 @@
diff -Naur a/llvm/cmake/modules/AddLLVM.cmake b/llvm/cmake/modules/AddLLVM.cmake
--- a/llvm/cmake/modules/AddLLVM.cmake 2020-09-15 09:12:47.596424499 +0000
+++ b/llvm/cmake/modules/AddLLVM.cmake 2020-09-15 13:36:03.509429423 +0000
@@ -1235,7 +1235,12 @@
set(export_to_llvmexports)
if (${name} IN_LIST LLVM_DISTRIBUTION_COMPONENTS OR
NOT LLVM_DISTRIBUTION_COMPONENTS)
- set(export_to_llvmexports EXPORT LLVMExports)
+ if (${name} STREQUAL "not" OR ${name} STREQUAL "count" OR
+ ${name} STREQUAL "yaml-bench" OR ${name} STREQUAL "lli-child-target")
+ set(export_to_llvmexports EXPORT LLVMTestExports)
+ else()
+ set(export_to_llvmexports EXPORT LLVMExports)
+ endif()
set_property(GLOBAL PROPERTY LLVM_HAS_EXPORTS True)
endif()
diff -Naur a/llvm/cmake/modules/CMakeLists.txt b/llvm/cmake/modules/CMakeLists.txt
--- a/llvm/cmake/modules/CMakeLists.txt 2020-09-15 09:12:47.596424499 +0000
+++ b/llvm/cmake/modules/CMakeLists.txt 2020-09-15 09:14:33.110044977 +0000
@@ -80,6 +80,7 @@
set(LLVM_CONFIG_EXPORTS_FILE "${LLVM_EXPORTS_FILE}")
set(LLVM_CONFIG_EXPORTS "${LLVM_EXPORTS};${LLVM_EXPORTS_BUILDTREE_ONLY}")
set(LLVM_CONFIG_STATIC_EXPORTS_FILE "\${LLVM_CMAKE_DIR}/LLVMStaticExports.cmake")
+set(LLVM_CONFIG_TEST_EXPORTS_FILE "\${LLVM_CMAKE_DIR}/LLVMTestExports.cmake")
set(llvm_config_include_buildtree_only_exports
"include(\"${LLVM_BUILDTREEONLY_EXPORTS_FILE}\")")
configure_file(
@@ -142,6 +143,8 @@
COMPONENT cmake-exports)
install(EXPORT LLVMStaticExports DESTINATION ${LLVM_INSTALL_PACKAGE_DIR}
COMPONENT cmake-exports)
+ install(EXPORT LLVMTestExports DESTINATION ${LLVM_INSTALL_PACKAGE_DIR}
+ COMPONENT cmake-exports)
endif()
install(FILES
diff -Naur a/llvm/cmake/modules/LLVMConfig.cmake.in b/llvm/cmake/modules/LLVMConfig.cmake.in
--- a/llvm/cmake/modules/LLVMConfig.cmake.in 2020-09-15 09:12:47.597424505 +0000
+++ b/llvm/cmake/modules/LLVMConfig.cmake.in 2020-09-15 09:14:54.261169357 +0000
@@ -105,6 +105,7 @@
@llvm_config_include_buildtree_only_exports@
include("@LLVM_CONFIG_STATIC_EXPORTS_FILE@" OPTIONAL)
+ include("@LLVM_CONFIG_TEST_EXPORTS_FILE@" OPTIONAL)
endif()
# By creating intrinsics_gen, omp_gen and acc_gen here, subprojects that depend

View File

@ -11,7 +11,7 @@
%global llvm_libdir %{_libdir}/%{name} %global llvm_libdir %{_libdir}/%{name}
%global build_llvm_libdir %{buildroot}%{llvm_libdir} %global build_llvm_libdir %{buildroot}%{llvm_libdir}
#%%global rc_ver 6 #%%global rc_ver 6
%global baserelease 3 %global baserelease 2
%global llvm_srcdir llvm-%{version}%{?rc_ver:rc%{rc_ver}}.src %global llvm_srcdir llvm-%{version}%{?rc_ver:rc%{rc_ver}}.src
%global maj_ver 11 %global maj_ver 11
%global min_ver 0 %global min_ver 0
@ -57,10 +57,6 @@ Patch1: 0001-SystemZ-Use-LA-instead-of-AGR-in-eliminateFrameIndex.patch
Patch2: 0001-gcc11.patch Patch2: 0001-gcc11.patch
Patch101: 0001-CMake-Split-static-library-exports-into-their-own-ex.patch
Patch102: 0001-CMake-Split-test-binary-exports-into-their-own-expor.patch
BuildRequires: gcc BuildRequires: gcc
BuildRequires: gcc-c++ BuildRequires: gcc-c++
BuildRequires: cmake BuildRequires: cmake
@ -216,7 +212,7 @@ pathfix.py -i %{__python3} -pn \
%endif %endif
%endif %endif
\ \
-DLLVM_TARGETS_TO_BUILD="X86;AMDGPU;PowerPC;NVPTX;SystemZ;AArch64;ARM;Mips;BPF" \ -DLLVM_TARGETS_TO_BUILD=all \
-DLLVM_ENABLE_LIBCXX:BOOL=OFF \ -DLLVM_ENABLE_LIBCXX:BOOL=OFF \
-DLLVM_ENABLE_ZLIB:BOOL=ON \ -DLLVM_ENABLE_ZLIB:BOOL=ON \
-DLLVM_ENABLE_FFI:BOOL=ON \ -DLLVM_ENABLE_FFI:BOOL=ON \
@ -224,6 +220,7 @@ pathfix.py -i %{__python3} -pn \
%if %{with gold} %if %{with gold}
-DLLVM_BINUTILS_INCDIR=%{_includedir} \ -DLLVM_BINUTILS_INCDIR=%{_includedir} \
%endif %endif
-DLLVM_EXPERIMENTAL_TARGETS_TO_BUILD=AVR \
\ \
-DLLVM_BUILD_RUNTIME:BOOL=ON \ -DLLVM_BUILD_RUNTIME:BOOL=ON \
\ \
@ -484,8 +481,6 @@ fi
%{_includedir}/llvm-c %{_includedir}/llvm-c
%{_libdir}/libLLVM.so %{_libdir}/libLLVM.so
%{_libdir}/cmake/llvm %{_libdir}/cmake/llvm
%exclude %{_libdir}/cmake/llvm/LLVMStaticExports.cmake
%exclude %{_libdir}/cmake/llvm/LLVMTestExports.cmake
%else %else
%{_bindir}/llvm-config%{exec_suffix}-%{__isa_bits} %{_bindir}/llvm-config%{exec_suffix}-%{__isa_bits}
%{pkg_bindir}/llvm-config %{pkg_bindir}/llvm-config
@ -508,7 +503,6 @@ fi
%if %{without compat_build} %if %{without compat_build}
%{_libdir}/*.a %{_libdir}/*.a
%exclude %{_libdir}/libLLVMTestingSupport.a %exclude %{_libdir}/libLLVMTestingSupport.a
%{_libdir}/cmake/llvm/LLVMStaticExports.cmake
%else %else
%{_libdir}/%{name}/lib/*.a %{_libdir}/%{name}/lib/*.a
%endif %endif
@ -533,7 +527,6 @@ fi
%{_bindir}/llvm-opt-fuzzer %{_bindir}/llvm-opt-fuzzer
%{_libdir}/BugpointPasses.so %{_libdir}/BugpointPasses.so
%{_libdir}/LLVMHello.so %{_libdir}/LLVMHello.so
%{_libdir}/cmake/llvm/LLVMTestExports.cmake
%files googletest %files googletest
%license LICENSE.TXT %license LICENSE.TXT
@ -543,9 +536,6 @@ fi
%endif %endif
%changelog %changelog
* Thu Nov 12 2020 sguelton@redhat.com - 11.0.0-3
- Apply cmake export patch
* Sat Oct 31 2020 Jeff Law <law@redhat.com> - 11.0.0-2 * Sat Oct 31 2020 Jeff Law <law@redhat.com> - 11.0.0-2
- Fix missing #include for gcc-11 - Fix missing #include for gcc-11