Skip to content

Commit

Permalink
dpu: generic: force lldb-server to use dpu triple
Browse files Browse the repository at this point in the history
  • Loading branch information
Romaric JODIN committed Jul 15, 2019
1 parent d197b49 commit d35bbb8
Show file tree
Hide file tree
Showing 4 changed files with 28 additions and 2 deletions.
22 changes: 22 additions & 0 deletions source/Host/CMakeLists.txt
Expand Up @@ -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()
4 changes: 4 additions & 0 deletions source/Host/common/HostInfoBase.cpp
Expand Up @@ -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();
Expand Down
2 changes: 1 addition & 1 deletion source/Plugins/Process/Dpu/CMakeLists.txt
Expand Up @@ -10,7 +10,7 @@ add_lldb_library(lldbPluginProcessDpu PLUGIN

LINK_LIBS
lldbCore
lldbHost
lldbHostDpu
lldbSymbol
lldbTarget
lldbUtility
Expand Down
2 changes: 1 addition & 1 deletion tools/lldb-server/CMakeLists.txt
Expand Up @@ -85,7 +85,7 @@ add_lldb_tool(lldb-server-dpu INCLUDE_IN_SUITE
LINK_LIBS
lldbBase
lldbCore
lldbHost
lldbHostDpu
lldbInitialization
lldbInterpreter
${LLDB_PLUGINS}
Expand Down

0 comments on commit d35bbb8

Please sign in to comment.