• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1list(APPEND LLVM_COMMON_DEPENDS intrinsics_gen)
2
3list(APPEND LLVM_TABLEGEN_FLAGS -I ${LLVM_MAIN_SRC_DIR}/lib/Target)
4
5add_llvm_component_library(LLVMTarget
6  Target.cpp
7  TargetIntrinsicInfo.cpp
8  TargetLoweringObjectFile.cpp
9  TargetMachine.cpp
10  TargetMachineC.cpp
11
12  ADDITIONAL_HEADER_DIRS
13  ${LLVM_MAIN_INCLUDE_DIR}/llvm/Target
14  )
15
16# When building shared objects for each target there are some internal APIs
17# that are used across shared objects which we can't hide.
18if (NOT BUILD_SHARED_LIBS AND NOT APPLE)
19  # Set default visibility to hidden, so we don't export all the Target classes
20  # in libLLVM.so.
21  set(CMAKE_CXX_VISIBILITY_PRESET hidden)
22endif()
23
24foreach(t ${LLVM_TARGETS_TO_BUILD})
25  message(STATUS "Targeting ${t}")
26  add_subdirectory(${t})
27endforeach()
28
29# Currently we do not allow libraries from lib to reference targets directly.
30# This property is used to enforce that convention. It is important because the
31# logic in llvm_map_components_to_libnames is order dependent on the target
32# libraries being created.
33set_property(GLOBAL PROPERTY LLVM_TARGETS_CONFIGURED On)
34