From d35bbb8376096fd3ab3047b1c5ec507c96731deb Mon Sep 17 00:00:00 2001 From: Romaric JODIN Date: Fri, 14 Jun 2019 13:17:58 +0200 Subject: [PATCH] dpu: generic: force lldb-server to use dpu triple --- source/Host/CMakeLists.txt | 22 ++++++++++++++++++++++ source/Host/common/HostInfoBase.cpp | 4 ++++ source/Plugins/Process/Dpu/CMakeLists.txt | 2 +- tools/lldb-server/CMakeLists.txt | 2 +- 4 files changed, 28 insertions(+), 2 deletions(-) diff --git a/source/Host/CMakeLists.txt b/source/Host/CMakeLists.txt index 5a92447edf..18eb9f994c 100644 --- a/source/Host/CMakeLists.txt +++ b/source/Host/CMakeLists.txt @@ -174,3 +174,25 @@ add_lldb_library(lldbHost Object Support ) + +if(HAVE_LIBDPU) + +add_lldb_library(lldbHostDpu + ${HOST_SOURCES} + + LINK_LIBS + lldbCore + lldbSymbol + lldbTarget + lldbUtility + ${EXTRA_LIBS} + ${LLDBObjCLibs} + + LINK_COMPONENTS + Object + Support + ) + +target_compile_options(lldbHostDpu PRIVATE -DUSE_DPU) + +endif() diff --git a/source/Host/common/HostInfoBase.cpp b/source/Host/common/HostInfoBase.cpp index 4de6953a91..60c15f7efc 100644 --- a/source/Host/common/HostInfoBase.cpp +++ b/source/Host/common/HostInfoBase.cpp @@ -295,7 +295,11 @@ bool HostInfoBase::ComputeUserPluginsDirectory(FileSpec &file_spec) { void HostInfoBase::ComputeHostArchitectureSupport(ArchSpec &arch_32, ArchSpec &arch_64) { +#if defined(USE_DPU) + llvm::Triple triple("dpu-upmem-dpurte"); +#else llvm::Triple triple(llvm::sys::getProcessTriple()); +#endif arch_32.Clear(); arch_64.Clear(); diff --git a/source/Plugins/Process/Dpu/CMakeLists.txt b/source/Plugins/Process/Dpu/CMakeLists.txt index d826ccdd8a..fe7f4c2fe6 100644 --- a/source/Plugins/Process/Dpu/CMakeLists.txt +++ b/source/Plugins/Process/Dpu/CMakeLists.txt @@ -10,7 +10,7 @@ add_lldb_library(lldbPluginProcessDpu PLUGIN LINK_LIBS lldbCore - lldbHost + lldbHostDpu lldbSymbol lldbTarget lldbUtility diff --git a/tools/lldb-server/CMakeLists.txt b/tools/lldb-server/CMakeLists.txt index 9ca975532e..6672927476 100644 --- a/tools/lldb-server/CMakeLists.txt +++ b/tools/lldb-server/CMakeLists.txt @@ -85,7 +85,7 @@ add_lldb_tool(lldb-server-dpu INCLUDE_IN_SUITE LINK_LIBS lldbBase lldbCore - lldbHost + lldbHostDpu lldbInitialization lldbInterpreter ${LLDB_PLUGINS}