brintos

brintos / llvm-project-archived public Read only

0
0
Text · 1.7 KiB · efe5150 Raw
56 lines · plain
1set(LLVM_TARGET_DEFINITIONS Options.td)2tablegen(LLVM Options.inc -gen-opt-parser-defs)3add_public_tablegen_target(LLDBOptionsTableGen)4 5if(APPLE)6  configure_file(7    ${CMAKE_CURRENT_SOURCE_DIR}/lldb-Info.plist.in8    ${CMAKE_CURRENT_BINARY_DIR}/lldb-Info.plist9    )10  # Inline info plist in binary (use target_link_options for this as soon as CMake 3.13 is available)11  set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -Wl,-sectcreate,__TEXT,__info_plist,${CMAKE_CURRENT_BINARY_DIR}/lldb-Info.plist")12endif()13 14if (UNIX AND "${CMAKE_SYSTEM_NAME}" MATCHES "AIX")15  remove_definitions("-D_XOPEN_SOURCE=700")                                    16  add_definitions("-D_ALL_SOURCE")                                             17endif()18 19add_lldb_tool(lldb20  Driver.cpp21  Platform.cpp22 23  LINK_COMPONENTS24    Option25    Support26  LINK_LIBS27    liblldb28    lldbHost29    lldbUtility30  )31 32add_dependencies(lldb33  LLDBOptionsTableGen34  ${tablegen_deps}35)36 37if(DEFINED LLDB_PYTHON_DLL_RELATIVE_PATH)38  target_compile_definitions(lldb PRIVATE LLDB_PYTHON_DLL_RELATIVE_PATH="${LLDB_PYTHON_DLL_RELATIVE_PATH}")39endif()40if(DEFINED LLDB_PYTHON_RUNTIME_LIBRARY_FILENAME)41  target_compile_definitions(lldb PRIVATE LLDB_PYTHON_RUNTIME_LIBRARY_FILENAME="${LLDB_PYTHON_RUNTIME_LIBRARY_FILENAME}")42endif()43 44if(LLDB_BUILD_FRAMEWORK)45  # In the build-tree, we know the exact path to the framework directory.46  # The installed framework can be in different locations.47  lldb_setup_rpaths(lldb48    BUILD_RPATH49      "${LLDB_FRAMEWORK_ABSOLUTE_BUILD_DIR}"50    INSTALL_RPATH51      "@loader_path/../../../SharedFrameworks"52      "@loader_path/../../System/Library/PrivateFrameworks"53      "@loader_path/../../Library/PrivateFrameworks"54  )55endif()56