llvm.org GIT mirror llvm / bcffb1f
Rename profile_rt.so to libprofile_rt.so under configure+make (it already was under cmake). Add libprofile_rt.a so that we can tell clang to link against it in --coverage mode. Also turn it on by default in cmake builds. Oscar, this touches a change you made for EXCLUDE_FROM_ALL support -- I think I've done the right thing, but please let me know (or fix and commit) if not! git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@130470 91177308-0d34-0410-b5e6-96231b3b80d8 Nick Lewycky 8 years ago
6 changed file(s) with 25 addition(s) and 11 deletion(s). Raw diff Collapse all Expand all
227227 endif()
228228
229229 option(LLVM_BUILD_RUNTIME
230 "Build the LLVM runtime libraries. If OFF, just generate build targets." OFF)
230 "Build the LLVM runtime libraries. If OFF, just generate build targets." ON)
231231 option(LLVM_INCLUDE_RUNTIME "Generate build targets for the LLVM runtimes" ON)
232232 if( LLVM_INCLUDE_RUNTIME )
233233 add_subdirectory(runtime)
1616 # list. Without this, linking the unit tests on MinGW fails.
1717 link_system_libs( ${name} )
1818
19 install(TARGETS ${name}
20 LIBRARY DESTINATION lib${LLVM_LIBDIR_SUFFIX}
21 ARCHIVE DESTINATION lib${LLVM_LIBDIR_SUFFIX})
19 if( EXCLUDE_FROM_ALL )
20 set_target_properties( ${name} PROPERTIES EXCLUDE_FROM_ALL ON)
21 else()
22 install(TARGETS ${name}
23 LIBRARY DESTINATION lib${LLVM_LIBDIR_SUFFIX}
24 ARCHIVE DESTINATION lib${LLVM_LIBDIR_SUFFIX})
25 endif()
2226 # The LLVM Target library shall be built before its sublibraries
2327 # (asmprinter, etc) because those may use tablegenned files which
2428 # generation is triggered by the main LLVM target library. Necessary
5761 endif()
5862
5963 if( EXCLUDE_FROM_ALL )
60 set_target_properties(profile_rt PROPERTIES EXCLUDE_FROM_ALL ON)
64 set_target_properties( ${name} PROPERTIES EXCLUDE_FROM_ALL ON)
6165 else()
6266 install(TARGETS ${name}
6367 LIBRARY DESTINATION lib${LLVM_LIBDIR_SUFFIX}
2929 set(MSVC_LIB_DEPS_LLVMMBlazeAsmParser LLVMMBlazeCodeGen LLVMMBlazeInfo LLVMMC LLVMMCParser LLVMSupport LLVMTarget)
3030 set(MSVC_LIB_DEPS_LLVMMBlazeAsmPrinter LLVMMC LLVMSupport)
3131 set(MSVC_LIB_DEPS_LLVMMBlazeCodeGen LLVMAsmPrinter LLVMCodeGen LLVMCore LLVMMBlazeAsmPrinter LLVMMBlazeInfo LLVMMC LLVMSelectionDAG LLVMSupport LLVMTarget)
32 set(MSVC_LIB_DEPS_LLVMMBlazeDisassembler LLVMMBlazeCodeGen LLVMMBlazeInfo LLVMMC LLVMSupport)
32 set(MSVC_LIB_DEPS_LLVMMBlazeDisassembler LLVMMBlazeCodeGen LLVMMBlazeInfo LLVMMC)
3333 set(MSVC_LIB_DEPS_LLVMMBlazeInfo LLVMMC LLVMSupport)
3434 set(MSVC_LIB_DEPS_LLVMMC LLVMSupport)
35 set(MSVC_LIB_DEPS_LLVMMCDisassembler LLVMARMAsmParser LLVMARMCodeGen LLVMARMDisassembler LLVMARMInfo LLVMAlphaCodeGen LLVMAlphaInfo LLVMBlackfinCodeGen LLVMBlackfinInfo LLVMCBackend LLVMCBackendInfo LLVMCellSPUCodeGen LLVMCellSPUInfo LLVMCppBackend LLVMCppBackendInfo LLVMMBlazeAsmParser LLVMMBlazeCodeGen LLVMMBlazeDisassembler LLVMMBlazeInfo LLVMMC LLVMMCParser LLVMMSP430CodeGen LLVMMSP430Info LLVMMipsCodeGen LLVMMipsInfo LLVMPTXCodeGen LLVMPTXInfo LLVMPowerPCCodeGen LLVMPowerPCInfo LLVMSparcCodeGen LLVMSparcInfo LLVMSupport LLVMSystemZCodeGen LLVMSystemZInfo LLVMX86AsmParser LLVMX86CodeGen LLVMX86Disassembler LLVMX86Info LLVMXCoreCodeGen LLVMXCoreInfo)
35 set(MSVC_LIB_DEPS_LLVMMCDisassembler LLVMARMAsmParser LLVMARMCodeGen LLVMARMDisassembler LLVMARMInfo LLVMAlphaCodeGen LLVMAlphaInfo LLVMBlackfinCodeGen LLVMBlackfinInfo LLVMCBackend LLVMCBackendInfo LLVMCellSPUCodeGen LLVMCellSPUInfo LLVMCppBackend LLVMCppBackendInfo LLVMMBlazeAsmParser LLVMMBlazeCodeGen LLVMMBlazeDisassembler LLVMMBlazeInfo LLVMMC LLVMMCParser LLVMMSP430CodeGen LLVMMSP430Info LLVMMipsCodeGen LLVMMipsInfo LLVMPTXCodeGen LLVMPTXInfo LLVMPowerPCCodeGen LLVMPowerPCInfo LLVMSparcCodeGen LLVMSparcInfo LLVMSupport LLVMSystemZCodeGen LLVMSystemZInfo LLVMTarget LLVMX86AsmParser LLVMX86CodeGen LLVMX86Disassembler LLVMX86Info LLVMXCoreCodeGen LLVMXCoreInfo)
3636 set(MSVC_LIB_DEPS_LLVMMCJIT LLVMCore LLVMExecutionEngine LLVMRuntimeDyld LLVMSupport LLVMTarget)
3737 set(MSVC_LIB_DEPS_LLVMMCParser LLVMMC LLVMSupport)
3838 set(MSVC_LIB_DEPS_LLVMMSP430AsmPrinter LLVMMC LLVMSupport)
None add_llvm_loadable_module( profile_rt
0 set(SOURCES
11 BasicBlockTracing.c
22 CommonProfiling.c
33 GCDAProfiling.c
66 OptimalEdgeProfiling.c
77 Profiling.h
88 )
9
10 add_llvm_library( profile_rt-static ${SOURCES} )
11 set_target_properties( profile_rt-static
12 PROPERTIES
13 OUTPUT_NAME "profile_rt" )
14
15 add_llvm_loadable_module( profile_rt-shared ${SOURCES} )
16 set_target_properties( profile_rt-shared
17 PROPERTIES
18 OUTPUT_NAME "profile_rt" )
1212 ifneq ($(strip $(LLVMCC)),)
1313 BYTECODE_LIBRARY = 1
1414 endif
15 LIBRARYNAME = profile_rt
16 LINK_LIBS_IN_SHARED = 1
1517 SHARED_LIBRARY = 1
16 LOADABLE_MODULE = 1
17 LIBRARYNAME = profile_rt
1818 EXTRA_DIST = libprofile.exports
1919 EXPORTED_SYMBOL_FILE = $(PROJ_SRC_DIR)/libprofile.exports
2020
6464 my $libdir = `llvm-config --libdir`;
6565 chomp $libdir;
6666
67 my $LibProfPath = $libdir . "/profile_rt.so";
67 my $LibProfPath = $libdir . "/libprofile_rt.so";
6868
6969 system "opt -q -f $ProfilePass $BytecodeFile -o $BytecodeFile.inst";
7070 system "lli -fake-argv0 '$BytecodeFile' -load $LibProfPath " .