1 list(APPEND LLVM_COMMON_DEPENDS intrinsics_gen)
3 list(APPEND LLVM_TABLEGEN_FLAGS -I ${LLVM_MAIN_SRC_DIR}/lib/Target)
5 add_llvm_component_library(LLVMTarget
7 TargetIntrinsicInfo.cpp
8 TargetLoweringObjectFile.cpp
12 ADDITIONAL_HEADER_DIRS
13 ${LLVM_MAIN_INCLUDE_DIR}/llvm/Target
23 # When building shared objects for each target there are some internal APIs
24 # that are used across shared objects which we can't hide.
25 if (NOT BUILD_SHARED_LIBS AND NOT APPLE AND
26 (NOT (WIN32 OR CYGWIN) OR (MINGW AND CMAKE_CXX_COMPILER_ID MATCHES "Clang")) AND
27 NOT (${CMAKE_SYSTEM_NAME} MATCHES "AIX") AND
28 NOT DEFINED CMAKE_CXX_VISIBILITY_PRESET)
29 # Set default visibility to hidden, so we don't export all the Target classes
31 set(CMAKE_CXX_VISIBILITY_PRESET hidden)
34 foreach(t ${LLVM_TARGETS_TO_BUILD})
35 message(STATUS "Targeting ${t}")
36 add_subdirectory(${t})
39 # Currently we do not allow libraries from lib to reference targets directly.
40 # This property is used to enforce that convention. It is important because the
41 # logic in llvm_map_components_to_libnames is order dependent on the target
42 # libraries being created.
43 set_property(GLOBAL PROPERTY LLVM_TARGETS_CONFIGURED On)