• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1set(LLVM_BINUTILS_INCDIR "" CACHE PATH
2  "PATH to binutils/include containing plugin-api.h for gold plugin.")
3
4set(LLVM_EXPORTED_SYMBOL_FILE ${CMAKE_CURRENT_SOURCE_DIR}/gold.exports)
5
6if( NOT LLVM_BINUTILS_INCDIR )
7  # Nothing to say.
8elseif( NOT EXISTS "${LLVM_BINUTILS_INCDIR}/plugin-api.h" )
9  message(STATUS "plugin-api.h not found. gold plugin excluded from the build.")
10else()
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     LTO
20     )
21
22  add_llvm_loadable_module(LLVMgold
23    gold-plugin.cpp
24    )
25
26endif()
27
28