[lld] r226346 - Add LLVM_LINK_COMPONENTS for the shared object build
Greg Fitzgerald
garious at gmail.com
Tue Jan 20 09:37:32 PST 2015
It won't build yet. This patch just takes care of the low-hanging
fruit. I hope to submit more patches soon to get the shared-libs
build working. Right now it's looking like I'll need to move a bunch
of files around to break all the cyclic dependencies. CMake docs
suggests the existing code should work, but no luck for me.
-Greg
On Tue, Jan 20, 2015 at 8:33 AM, Rafael EspĂndola
<rafael.espindola at gmail.com> wrote:
> Awesome!
>
> Takumi, you have a bot that uses -DBUILD_SHARED_LIBS=ON, right? Can
> you add lld to it to make sure it keeps building?
>
> Thanks,
> Rafael
>
>
> On 16 January 2015 at 18:34, Greg Fitzgerald <garious at gmail.com> wrote:
>> Author: garious
>> Date: Fri Jan 16 17:34:41 2015
>> New Revision: 226346
>>
>> URL: http://llvm.org/viewvc/llvm-project?rev=226346&view=rev
>> Log:
>> Add LLVM_LINK_COMPONENTS for the shared object build
>>
>> Differential Revision: http://reviews.llvm.org/D7023
>>
>> From: Greg Fitzgerald <garious at gmail.com>
>>
>> Modified:
>> lld/trunk/lib/Config/CMakeLists.txt
>> lld/trunk/lib/Driver/CMakeLists.txt
>> lld/trunk/lib/Passes/CMakeLists.txt
>> lld/trunk/lib/ReaderWriter/CMakeLists.txt
>> lld/trunk/lib/ReaderWriter/ELF/AArch64/CMakeLists.txt
>> lld/trunk/lib/ReaderWriter/ELF/Hexagon/CMakeLists.txt
>> lld/trunk/lib/ReaderWriter/ELF/Mips/CMakeLists.txt
>> lld/trunk/lib/ReaderWriter/ELF/PPC/CMakeLists.txt
>> lld/trunk/lib/ReaderWriter/ELF/X86/CMakeLists.txt
>> lld/trunk/lib/ReaderWriter/ELF/X86_64/CMakeLists.txt
>> lld/trunk/lib/ReaderWriter/MachO/CMakeLists.txt
>> lld/trunk/lib/ReaderWriter/Native/CMakeLists.txt
>> lld/trunk/lib/ReaderWriter/PECOFF/CMakeLists.txt
>> lld/trunk/lib/ReaderWriter/YAML/CMakeLists.txt
>>
>> Modified: lld/trunk/lib/Config/CMakeLists.txt
>> URL: http://llvm.org/viewvc/llvm-project/lld/trunk/lib/Config/CMakeLists.txt?rev=226346&r1=226345&r2=226346&view=diff
>> ==============================================================================
>> --- lld/trunk/lib/Config/CMakeLists.txt (original)
>> +++ lld/trunk/lib/Config/CMakeLists.txt Fri Jan 16 17:34:41 2015
>> @@ -1,3 +1,5 @@
>> +set(LLVM_LINK_COMPONENTS support)
>> +
>> add_lld_library(lldConfig
>> Version.cpp
>> )
>>
>> Modified: lld/trunk/lib/Driver/CMakeLists.txt
>> URL: http://llvm.org/viewvc/llvm-project/lld/trunk/lib/Driver/CMakeLists.txt?rev=226346&r1=226345&r2=226346&view=diff
>> ==============================================================================
>> --- lld/trunk/lib/Driver/CMakeLists.txt (original)
>> +++ lld/trunk/lib/Driver/CMakeLists.txt Fri Jan 16 17:34:41 2015
>> @@ -10,6 +10,8 @@ set(LLVM_TARGET_DEFINITIONS WinLinkOptio
>> tablegen(LLVM WinLinkOptions.inc -gen-opt-parser-defs)
>> add_public_tablegen_target(DriverOptionsTableGen)
>>
>> +set(LLVM_LINK_COMPONENTS object option support)
>> +
>> add_lld_library(lldDriver
>> CoreDriver.cpp
>> DarwinLdDriver.cpp
>>
>> Modified: lld/trunk/lib/Passes/CMakeLists.txt
>> URL: http://llvm.org/viewvc/llvm-project/lld/trunk/lib/Passes/CMakeLists.txt?rev=226346&r1=226345&r2=226346&view=diff
>> ==============================================================================
>> --- lld/trunk/lib/Passes/CMakeLists.txt (original)
>> +++ lld/trunk/lib/Passes/CMakeLists.txt Fri Jan 16 17:34:41 2015
>> @@ -1,3 +1,5 @@
>> +set(LLVM_LINK_COMPONENTS support)
>> +
>> add_lld_library(lldPasses
>> LayoutPass.cpp
>> RoundTripNativePass.cpp
>>
>> Modified: lld/trunk/lib/ReaderWriter/CMakeLists.txt
>> URL: http://llvm.org/viewvc/llvm-project/lld/trunk/lib/ReaderWriter/CMakeLists.txt?rev=226346&r1=226345&r2=226346&view=diff
>> ==============================================================================
>> --- lld/trunk/lib/ReaderWriter/CMakeLists.txt (original)
>> +++ lld/trunk/lib/ReaderWriter/CMakeLists.txt Fri Jan 16 17:34:41 2015
>> @@ -4,7 +4,7 @@ add_subdirectory(Native)
>> add_subdirectory(PECOFF)
>> add_subdirectory(YAML)
>>
>> -set(LLVM_LINK_COMPONENTS object)
>> +set(LLVM_LINK_COMPONENTS object support)
>>
>> add_lld_library(lldReaderWriter
>> CoreLinkingContext.cpp
>>
>> Modified: lld/trunk/lib/ReaderWriter/ELF/AArch64/CMakeLists.txt
>> URL: http://llvm.org/viewvc/llvm-project/lld/trunk/lib/ReaderWriter/ELF/AArch64/CMakeLists.txt?rev=226346&r1=226345&r2=226346&view=diff
>> ==============================================================================
>> --- lld/trunk/lib/ReaderWriter/ELF/AArch64/CMakeLists.txt (original)
>> +++ lld/trunk/lib/ReaderWriter/ELF/AArch64/CMakeLists.txt Fri Jan 16 17:34:41 2015
>> @@ -1,3 +1,5 @@
>> +set(LLVM_LINK_COMPONENTS support)
>> +
>> add_lld_library(lldAArch64ELFTarget
>> AArch64LinkingContext.cpp
>> AArch64TargetHandler.cpp
>>
>> Modified: lld/trunk/lib/ReaderWriter/ELF/Hexagon/CMakeLists.txt
>> URL: http://llvm.org/viewvc/llvm-project/lld/trunk/lib/ReaderWriter/ELF/Hexagon/CMakeLists.txt?rev=226346&r1=226345&r2=226346&view=diff
>> ==============================================================================
>> --- lld/trunk/lib/ReaderWriter/ELF/Hexagon/CMakeLists.txt (original)
>> +++ lld/trunk/lib/ReaderWriter/ELF/Hexagon/CMakeLists.txt Fri Jan 16 17:34:41 2015
>> @@ -1,3 +1,5 @@
>> +set(LLVM_LINK_COMPONENTS support)
>> +
>> add_lld_library(lldHexagonELFTarget
>> HexagonLinkingContext.cpp
>> HexagonRelocationHandler.cpp
>>
>> Modified: lld/trunk/lib/ReaderWriter/ELF/Mips/CMakeLists.txt
>> URL: http://llvm.org/viewvc/llvm-project/lld/trunk/lib/ReaderWriter/ELF/Mips/CMakeLists.txt?rev=226346&r1=226345&r2=226346&view=diff
>> ==============================================================================
>> --- lld/trunk/lib/ReaderWriter/ELF/Mips/CMakeLists.txt (original)
>> +++ lld/trunk/lib/ReaderWriter/ELF/Mips/CMakeLists.txt Fri Jan 16 17:34:41 2015
>> @@ -1,3 +1,5 @@
>> +set(LLVM_LINK_COMPONENTS support)
>> +
>> add_lld_library(lldMipsELFTarget
>> MipsCtorsOrderPass.cpp
>> MipsELFFlagsMerger.cpp
>>
>> Modified: lld/trunk/lib/ReaderWriter/ELF/PPC/CMakeLists.txt
>> URL: http://llvm.org/viewvc/llvm-project/lld/trunk/lib/ReaderWriter/ELF/PPC/CMakeLists.txt?rev=226346&r1=226345&r2=226346&view=diff
>> ==============================================================================
>> --- lld/trunk/lib/ReaderWriter/ELF/PPC/CMakeLists.txt (original)
>> +++ lld/trunk/lib/ReaderWriter/ELF/PPC/CMakeLists.txt Fri Jan 16 17:34:41 2015
>> @@ -1,3 +1,5 @@
>> +set(LLVM_LINK_COMPONENTS support)
>> +
>> add_lld_library(lldPPCELFTarget
>> PPCLinkingContext.cpp
>> PPCTargetHandler.cpp
>>
>> Modified: lld/trunk/lib/ReaderWriter/ELF/X86/CMakeLists.txt
>> URL: http://llvm.org/viewvc/llvm-project/lld/trunk/lib/ReaderWriter/ELF/X86/CMakeLists.txt?rev=226346&r1=226345&r2=226346&view=diff
>> ==============================================================================
>> --- lld/trunk/lib/ReaderWriter/ELF/X86/CMakeLists.txt (original)
>> +++ lld/trunk/lib/ReaderWriter/ELF/X86/CMakeLists.txt Fri Jan 16 17:34:41 2015
>> @@ -1,3 +1,5 @@
>> +set(LLVM_LINK_COMPONENTS support)
>> +
>> add_lld_library(lldX86ELFTarget
>> X86LinkingContext.cpp
>> X86TargetHandler.cpp
>>
>> Modified: lld/trunk/lib/ReaderWriter/ELF/X86_64/CMakeLists.txt
>> URL: http://llvm.org/viewvc/llvm-project/lld/trunk/lib/ReaderWriter/ELF/X86_64/CMakeLists.txt?rev=226346&r1=226345&r2=226346&view=diff
>> ==============================================================================
>> --- lld/trunk/lib/ReaderWriter/ELF/X86_64/CMakeLists.txt (original)
>> +++ lld/trunk/lib/ReaderWriter/ELF/X86_64/CMakeLists.txt Fri Jan 16 17:34:41 2015
>> @@ -1,3 +1,5 @@
>> +set(LLVM_LINK_COMPONENTS support)
>> +
>> add_lld_library(lldX86_64ELFTarget
>> X86_64LinkingContext.cpp
>> X86_64TargetHandler.cpp
>>
>> Modified: lld/trunk/lib/ReaderWriter/MachO/CMakeLists.txt
>> URL: http://llvm.org/viewvc/llvm-project/lld/trunk/lib/ReaderWriter/MachO/CMakeLists.txt?rev=226346&r1=226345&r2=226346&view=diff
>> ==============================================================================
>> --- lld/trunk/lib/ReaderWriter/MachO/CMakeLists.txt (original)
>> +++ lld/trunk/lib/ReaderWriter/MachO/CMakeLists.txt Fri Jan 16 17:34:41 2015
>> @@ -1,3 +1,5 @@
>> +set(LLVM_LINK_COMPONENTS support)
>> +
>> add_lld_library(lldMachO
>> ArchHandler.cpp
>> ArchHandler_arm.cpp
>>
>> Modified: lld/trunk/lib/ReaderWriter/Native/CMakeLists.txt
>> URL: http://llvm.org/viewvc/llvm-project/lld/trunk/lib/ReaderWriter/Native/CMakeLists.txt?rev=226346&r1=226345&r2=226346&view=diff
>> ==============================================================================
>> --- lld/trunk/lib/ReaderWriter/Native/CMakeLists.txt (original)
>> +++ lld/trunk/lib/ReaderWriter/Native/CMakeLists.txt Fri Jan 16 17:34:41 2015
>> @@ -1,3 +1,5 @@
>> +set(LLVM_LINK_COMPONENTS support)
>> +
>> add_lld_library(lldNative
>> ReaderNative.cpp
>> WriterNative.cpp
>>
>> Modified: lld/trunk/lib/ReaderWriter/PECOFF/CMakeLists.txt
>> URL: http://llvm.org/viewvc/llvm-project/lld/trunk/lib/ReaderWriter/PECOFF/CMakeLists.txt?rev=226346&r1=226345&r2=226346&view=diff
>> ==============================================================================
>> --- lld/trunk/lib/ReaderWriter/PECOFF/CMakeLists.txt (original)
>> +++ lld/trunk/lib/ReaderWriter/PECOFF/CMakeLists.txt Fri Jan 16 17:34:41 2015
>> @@ -1,3 +1,5 @@
>> +set(LLVM_LINK_COMPONENTS object support)
>> +
>> add_lld_library(lldPECOFF
>> EdataPass.cpp
>> IdataPass.cpp
>>
>> Modified: lld/trunk/lib/ReaderWriter/YAML/CMakeLists.txt
>> URL: http://llvm.org/viewvc/llvm-project/lld/trunk/lib/ReaderWriter/YAML/CMakeLists.txt?rev=226346&r1=226345&r2=226346&view=diff
>> ==============================================================================
>> --- lld/trunk/lib/ReaderWriter/YAML/CMakeLists.txt (original)
>> +++ lld/trunk/lib/ReaderWriter/YAML/CMakeLists.txt Fri Jan 16 17:34:41 2015
>> @@ -1,3 +1,5 @@
>> +set(LLVM_LINK_COMPONENTS support)
>> +
>> add_lld_library(lldYAML
>> ReaderWriterYAML.cpp
>> )
>>
>>
>> _______________________________________________
>> llvm-commits mailing list
>> llvm-commits at cs.uiuc.edu
>> http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits
More information about the llvm-commits
mailing list