* Build lld

- d/p/lld-arg-cmake-issue.diff fixes upstream bug #27685
This commit is contained in:
Sylvestre Ledru 2017-01-06 16:19:45 +00:00
parent 88b20e4463
commit 5c2afe5871
5 changed files with 196 additions and 47 deletions

7
debian/changelog vendored
View File

@ -1,3 +1,10 @@
llvm-toolchain-snapshot (1:4.0~svn291233-1~exp1) experimental; urgency=medium
* Build lld
- d/p/lld-arg-cmake-issue.diff fixes upstream bug #27685
-- Sylvestre Ledru <sylvestre@debian.org> Fri, 06 Jan 2017 14:10:39 +0100
llvm-toolchain-snapshot (1:4.0~svn290810-1) unstable; urgency=medium
* New snapshot release

92
debian/control vendored
View File

@ -394,56 +394,56 @@ Description: Modular compiler and toolchain technologies, examples
# ------------- lld -------------
# Package: lld-4.0
# Architecture: amd64 armel armhf i386 kfreebsd-amd64 kfreebsd-i386 s390 sparc alpha hppa m68k powerpcspe ppc64 sh4 sparc64 x32 mips mipsel
# # ia64 mips mipsel hurd powerpc ppc64el have been removed
# Depends: ${shlibs:Depends}, ${misc:Depends}, libllvm4.0 (= ${binary:Version}), llvm-4.0-dev
# Pre-Depends: ${misc:Pre-Depends}
# Description: LLVM-based linker
# LLD is a new, high-performance linker. It is built as a set of reusable
# components which highly leverage existing libraries in the larger LLVM
# Project.
Package: lld-4.0
Architecture: amd64 armel armhf i386 kfreebsd-amd64 kfreebsd-i386 s390 sparc alpha hppa m68k powerpcspe ppc64 sh4 sparc64 x32 mips mipsel
# ia64 mips mipsel hurd powerpc ppc64el have been removed
Depends: ${shlibs:Depends}, ${misc:Depends}, libllvm4.0 (= ${binary:Version}), llvm-4.0-dev
Pre-Depends: ${misc:Pre-Depends}
Description: LLVM-based linker
LLD is a new, high-performance linker. It is built as a set of reusable
components which highly leverage existing libraries in the larger LLVM
Project.
# Package: liblld-4.0
# Architecture: amd64 armel armhf i386 kfreebsd-amd64 kfreebsd-i386 s390 sparc alpha hppa m68k powerpcspe ppc64 sh4 sparc64 x32 mips mipsel
# # ia64 mips mipsel hurd powerpc ppc64el have been removed
# Depends: ${shlibs:Depends}, ${misc:Depends}, libllvm4.0 (= ${binary:Version})
# Pre-Depends: ${misc:Pre-Depends}
# Section: libs
# Description: LLVM-based linker, library
# LLD is a new, high-performance linker. It is built as a set of reusable
# components which highly leverage existing libraries in the larger LLVM
# Project.
# .
# This package contains the LLD runtime library.
Package: liblld-4.0
Architecture: amd64 armel armhf i386 kfreebsd-amd64 kfreebsd-i386 s390 sparc alpha hppa m68k powerpcspe ppc64 sh4 sparc64 x32 mips mipsel
# ia64 mips mipsel hurd powerpc ppc64el have been removed
Depends: ${shlibs:Depends}, ${misc:Depends}, libllvm4.0 (= ${binary:Version})
Pre-Depends: ${misc:Pre-Depends}
Section: libs
Description: LLVM-based linker, library
LLD is a new, high-performance linker. It is built as a set of reusable
components which highly leverage existing libraries in the larger LLVM
Project.
.
This package contains the LLD runtime library.
# Package: liblld-4.0-dbg
# Architecture: amd64 armel armhf i386 kfreebsd-amd64 kfreebsd-i386 s390 sparc hppa m68k powerpcspe ppc64 sh4 sparc64 x32 mips mipsel
# # ia64 mips mipsel hurd ppc64el alpha s390x powerpc have been removed
# Depends: ${shlibs:Depends}, ${misc:Depends}, liblld-4.0 (= ${binary:Version})
# Pre-Depends: ${misc:Pre-Depends}
# Section: debug
# Priority: extra
# Description: LLVM-based linker, debugging libraries
# LLD is a new, high-performance linker. It is built as a set of reusable
# components which highly leverage existing libraries in the larger LLVM
# Project.
# .
# This package contains the LLD runtime library debug symbols.
Package: liblld-4.0-dbg
Architecture: amd64 armel armhf i386 kfreebsd-amd64 kfreebsd-i386 s390 sparc hppa m68k powerpcspe ppc64 sh4 sparc64 x32 mips mipsel
# ia64 mips mipsel hurd ppc64el alpha s390x powerpc have been removed
Depends: ${shlibs:Depends}, ${misc:Depends}, liblld-4.0 (= ${binary:Version})
Pre-Depends: ${misc:Pre-Depends}
Section: debug
Priority: extra
Description: LLVM-based linker, debugging libraries
LLD is a new, high-performance linker. It is built as a set of reusable
components which highly leverage existing libraries in the larger LLVM
Project.
.
This package contains the LLD runtime library debug symbols.
# Package: liblld-4.0-dev
# Section: libdevel
# Architecture: amd64 armel armhf i386 kfreebsd-amd64 kfreebsd-i386 s390 sparc alpha hppa m68k powerpcspe ppc64 sh4 sparc64 x32 mips mipsel
# # ia64 mips mipsel hurd powerpc ppc64el have been removed
# Depends: ${shlibs:Depends}, ${misc:Depends}, lld-4.0 (= ${binary:Version})
# Pre-Depends: ${misc:Pre-Depends}
# Description: LLVM-based linker, header files
# LLD is a new, high-performance linker. It is built as a set of reusable
# components which highly leverage existing libraries in the larger LLVM
# Project.
# .
# This package provides the header files to build extension over lld.
Package: liblld-4.0-dev
Section: libdevel
Architecture: amd64 armel armhf i386 kfreebsd-amd64 kfreebsd-i386 s390 sparc alpha hppa m68k powerpcspe ppc64 sh4 sparc64 x32 mips mipsel
# ia64 mips mipsel hurd powerpc ppc64el have been removed
Depends: ${shlibs:Depends}, ${misc:Depends}, lld-4.0 (= ${binary:Version})
Pre-Depends: ${misc:Pre-Depends}
Description: LLVM-based linker, header files
LLD is a new, high-performance linker. It is built as a set of reusable
components which highly leverage existing libraries in the larger LLVM
Project.
.
This package provides the header files to build extension over lld.
# ------------- lldb -------------

141
debian/patches/lld-arg-cmake-issue.diff vendored Normal file
View File

@ -0,0 +1,141 @@
Index: llvm-toolchain-snapshot_4.0~svn290969/lld/cmake/modules/AddLLD.cmake
===================================================================
--- llvm-toolchain-snapshot_4.0~svn290969.orig/lld/cmake/modules/AddLLD.cmake
+++ llvm-toolchain-snapshot_4.0~svn290969/lld/cmake/modules/AddLLD.cmake
@@ -1,5 +1,5 @@
macro(add_lld_library name)
- add_llvm_library(${name} ${ARGN})
+ llvm_add_library(${name} ${ARGN})
set_target_properties(${name} PROPERTIES FOLDER "lld libraries")
endmacro(add_lld_library)
Index: llvm-toolchain-snapshot_4.0~svn290969/lld/lib/Config/CMakeLists.txt
===================================================================
--- llvm-toolchain-snapshot_4.0~svn290969.orig/lld/lib/Config/CMakeLists.txt
+++ llvm-toolchain-snapshot_4.0~svn290969/lld/lib/Config/CMakeLists.txt
@@ -4,6 +4,6 @@
ADDITIONAL_HEADER_DIRS
${LLD_INCLUDE_DIR}/lld/Config
- LINK_LIBS
- LLVMSupport
+ LINK_COMPONENTS
+ Support
)
Index: llvm-toolchain-snapshot_4.0~svn290969/lld/lib/Core/CMakeLists.txt
===================================================================
--- llvm-toolchain-snapshot_4.0~svn290969.orig/lld/lib/Core/CMakeLists.txt
+++ llvm-toolchain-snapshot_4.0~svn290969/lld/lib/Core/CMakeLists.txt
@@ -12,6 +12,6 @@
ADDITIONAL_HEADER_DIRS
${LLD_INCLUDE_DIR}/lld/Core
- LINK_LIBS
- LLVMSupport
+ LINK_COMPONENTS
+ Support
)
Index: llvm-toolchain-snapshot_4.0~svn290969/lld/lib/Driver/CMakeLists.txt
===================================================================
--- llvm-toolchain-snapshot_4.0~svn290969.orig/lld/lib/Driver/CMakeLists.txt
+++ llvm-toolchain-snapshot_4.0~svn290969/lld/lib/Driver/CMakeLists.txt
@@ -8,15 +8,17 @@
ADDITIONAL_HEADER_DIRS
${LLD_INCLUDE_DIR}/lld/Driver
+ LINK_COMPONENTS
+ Object
+ Option
+ Support
+
LINK_LIBS
lldConfig
lldMachO
lldCore
lldReaderWriter
lldYAML
- LLVMObject
- LLVMOption
- LLVMSupport
)
add_dependencies(lldDriver DriverOptionsTableGen)
Index: llvm-toolchain-snapshot_4.0~svn290969/lld/lib/ReaderWriter/CMakeLists.txt
===================================================================
--- llvm-toolchain-snapshot_4.0~svn290969.orig/lld/lib/ReaderWriter/CMakeLists.txt
+++ llvm-toolchain-snapshot_4.0~svn290969/lld/lib/ReaderWriter/CMakeLists.txt
@@ -11,9 +11,11 @@
ADDITIONAL_HEADER_DIRS
${LLD_INCLUDE_DIR}/lld/ReaderWriter
+ LINK_COMPONENTS
+ Object
+ Support
+
LINK_LIBS
lldCore
lldYAML
- LLVMObject
- LLVMSupport
)
Index: llvm-toolchain-snapshot_4.0~svn290969/lld/lib/ReaderWriter/MachO/CMakeLists.txt
===================================================================
--- llvm-toolchain-snapshot_4.0~svn290969.orig/lld/lib/ReaderWriter/MachO/CMakeLists.txt
+++ llvm-toolchain-snapshot_4.0~svn290969/lld/lib/ReaderWriter/MachO/CMakeLists.txt
@@ -18,13 +18,16 @@
StubsPass.cpp
TLVPass.cpp
WriterMachO.cpp
+
+ LINK_COMPONENTS
+ DebugInfoDWARF
+ Object
+ Support
+ Demangle
+
LINK_LIBS
lldCore
lldYAML
- LLVMDebugInfoDWARF
- LLVMObject
- LLVMSupport
- LLVMDemangle
${PTHREAD_LIB}
)
Index: llvm-toolchain-snapshot_4.0~svn290969/lld/lib/ReaderWriter/YAML/CMakeLists.txt
===================================================================
--- llvm-toolchain-snapshot_4.0~svn290969.orig/lld/lib/ReaderWriter/YAML/CMakeLists.txt
+++ llvm-toolchain-snapshot_4.0~svn290969/lld/lib/ReaderWriter/YAML/CMakeLists.txt
@@ -1,6 +1,9 @@
add_lld_library(lldYAML
ReaderWriterYAML.cpp
+
+ LINK_COMPONENTS
+ Support
+
LINK_LIBS
lldCore
- LLVMSupport
)
Index: llvm-toolchain-snapshot_4.0~svn290969/lld/tools/lld/CMakeLists.txt
===================================================================
--- llvm-toolchain-snapshot_4.0~svn290969.orig/lld/tools/lld/CMakeLists.txt
+++ llvm-toolchain-snapshot_4.0~svn290969/lld/tools/lld/CMakeLists.txt
@@ -1,12 +1,15 @@
+set(LLVM_LINK_COMPONENTS
+ Support
+ )
+
add_lld_tool(lld
lld.cpp
)
target_link_libraries(lld
lldDriver
lldCOFF
lldELF
- LLVMSupport
)
install(TARGETS lld

View File

@ -43,3 +43,4 @@ clang-fix-cmpxchg8-detection-on-i386.patch
lldb-addversion-suffix-to-llvm-server-exec.patch
lldb-missing-install.diff
silent-test-failing-codeverage.diff
lld-arg-cmake-issue.diff

2
debian/rules vendored
View File

@ -136,7 +136,7 @@ ifeq (,$(filter-out $(LLDB_DISABLE_ARCHS), $(DEB_HOST_ARCH)))
LLDB_ENABLE=no
endif
LLD_ENABLE=no
LLD_ENABLE=yes
%:
dh $@ --with ocaml