[llvm-commits] [llvm] r89841 - in /llvm/trunk: Makefile Makefile.rules cmake/modules/LLVMConfig.cmake include/llvm/Target/TargetSelect.h tools/llvm-config/llvm-config.in.in
Daniel Dunbar
daniel at zuster.org
Tue Jan 26 16:25:25 PST 2010
On Tue, Jan 26, 2010 at 3:33 PM, Nick Lewycky <nlewycky at google.com> wrote:
> Dan, this is causing "llvm-config --libs native jit" to emit
> -lLLVMX86Disassembler, which we don't want.
I think the "right fix" is to have a particular component native-jit
which only included the libraries for a host JIT. We really need to
redo how we handle linking and dependencies, though, and I don't
particularly care to tackle this.
- Daniel
> It's not clear to me why we have this case in the first place (I realize you
> merely extended existing logic) and the FIXME comment isn't sufficiently
> clarifying for me. It's low priority, but this is one of the many things
> blocking unladen-swallow integration with mainline python.
>
> Nick
>
> On 24 November 2009 20:46, Daniel Dunbar <daniel at zuster.org> wrote:
>>
>> Author: ddunbar
>> Date: Tue Nov 24 22:46:58 2009
>> New Revision: 89841
>>
>> URL: http://llvm.org/viewvc/llvm-project?rev=89841&view=rev
>> Log:
>> Add the rest of the build system logic for optional target disassemblers
>>
>> Modified:
>> llvm/trunk/Makefile
>> llvm/trunk/Makefile.rules
>> llvm/trunk/cmake/modules/LLVMConfig.cmake
>> llvm/trunk/include/llvm/Target/TargetSelect.h
>> llvm/trunk/tools/llvm-config/llvm-config.in.in
>>
>> Modified: llvm/trunk/Makefile
>> URL:
>> http://llvm.org/viewvc/llvm-project/llvm/trunk/Makefile?rev=89841&r1=89840&r2=89841&view=diff
>>
>>
>> ==============================================================================
>> --- llvm/trunk/Makefile (original)
>> +++ llvm/trunk/Makefile Tue Nov 24 22:46:58 2009
>> @@ -155,9 +155,11 @@
>> FilesToConfig := \
>> include/llvm/Config/config.h \
>> include/llvm/Config/Targets.def \
>> - include/llvm/Config/AsmPrinters.def \
>> + include/llvm/Config/AsmPrinters.def \
>> + include/llvm/Config/AsmParsers.def \
>> + include/llvm/Config/Disassemblers.def \
>> include/llvm/System/DataTypes.h \
>> - tools/llvmc/plugins/Base/Base.td
>> + tools/llvmc/plugins/Base/Base.td
>> FilesToConfigPATH := $(addprefix $(LLVM_OBJ_ROOT)/,$(FilesToConfig))
>>
>> all-local:: $(FilesToConfigPATH)
>>
>> Modified: llvm/trunk/Makefile.rules
>> URL:
>> http://llvm.org/viewvc/llvm-project/llvm/trunk/Makefile.rules?rev=89841&r1=89840&r2=89841&view=diff
>>
>>
>> ==============================================================================
>> --- llvm/trunk/Makefile.rules (original)
>> +++ llvm/trunk/Makefile.rules Tue Nov 24 22:46:58 2009
>> @@ -1565,6 +1565,11 @@
>> $(Echo) "Building $(<F) DAG instruction selector implementation
>> with tblgen"
>> $(Verb) $(TableGen) -gen-dag-isel -o $(call SYSPATH, $@) $<
>>
>> +$(TARGET:%=$(ObjDir)/%GenDisassemblerTables.inc.tmp): \
>> +$(ObjDir)/%GenDisassemblerTables.inc.tmp : %.td $(ObjDir)/.dir
>> + $(Echo) "Building $(<F) disassembly tables with tblgen"
>> + $(Verb) $(TableGen) -gen-disassembler -o $(call SYSPATH, $@) $<
>> +
>> $(TARGET:%=$(ObjDir)/%GenFastISel.inc.tmp): \
>> $(ObjDir)/%GenFastISel.inc.tmp : %.td $(ObjDir)/.dir
>> $(Echo) "Building $(<F) \"fast\" instruction selector
>> implementation with tblgen"
>>
>> Modified: llvm/trunk/cmake/modules/LLVMConfig.cmake
>> URL:
>> http://llvm.org/viewvc/llvm-project/llvm/trunk/cmake/modules/LLVMConfig.cmake?rev=89841&r1=89840&r2=89841&view=diff
>>
>>
>> ==============================================================================
>> --- llvm/trunk/cmake/modules/LLVMConfig.cmake (original)
>> +++ llvm/trunk/cmake/modules/LLVMConfig.cmake Tue Nov 24 22:46:58 2009
>> @@ -32,7 +32,7 @@
>> function(explicit_map_components_to_libraries out_libs)
>> set( link_components ${ARGN} )
>> foreach(c ${link_components})
>> - # add codegen, asmprinter, asmparser
>> + # add codegen, asmprinter, asmparser, disassembler
>> list(FIND LLVM_TARGETS_TO_BUILD ${c} idx)
>> if( NOT idx LESS 0 )
>> list(FIND llvm_libs "LLVM${c}CodeGen" idx)
>> @@ -58,6 +58,10 @@
>> if( NOT asmidx LESS 0 )
>> list(APPEND expanded_components "LLVM${c}Info")
>> endif()
>> + list(FIND llvm_libs "LLVM${c}Disassembler" asmidx)
>> + if( NOT asmidx LESS 0 )
>> + list(APPEND expanded_components "LLVM${c}Disassembler")
>> + endif()
>> elseif( c STREQUAL "native" )
>> list(APPEND expanded_components "LLVM${LLVM_NATIVE_ARCH}CodeGen")
>> elseif( c STREQUAL "nativecodegen" )
>>
>> Modified: llvm/trunk/include/llvm/Target/TargetSelect.h
>> URL:
>> http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/Target/TargetSelect.h?rev=89841&r1=89840&r2=89841&view=diff
>>
>>
>> ==============================================================================
>> --- llvm/trunk/include/llvm/Target/TargetSelect.h (original)
>> +++ llvm/trunk/include/llvm/Target/TargetSelect.h Tue Nov 24 22:46:58 2009
>> @@ -33,6 +33,10 @@
>> // Declare all of the available assembly parser initialization
>> functions.
>> #define LLVM_ASM_PARSER(TargetName) void
>> LLVMInitialize##TargetName##AsmParser();
>> #include "llvm/Config/AsmParsers.def"
>> +
>> + // Declare all of the available disassembler initialization functions.
>> +#define LLVM_DISASSEMBLER(TargetName) void
>> LLVMInitialize##TargetName##Disassembler();
>> +#include "llvm/Config/Disassemblers.def"
>> }
>>
>> namespace llvm {
>> @@ -79,6 +83,16 @@
>> #include "llvm/Config/AsmParsers.def"
>> }
>>
>> + /// InitializeAllDisassemblers - The main program should call this
>> function if
>> + /// it wants all disassemblers that LLVM is configured to support, to
>> make
>> + /// them available via the TargetRegistry.
>> + ///
>> + /// It is legal for a client to make multiple calls to this function.
>> + inline void InitializeAllDisassemblers() {
>> +#define LLVM_DISASSEMBLER(TargetName)
>> LLVMInitialize##TargetName##Disassembler();
>> +#include "llvm/Config/Disassemblers.def"
>> + }
>> +
>> /// InitializeNativeTarget - The main program should call this function
>> to
>> /// initialize the native target corresponding to the host. This is
>> useful
>> /// for JIT applications to ensure that the target gets linked in
>> correctly.
>>
>> Modified: llvm/trunk/tools/llvm-config/llvm-config.in.in
>> URL:
>> http://llvm.org/viewvc/llvm-project/llvm/trunk/tools/llvm-config/llvm-config.in.in?rev=89841&r1=89840&r2=89841&view=diff
>>
>>
>> ==============================================================================
>> --- llvm/trunk/tools/llvm-config/llvm-config.in.in (original)
>> +++ llvm/trunk/tools/llvm-config/llvm-config.in.in Tue Nov 24 22:46:58
>> 2009
>> @@ -333,6 +333,10 @@
>> if (defined $NAME_MAP{$target.'asmparser'}) {
>> push @{$NAME_MAP{$target}},$target.'asmparser'
>> }
>> +
>> + if (defined $NAME_MAP{$target.'disassembler'}) {
>> + push @{$NAME_MAP{$target}},$target.'disassembler'
>> + }
>> }
>>
>> # Add virtual entries.
>>
>>
>> _______________________________________________
>> 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