]> git.proxmox.com Git - rustc.git/blob - src/llvm/tools/gold/CMakeLists.txt
Imported Upstream version 1.0.0~0alpha
[rustc.git] / src / llvm / tools / gold / CMakeLists.txt
1 set(LLVM_BINUTILS_INCDIR "" CACHE PATH
2 "PATH to binutils/include containing plugin-api.h for gold plugin.")
3
4 set(LLVM_EXPORTED_SYMBOL_FILE ${CMAKE_CURRENT_SOURCE_DIR}/gold.exports)
5
6 if( NOT LLVM_BINUTILS_INCDIR )
7 # Nothing to say.
8 elseif( NOT EXISTS "${LLVM_BINUTILS_INCDIR}/plugin-api.h" )
9 message(STATUS "plugin-api.h not found. gold plugin excluded from the build.")
10 else()
11 include_directories( ${LLVM_BINUTILS_INCDIR} )
12
13 # Because off_t is used in the public API, the largefile parts are required for
14 # ABI compatibility.
15 add_definitions( -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 )
16
17 set(LLVM_LINK_COMPONENTS
18 ${LLVM_TARGETS_TO_BUILD}
19 Linker
20 BitWriter
21 IPO
22 )
23
24 add_llvm_loadable_module(LLVMgold
25 gold-plugin.cpp
26 )
27
28 endif()
29