mirror of
https://src.fedoraproject.org/rpms/llvm.git
synced 2024-11-29 02:38:23 +00:00
Merge branch 'master' into f27
This commit is contained in:
commit
c2e80ad87a
6 changed files with 116 additions and 37 deletions
1
.gitignore
vendored
1
.gitignore
vendored
|
@ -32,3 +32,4 @@
|
|||
/llvm-3.9.1.src.tar.xz
|
||||
/llvm-4.0.0.src.tar.xz
|
||||
/llvm-4.0.1.src.tar.xz
|
||||
/llvm-5.0.0.src.tar.xz
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
From a5f39924a3466eb12d764993aaa8c1c308f92925 Mon Sep 17 00:00:00 2001
|
||||
From 80d3393d3e324dd8bef7de1b9c6db3010585f3e8 Mon Sep 17 00:00:00 2001
|
||||
From: Tom Stellard <tstellar@redhat.com>
|
||||
Date: Sat, 29 Apr 2017 02:03:23 +0000
|
||||
Subject: [PATCH] CMake: Split static library exports into their own export
|
||||
|
@ -31,10 +31,10 @@ Differential Revision: https://reviews.llvm.org/D32668
|
|||
3 files changed, 10 insertions(+), 1 deletion(-)
|
||||
|
||||
diff --git a/cmake/modules/AddLLVM.cmake b/cmake/modules/AddLLVM.cmake
|
||||
index b3c7746..7d9d253 100644
|
||||
index 1c92265..e1ad9b9 100644
|
||||
--- a/cmake/modules/AddLLVM.cmake
|
||||
+++ b/cmake/modules/AddLLVM.cmake
|
||||
@@ -587,7 +587,11 @@ macro(add_llvm_library name)
|
||||
@@ -603,7 +603,11 @@ macro(add_llvm_library name)
|
||||
|
||||
if(${name} IN_LIST LLVM_DISTRIBUTION_COMPONENTS OR
|
||||
NOT LLVM_DISTRIBUTION_COMPONENTS)
|
||||
|
@ -69,10 +69,10 @@ index ac4b0b7..f77c905 100644
|
|||
|
||||
install(FILES
|
||||
diff --git a/cmake/modules/LLVMConfig.cmake.in b/cmake/modules/LLVMConfig.cmake.in
|
||||
index c30c92b..f0f17b2 100644
|
||||
index 7a8eb36..1fa0028 100644
|
||||
--- a/cmake/modules/LLVMConfig.cmake.in
|
||||
+++ b/cmake/modules/LLVMConfig.cmake.in
|
||||
@@ -73,6 +73,8 @@ if(NOT TARGET LLVMSupport)
|
||||
@@ -77,6 +77,8 @@ if(NOT TARGET LLVMSupport)
|
||||
set(LLVM_EXPORTED_TARGETS "@LLVM_CONFIG_EXPORTS@")
|
||||
include("@LLVM_CONFIG_EXPORTS_FILE@")
|
||||
@llvm_config_include_buildtree_only_exports@
|
||||
|
@ -80,7 +80,7 @@ index c30c92b..f0f17b2 100644
|
|||
+ include("@LLVM_CONFIG_STATIC_EXPORTS_FILE@" OPTIONAL)
|
||||
endif()
|
||||
|
||||
include(${LLVM_CMAKE_DIR}/LLVM-Config.cmake)
|
||||
set_property(GLOBAL PROPERTY LLVM_TARGETS_CONFIGURED On)
|
||||
--
|
||||
2.9.3
|
||||
1.8.3.1
|
||||
|
||||
|
|
|
@ -1,8 +1,12 @@
|
|||
From fd80342a58ead0dc7b008ce6ce8523cdea765f5f Mon Sep 17 00:00:00 2001
|
||||
From: Jonas Devlieghere <jonas@devlieghere.com>
|
||||
Date: Wed, 15 Nov 2017 10:57:05 +0000
|
||||
Subject: [PATCH] [DebugInfo] Fix potential CU mismatch for
|
||||
SubprogramScopeDIEs.
|
||||
From d61468959556ddc180c6c28edff476244fd0e8a6 Mon Sep 17 00:00:00 2001
|
||||
From: tstellar <tstellar@91177308-0d34-0410-b5e6-96231b3b80d8>
|
||||
Date: Fri, 17 Nov 2017 18:48:34 +0000
|
||||
Subject: [PATCH] Merging r318289:
|
||||
|
||||
------------------------------------------------------------------------
|
||||
r318289 | jdevlieghere | 2017-11-15 02:57:05 -0800 (Wed, 15 Nov 2017) | 14 lines
|
||||
|
||||
[DebugInfo] Fix potential CU mismatch for SubprogramScopeDIEs.
|
||||
|
||||
In constructAbstractSubprogramScopeDIE there can be a potential mismatch
|
||||
between `this` and the CU of ContextDIE when a scope is shared between
|
||||
|
@ -16,20 +20,21 @@ This fixes PR35212 (https://bugs.llvm.org/show_bug.cgi?id=35212)
|
|||
Patch by Philip Craig!
|
||||
|
||||
Differential revision: https://reviews.llvm.org/D39981
|
||||
------------------------------------------------------------------------
|
||||
|
||||
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@318289 91177308-0d34-0410-b5e6-96231b3b80d8
|
||||
git-svn-id: https://llvm.org/svn/llvm-project/llvm/branches/release_50@318542 91177308-0d34-0410-b5e6-96231b3b80d8
|
||||
---
|
||||
lib/CodeGen/AsmPrinter/DwarfCompileUnit.cpp | 20 ++++++++----
|
||||
lib/CodeGen/AsmPrinter/DwarfDebug.h | 6 +++-
|
||||
lib/CodeGen/AsmPrinter/DwarfDebug.h | 5 ++-
|
||||
test/DebugInfo/cross-cu-scope.ll | 50 +++++++++++++++++++++++++++++
|
||||
3 files changed, 68 insertions(+), 8 deletions(-)
|
||||
3 files changed, 67 insertions(+), 8 deletions(-)
|
||||
create mode 100644 test/DebugInfo/cross-cu-scope.ll
|
||||
|
||||
diff --git a/lib/CodeGen/AsmPrinter/DwarfCompileUnit.cpp b/lib/CodeGen/AsmPrinter/DwarfCompileUnit.cpp
|
||||
index d904372..eea30a7 100644
|
||||
index 676c48f..333d14a 100644
|
||||
--- a/lib/CodeGen/AsmPrinter/DwarfCompileUnit.cpp
|
||||
+++ b/lib/CodeGen/AsmPrinter/DwarfCompileUnit.cpp
|
||||
@@ -616,6 +616,7 @@ void DwarfCompileUnit::constructAbstractSubprogramScopeDIE(
|
||||
@@ -621,6 +621,7 @@ void DwarfCompileUnit::constructAbstractSubprogramScopeDIE(
|
||||
auto *SP = cast<DISubprogram>(Scope->getScopeNode());
|
||||
|
||||
DIE *ContextDIE;
|
||||
|
@ -37,7 +42,7 @@ index d904372..eea30a7 100644
|
|||
|
||||
if (includeMinimalInlineScopes())
|
||||
ContextDIE = &getUnitDie();
|
||||
@@ -626,18 +627,23 @@ void DwarfCompileUnit::constructAbstractSubprogramScopeDIE(
|
||||
@@ -631,18 +632,23 @@ void DwarfCompileUnit::constructAbstractSubprogramScopeDIE(
|
||||
else if (auto *SPDecl = SP->getDeclaration()) {
|
||||
ContextDIE = &getUnitDie();
|
||||
getOrCreateSubprogramDIE(SPDecl);
|
||||
|
@ -69,10 +74,10 @@ index d904372..eea30a7 100644
|
|||
|
||||
DIE *DwarfCompileUnit::constructImportedEntityDIE(
|
||||
diff --git a/lib/CodeGen/AsmPrinter/DwarfDebug.h b/lib/CodeGen/AsmPrinter/DwarfDebug.h
|
||||
index 253e3f0..9ade921 100644
|
||||
index 5dfe06c..78ee9a1 100644
|
||||
--- a/lib/CodeGen/AsmPrinter/DwarfDebug.h
|
||||
+++ b/lib/CodeGen/AsmPrinter/DwarfDebug.h
|
||||
@@ -280,7 +280,7 @@ class DwarfDebug : public DebugHandlerBase {
|
||||
@@ -283,7 +283,7 @@ class DwarfDebug : public DebugHandlerBase {
|
||||
// 0, referencing the comp_dir of all the type units that use it.
|
||||
MCDwarfDwoLineTable SplitTypeUnitFileTable;
|
||||
/// @}
|
||||
|
@ -81,14 +86,13 @@ index 253e3f0..9ade921 100644
|
|||
/// True iff there are multiple CUs in this module.
|
||||
bool SingleCU;
|
||||
bool IsDarwin;
|
||||
@@ -555,6 +555,10 @@ public:
|
||||
/// A helper function to check whether the DIE for a given Scope is
|
||||
/// going to be null.
|
||||
@@ -562,6 +562,9 @@ public:
|
||||
bool isLexicalScopeDIENull(LexicalScope *Scope);
|
||||
|
||||
bool hasDwarfPubSections(bool includeMinimalInlineScopes) const;
|
||||
+
|
||||
+ /// Find the matching DwarfCompileUnit for the given CU DIE.
|
||||
+ DwarfCompileUnit *lookupCU(const DIE *Die) { return CUDieMap.lookup(Die); }
|
||||
+
|
||||
};
|
||||
} // End of namespace llvm
|
||||
|
||||
|
@ -149,5 +153,5 @@ index 0000000..7c71f27
|
|||
+!16 = !DIBasicType(name: "usize", size: 64, encoding: DW_ATE_unsigned)
|
||||
+!17 = !DILocation(line: 1521, scope: !4)
|
||||
--
|
||||
2.9.3
|
||||
1.8.3.1
|
||||
|
|
@ -0,0 +1,61 @@
|
|||
From 2912190aec4a215849a6dea0463f6599425fb7c7 Mon Sep 17 00:00:00 2001
|
||||
From: Tom Stellard <tstellar@redhat.com>
|
||||
Date: Mon, 14 Aug 2017 17:46:14 -0700
|
||||
Subject: [PATCH] Revert "Add a linker script to version LLVM symbols"
|
||||
|
||||
This reverts commit cd789d8cfe12aa374e66eafc748f4fc06e149ca7.
|
||||
|
||||
Conflicts:
|
||||
tools/llvm-shlib/CMakeLists.txt
|
||||
---
|
||||
cmake/modules/AddLLVM.cmake | 3 +--
|
||||
tools/llvm-shlib/CMakeLists.txt | 8 ++------
|
||||
tools/llvm-shlib/simple_version_script.map.in | 1 -
|
||||
3 files changed, 3 insertions(+), 9 deletions(-)
|
||||
delete mode 100644 tools/llvm-shlib/simple_version_script.map.in
|
||||
|
||||
diff --git a/cmake/modules/AddLLVM.cmake b/cmake/modules/AddLLVM.cmake
|
||||
index e1ad9b9..e5ee4ee 100644
|
||||
--- a/cmake/modules/AddLLVM.cmake
|
||||
+++ b/cmake/modules/AddLLVM.cmake
|
||||
@@ -81,9 +81,8 @@ function(add_llvm_symbol_exports target_name export_file)
|
||||
# Gold and BFD ld require a version script rather than a plain list.
|
||||
set(native_export_file "${target_name}.exports")
|
||||
# FIXME: Don't write the "local:" line on OpenBSD.
|
||||
- # in the export file, also add a linker script to version LLVM symbols (form: LLVM_N.M)
|
||||
add_custom_command(OUTPUT ${native_export_file}
|
||||
- COMMAND echo "LLVM_${LLVM_VERSION_MAJOR}.${LLVM_VERSION_MINOR} {" > ${native_export_file}
|
||||
+ COMMAND echo "{" > ${native_export_file}
|
||||
COMMAND grep -q "[[:alnum:]]" ${export_file} && echo " global:" >> ${native_export_file} || :
|
||||
COMMAND sed -e "s/$/;/" -e "s/^/ /" < ${export_file} >> ${native_export_file}
|
||||
COMMAND echo " local: *;" >> ${native_export_file}
|
||||
diff --git a/tools/llvm-shlib/CMakeLists.txt b/tools/llvm-shlib/CMakeLists.txt
|
||||
index 907345a..01a37b5 100644
|
||||
--- a/tools/llvm-shlib/CMakeLists.txt
|
||||
+++ b/tools/llvm-shlib/CMakeLists.txt
|
||||
@@ -37,13 +37,9 @@ endif()
|
||||
add_llvm_library(LLVM SHARED DISABLE_LLVM_LINK_LLVM_DYLIB SONAME ${SOURCES})
|
||||
|
||||
list(REMOVE_DUPLICATES LIB_NAMES)
|
||||
-if(("${CMAKE_SYSTEM_NAME}" STREQUAL "Linux") OR (MINGW) OR (HAIKU) OR ("${CMAKE_SYSTEM_NAME}" STREQUAL "FreeBSD") OR ("${CMAKE_SYSTEM_NAME}" STREQUAL "DragonFly")) # FIXME: It should be "GNU ld for elf"
|
||||
- configure_file(
|
||||
- ${CMAKE_CURRENT_SOURCE_DIR}/simple_version_script.map.in
|
||||
- ${LLVM_LIBRARY_DIR}/tools/llvm-shlib/simple_version_script.map)
|
||||
-
|
||||
+if(("${CMAKE_SYSTEM_NAME}" STREQUAL "Linux") OR (MINGW) OR ("${CMAKE_SYSTEM_NAME}" STREQUAL "FreeBSD") OR ("${CMAKE_SYSTEM_NAME}" STREQUAL "DragonFly")) # FIXME: It should be "GNU ld for elf"
|
||||
# GNU ld doesn't resolve symbols in the version script.
|
||||
- set(LIB_NAMES -Wl,--version-script,${LLVM_LIBRARY_DIR}/tools/llvm-shlib/simple_version_script.map -Wl,--whole-archive ${LIB_NAMES} -Wl,--no-whole-archive)
|
||||
+ set(LIB_NAMES -Wl,--whole-archive ${LIB_NAMES} -Wl,--no-whole-archive)
|
||||
elseif("${CMAKE_SYSTEM_NAME}" STREQUAL "Darwin")
|
||||
set(LIB_NAMES -Wl,-all_load ${LIB_NAMES})
|
||||
endif()
|
||||
diff --git a/tools/llvm-shlib/simple_version_script.map.in b/tools/llvm-shlib/simple_version_script.map.in
|
||||
deleted file mode 100644
|
||||
index e9515fe..0000000
|
||||
--- a/tools/llvm-shlib/simple_version_script.map.in
|
||||
+++ /dev/null
|
||||
@@ -1 +0,0 @@
|
||||
-LLVM_@LLVM_VERSION_MAJOR@.@LLVM_VERSION_MINOR@ { global: *; };
|
||||
--
|
||||
1.8.3.1
|
||||
|
36
llvm.spec
36
llvm.spec
|
@ -6,10 +6,13 @@
|
|||
%endif
|
||||
|
||||
%global llvm_bindir %{_libdir}/%{name}
|
||||
%global maj_ver 5
|
||||
%global min_ver 0
|
||||
%global patch_ver 0
|
||||
|
||||
Name: llvm
|
||||
Version: 4.0.1
|
||||
Release: 7%{?dist}
|
||||
Version: %{maj_ver}.%{min_ver}.%{patch_ver}
|
||||
Release: 5%{?dist}
|
||||
Summary: The Low Level Virtual Machine
|
||||
|
||||
License: NCSA
|
||||
|
@ -18,12 +21,11 @@ Source0: http://llvm.org/releases/%{version}/%{name}-%{version}.src.tar.xz
|
|||
|
||||
# recognize s390 as SystemZ when configuring build
|
||||
Patch0: llvm-3.7.1-cmake-s390.patch
|
||||
Patch2: rust-lang-llvm-pr67.patch
|
||||
Patch3: 0001-CMake-Split-static-library-exports-into-their-own-ex.patch
|
||||
Patch4: 0001-Revert-Revert-CMake-Move-sphinx-detection-into-AddSp.patch
|
||||
Patch5: 0001-CMake-Fix-docs-llvm-man-target-when-clang-llvm-is-in.patch
|
||||
Patch6: 0001-CMake-Add-LLVM_UTILS_INSTALL_DIR-option.patch
|
||||
Patch7: 0001-DebugInfo-Fix-potential-CU-mismatch-for-SubprogramSc.patch
|
||||
# FIXME: Symbol versioning breaks some unittests when statically linking
|
||||
# libstdc++, so we disable it for now.
|
||||
Patch4: 0001-Revert-Add-a-linker-script-to-version-LLVM-symbols.patch
|
||||
Patch5: 0001-Merging-r318289.patch
|
||||
|
||||
BuildRequires: cmake
|
||||
BuildRequires: zlib-devel
|
||||
|
@ -96,7 +98,7 @@ for f in `grep -Rl 'XFAIL.\+arm' test/ExecutionEngine `; do rm $f; done
|
|||
mkdir -p _build
|
||||
cd _build
|
||||
|
||||
%ifarch s390
|
||||
%ifarch s390 %{arm}
|
||||
# Decrease debuginfo verbosity to reduce memory consumption during final library linking
|
||||
%global optflags %(echo %{optflags} | sed 's/-g /-g1 /')
|
||||
%endif
|
||||
|
@ -106,7 +108,7 @@ cd _build
|
|||
-DBUILD_SHARED_LIBS:BOOL=OFF \
|
||||
-DCMAKE_BUILD_TYPE=RelWithDebInfo \
|
||||
-DCMAKE_SHARED_LINKER_FLAGS="-Wl,-Bsymbolic -static-libstdc++" \
|
||||
%ifarch s390
|
||||
%ifarch s390 %{arm}
|
||||
-DCMAKE_C_FLAGS_RELWITHDEBINFO="%{optflags} -DNDEBUG" \
|
||||
-DCMAKE_CXX_FLAGS_RELWITHDEBINFO="%{optflags} -DNDEBUG" \
|
||||
%endif
|
||||
|
@ -186,6 +188,7 @@ fi
|
|||
%{_mandir}/man1/*.1.*
|
||||
%exclude %{_bindir}/llvm-config-%{__isa_bits}
|
||||
%exclude %{_mandir}/man1/llvm-config.1.*
|
||||
%{_datadir}/opt-viewer
|
||||
|
||||
%files libs
|
||||
%{_libdir}/BugpointPasses.so
|
||||
|
@ -193,7 +196,7 @@ fi
|
|||
%if %{with gold}
|
||||
%{_libdir}/LLVMgold.so
|
||||
%endif
|
||||
%{_libdir}/libLLVM-4.0*.so
|
||||
%{_libdir}/libLLVM-%{maj_ver}.%{min_ver}*.so
|
||||
%{_libdir}/libLTO.so*
|
||||
|
||||
%files devel
|
||||
|
@ -213,8 +216,17 @@ fi
|
|||
%{_libdir}/cmake/llvm/LLVMStaticExports.cmake
|
||||
|
||||
%changelog
|
||||
* Tue Nov 21 2017 Tom Stellard <tstellar@redhat.com> - 4.0.1-7
|
||||
- Backport r318289 to fix a debuginfo issue with rust.
|
||||
* Mon Nov 20 2017 Tom Stellard <tstellar@redhat.com> - 5.0.0-5
|
||||
- Backport debuginfo fix for rust
|
||||
|
||||
* Fri Nov 03 2017 Tom Stellard <tstellar@redhat.com> - 5.0.0-4
|
||||
- Reduce debuginfo size for ARM
|
||||
|
||||
* Tue Oct 10 2017 Tom Stellard <tstellar@redhat.com> - 5.0.0-2
|
||||
- Reduce memory usage on ARM by disabling debuginfo and some non-ARM targets.
|
||||
|
||||
* Mon Sep 25 2017 Tom Stellard <tstellar@redhat.com> - 5.0.0-1
|
||||
- 5.0.0 Release
|
||||
|
||||
* Mon Sep 18 2017 Tom Stellard <tstellar@redhat.com> - 4.0.1-6
|
||||
- Add Requires: libedit-devel for llvm-devel
|
||||
|
|
1
sources
1
sources
|
@ -1,2 +1,3 @@
|
|||
SHA512 (llvm-4.0.0.src.tar.xz) = cf681f0626ef6d568d951cdc3e143471a1d7715a0ba11e52aa273cf5d8d421e1357ef2645cc85879eaefcd577e99e74d07b01566825b3d0461171ef2cbfc7704
|
||||
SHA512 (llvm-4.0.1.src.tar.xz) = 16adc39b34ddb628f81b171119a8e2a0e9138b25011e803ef0b688e2fbea116fc4953d3a1b61b90a98a75e33619f81566b7cb06a9a2ea4d04ac5e0eb303a2d1d
|
||||
SHA512 (llvm-5.0.0.src.tar.xz) = e6d8fdcb5bf27bded814d02f39f69c6171bc3a512d5957c03e5ac2e231f903b7de87634b059bd5c5da670f7c3a8f7a538f6299225799f15f921857f1452f6b3a
|
||||
|
|
Loading…
Reference in a new issue