llvm.org GIT mirror llvm / fef02e9
Kill off cmake magic to force linking. - This isn't needed anymore, we require clients to call the appropriate initialization routines using TargetSelect.h. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@75871 91177308-0d34-0410-b5e6-96231b3b80d8 Daniel Dunbar 10 years ago
2 changed file(s) with 0 addition(s) and 32 deletion(s). Raw diff Collapse all Expand all
6161 X86
6262 XCore
6363 )
64
65 # List of targets whose asmprinters need to be forced to link
66 # into executables on some platforms (i.e. Windows):
67 set(LLVM_ASMPRINTERS_FORCE_LINK X86 PowerPC)
6864
6965 if( MSVC )
7066 set(LLVM_TARGETS_TO_BUILD X86
2626 function(explicit_llvm_config executable)
2727 set( link_components ${ARGN} )
2828
29 set(lfgs)
30 if (MSVC)
31 if( CMAKE_CL_64 )
32 set(include_lflag "/INCLUDE:")
33 else( CMAKE_CL_64 )
34 set(include_lflag "/INCLUDE:_")
35 endif()
36 foreach(c ${link_components})
37 if( c STREQUAL "jit" )
38 set(lfgs "${lfgs} ${include_lflag}X86TargetMachineModule")
39 endif( c STREQUAL "jit" )
40 list(FIND LLVM_TARGETS_TO_BUILD ${c} idx)
41 if( NOT idx LESS 0 )
42 set(lfgs "${lfgs} ${include_lflag}${c}TargetMachineModule")
43 list(FIND LLVM_ASMPRINTERS_FORCE_LINK ${c} idx)
44 if( NOT idx LESS 0 )
45 set(lfgs "${lfgs} ${include_lflag}${c}AsmPrinterForceLink")
46 endif()
47 endif()
48 endforeach(c)
49 endif ()
50
5129 explicit_map_components_to_libraries(LIBRARIES ${link_components})
5230 target_link_libraries(${executable} ${LIBRARIES})
53
54 if( lfgs )
55 set_target_properties(${executable}
56 PROPERTIES
57 LINK_FLAGS ${lfgs})
58 endif()
5931 endfunction(explicit_llvm_config)
6032
6133