Files
TheRock/compiler/amd-llvm/lldb/source/Host/CMakeLists.txt
T
derek.holloway 7502bf64a4
CodeQL / Analyze (actions) (push) Canceled after 0s
CodeQL / Analyze (python) (push) Canceled after 0s
pre-commit / pre-commit (push) Canceled after 0s
Multi-Arch CI / setup (push) Canceled after 0s
Publish build_manylinux_x86_64 images / publish_build_manylinux_x86_64 (push) Canceled after 0s
Setup (Multi-Arch) / setup (push) Canceled after 0s
Multi-Arch CI / Linux::${{ fromJSON(needs.setup.outputs.linux_build_config || '{}').build_variant_label || 'skip' }} (push) Canceled after 0s
Publish TheRock Docker image / build-and-push-image (push) Canceled after 0s
Publish no_rocm_image_ubi10 image / publish_no_rocm_image_ubi10 (push) Canceled after 0s
Multi-Arch CI / Windows::${{ fromJSON(needs.setup.outputs.windows_build_config || '{}').build_variant_label || 'skip' }} (push) Canceled after 0s
Publish TheRock Docker image / build-and-push-image (push) Canceled after 0s
Multi-Arch CI / Manifest Diff (push) Canceled after 0s
TheRock Manifest Diff Report / Generate Manifest Diff Report (push) Canceled after 0s
Multi-Arch CI / CI Summary (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04 images / publish_no_rocm_image_ubuntu24_04 (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04_ocl_rt images / publish_no_rocm_image_ubuntu24_04_ocl_rt (push) Canceled after 0s
Publish TheRock Docker image / build-and-push-image (push) Canceled after 0s
Publish TheRock Docker image / build-and-push-image (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04 images / publish_no_rocm_image_ubuntu24_04_rocgdb (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04_rocgdb images / publish_no_rocm_image_ubuntu24_04_rocgdb (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04 images / publish_no_rocm_image_ubuntu24_04_ocl_rt (push) Canceled after 0s
Publish TheRock Docker image / build-and-push-image (push) Canceled after 0s
Unit Tests / Unit Tests :: ubuntu-24.04 (push) Canceled after 0s
Unit Tests / Unit Tests :: windows-2022 (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04 images / publish_no_rocm_image_ubuntu24_04_media (push) Canceled after 0s
Unit Tests / Unit Tests Summary (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04 images / publish_no_rocm_image_ubuntu24_04_openmpi (push) Canceled after 0s
Flatten subprojects into a single base monorepo
2026-09-02 16:34:47 -07:00

245 lines
6.4 KiB
CMake

if (APPLE AND LLVM_ENABLE_LOCAL_SUBMODULE_VISIBILITY)
# The arpa/inet.h header used in the files here is providing a miscompiled
# htonl function on macOS < 14 when local submodule visibility is active.
if (CMAKE_OSX_DEPLOYMENT_TARGET VERSION_LESS 14.0)
# Disabling modules in this directory.
remove_module_flags()
endif()
endif()
if (UNIX AND "${CMAKE_SYSTEM_NAME}" MATCHES "AIX")
add_definitions("-D_ALL_SOURCE")
endif()
macro(add_host_subdirectory group)
list(APPEND HOST_SOURCES ${ARGN})
source_group(${group} FILES ${ARGN})
endmacro()
add_host_subdirectory(common
common/ConPTYUtils.cpp
common/DiagnosticsRendering.cpp
common/FileAction.cpp
common/FileCache.cpp
common/File.cpp
common/FileSystem.cpp
common/GetOptInc.cpp
common/Host.cpp
common/HostInfoBase.cpp
common/HostNativeThreadBase.cpp
common/HostProcess.cpp
common/HostThread.cpp
common/JSONTransport.cpp
common/LZMA.cpp
common/LockFileBase.cpp
common/MainLoopBase.cpp
common/MemoryMonitor.cpp
common/MonitoringProcessLauncher.cpp
common/NativeProcessProtocol.cpp
common/NativeRegisterContext.cpp
common/NativeThreadProtocol.cpp
common/NativeWatchpointList.cpp
common/OptionParser.cpp
common/PipeBase.cpp
common/ProcessLaunchInfo.cpp
common/ProcessRunLock.cpp
common/PseudoTerminal.cpp
common/StreamFile.cpp
common/SocketAddress.cpp
common/Socket.cpp
common/TCPSocket.cpp
common/Terminal.cpp
common/ThreadLauncher.cpp
common/UDPSocket.cpp
common/XML.cpp
common/ZipFileResolver.cpp
)
add_host_subdirectory(common
common/ScriptInterpreterRuntimeLoader.cpp
)
if (LLDB_ENABLE_PYTHON)
add_host_subdirectory(common
common/PythonRuntimeLoader.cpp
)
endif()
if (LLDB_ENABLE_LIBEDIT)
add_host_subdirectory(common
common/Editline.cpp
)
endif()
add_host_subdirectory(posix
posix/ConnectionFileDescriptorPosix.cpp
)
if (CMAKE_SYSTEM_NAME MATCHES "Windows")
add_subdirectory(windows/PythonPathSetup)
add_host_subdirectory(windows
windows/ConnectionConPTYWindows.cpp
windows/ConnectionGenericFileWindows.cpp
windows/FileSystem.cpp
windows/FileWindows.cpp
windows/Host.cpp
windows/HostInfoWindows.cpp
windows/HostProcessWindows.cpp
windows/HostThreadWindows.cpp
windows/LockFileWindows.cpp
windows/MainLoopWindows.cpp
windows/PipeWindows.cpp
windows/ProcessLauncherWindows.cpp
windows/PseudoConsole.cpp
windows/ProcessRunLock.cpp
windows/WindowsFileAction.cpp
)
if (LLDB_ENABLE_PYTHON)
add_host_subdirectory(windows
windows/PythonRuntimeLoaderWindows.cpp
)
endif()
else()
add_host_subdirectory(posix
posix/DomainSocket.cpp
posix/FilePosix.cpp
posix/FileSystemPosix.cpp
posix/HostInfoPosix.cpp
posix/HostProcessPosix.cpp
posix/HostThreadPosix.cpp
posix/LockFilePosix.cpp
posix/MainLoopPosix.cpp
posix/PipePosix.cpp
posix/ProcessLauncherPosixFork.cpp
posix/Support.cpp
)
if (CMAKE_SYSTEM_NAME MATCHES "Darwin")
add_subdirectory(macosx/objcxx)
set(LLDBObjCLibs lldbHostMacOSXObjCXX)
add_host_subdirectory(macosx
macosx/cfcpp/CFCBundle.cpp
macosx/cfcpp/CFCData.cpp
macosx/cfcpp/CFCMutableArray.cpp
macosx/cfcpp/CFCMutableDictionary.cpp
macosx/cfcpp/CFCMutableSet.cpp
macosx/cfcpp/CFCString.cpp
)
if (LLDB_ENABLE_PYTHON)
add_host_subdirectory(macosx
macosx/PythonRuntimeLoaderDarwin.cpp
)
endif()
if(APPLE_EMBEDDED)
set_property(SOURCE macosx/Host.mm APPEND PROPERTY
COMPILE_DEFINITIONS "NO_XPC_SERVICES=1")
endif()
elseif (CMAKE_SYSTEM_NAME MATCHES "Linux|Android")
add_host_subdirectory(linux
linux/AbstractSocket.cpp
linux/Host.cpp
linux/HostInfoLinux.cpp
linux/LibcGlue.cpp
linux/Support.cpp
)
if (LLDB_ENABLE_PYTHON)
add_host_subdirectory(linux
linux/PythonRuntimeLoaderLinux.cpp
)
endif()
if (CMAKE_SYSTEM_NAME MATCHES "Android")
add_host_subdirectory(android
android/HostInfoAndroid.cpp
)
endif()
elseif (CMAKE_SYSTEM_NAME MATCHES "FreeBSD")
add_host_subdirectory(freebsd
freebsd/Host.cpp
freebsd/HostInfoFreeBSD.cpp
)
elseif (CMAKE_SYSTEM_NAME MATCHES "NetBSD")
add_host_subdirectory(netbsd
netbsd/HostNetBSD.cpp
netbsd/HostInfoNetBSD.cpp
)
elseif (CMAKE_SYSTEM_NAME MATCHES "OpenBSD")
add_host_subdirectory(openbsd
openbsd/Host.cpp
openbsd/HostInfoOpenBSD.cpp
)
elseif (CMAKE_SYSTEM_NAME MATCHES "AIX")
add_host_subdirectory(aix
aix/Host.cpp
aix/HostInfoAIX.cpp
aix/Support.cpp
)
endif()
endif()
set(EXTRA_LIBS)
if (CMAKE_SYSTEM_NAME MATCHES "NetBSD")
list(APPEND EXTRA_LIBS kvm)
endif()
if (LLDB_ENABLE_LIBXML2)
list(APPEND EXTRA_LIBS LibXml2::LibXml2)
endif()
if (HAVE_LIBDL)
list(APPEND EXTRA_LIBS ${CMAKE_DL_LIBS})
endif()
if (LLDB_ENABLE_LIBEDIT)
list(APPEND EXTRA_LIBS LibEdit::LibEdit)
endif()
if (LLDB_ENABLE_LZMA)
list(APPEND EXTRA_LIBS ${LIBLZMA_LIBRARIES})
endif()
if (WIN32)
list(APPEND LLDB_SYSTEM_LIBS psapi)
endif()
if (LLDB_ENABLE_LIBEDIT)
list(APPEND LLDB_LIBEDIT_LIBS LibEdit::LibEdit)
if (LLVM_BUILD_STATIC)
list(APPEND LLDB_SYSTEM_LIBS gpm)
endif()
endif()
add_lldb_library(lldbHost NO_PLUGIN_DEPENDENCIES
${HOST_SOURCES}
ADDITIONAL_HEADER_DIRS
${LLDB_INCLUDE_DIR}/lldb/Host
LINK_COMPONENTS
Object
Support
LINK_LIBS
lldbUtility
${EXTRA_LIBS}
${LLDBObjCLibs}
${LLDB_LIBEDIT_LIBS}
ALLOWED_INTERNAL_DEPENDENCIES
lldbUtility
lldbHostMacOSXObjCXX
)
if (WIN32 AND LLDB_ENABLE_PYTHON)
if (DEFINED LLDB_PYTHON_RUNTIME_LIBRARY_FILENAME)
target_compile_definitions(lldbHost PRIVATE
LLDB_PYTHON_RUNTIME_LIBRARY_FILENAME="${LLDB_PYTHON_RUNTIME_LIBRARY_FILENAME}")
message(STATUS "lldbHost: -DLLDB_PYTHON_RUNTIME_LIBRARY_FILENAME=\"${LLDB_PYTHON_RUNTIME_LIBRARY_FILENAME}\"")
else()
message(STATUS "lldbHost: LLDB_PYTHON_RUNTIME_LIBRARY_FILENAME is NOT defined in this scope")
endif()
if (DEFINED LLDB_PYTHON_DLL_RELATIVE_PATH)
target_compile_definitions(lldbHost PRIVATE
LLDB_PYTHON_DLL_RELATIVE_PATH="${LLDB_PYTHON_DLL_RELATIVE_PATH}")
message(STATUS "lldbHost: -DLLDB_PYTHON_DLL_RELATIVE_PATH=\"${LLDB_PYTHON_DLL_RELATIVE_PATH}\"")
else()
message(STATUS "lldbHost: LLDB_PYTHON_DLL_RELATIVE_PATH is NOT defined in this scope")
endif()
endif()