xref: /aosp_15_r20/external/llvm/tools/gold/CMakeLists.txt (revision 9880d6810fe72a1726cb53787c6711e909410d58)
1*9880d681SAndroid Build Coastguard Workerset(LLVM_EXPORTED_SYMBOL_FILE ${CMAKE_CURRENT_SOURCE_DIR}/gold.exports)
2*9880d681SAndroid Build Coastguard Worker
3*9880d681SAndroid Build Coastguard Workerif( LLVM_ENABLE_PIC AND LLVM_BINUTILS_INCDIR )
4*9880d681SAndroid Build Coastguard Worker  include_directories( ${LLVM_BINUTILS_INCDIR} )
5*9880d681SAndroid Build Coastguard Worker
6*9880d681SAndroid Build Coastguard Worker  # Because off_t is used in the public API, the largefile parts are required for
7*9880d681SAndroid Build Coastguard Worker  # ABI compatibility.
8*9880d681SAndroid Build Coastguard Worker  add_definitions( -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 )
9*9880d681SAndroid Build Coastguard Worker
10*9880d681SAndroid Build Coastguard Worker  set(LLVM_LINK_COMPONENTS
11*9880d681SAndroid Build Coastguard Worker     ${LLVM_TARGETS_TO_BUILD}
12*9880d681SAndroid Build Coastguard Worker     Linker
13*9880d681SAndroid Build Coastguard Worker     LTO
14*9880d681SAndroid Build Coastguard Worker     BitWriter
15*9880d681SAndroid Build Coastguard Worker     IPO
16*9880d681SAndroid Build Coastguard Worker     )
17*9880d681SAndroid Build Coastguard Worker
18*9880d681SAndroid Build Coastguard Worker  add_llvm_loadable_module(LLVMgold
19*9880d681SAndroid Build Coastguard Worker    gold-plugin.cpp
20*9880d681SAndroid Build Coastguard Worker    )
21*9880d681SAndroid Build Coastguard Worker
22*9880d681SAndroid Build Coastguard Workerendif()
23*9880d681SAndroid Build Coastguard Worker
24