Fixes compilation error when BUILD_SHARED_LIBS is turned on for Linux x86_64.
Details
Diff Detail
Event Timeline
source/CMakeLists.txt | ||
---|---|---|
34–36 | Should this go into add_lldb_library instead? In other words, change this: if (MODULE) set(libkind MODULE) elseif (SHARED_LIBRARY) set(libkind SHARED) else() set(libkind STATIC) endif() to this: if (MODULE) set(libkind MODULE) elseif (BUILD_SHARED_LIBS) set(libkind SHARED) else() set(libkind STATIC) endif() | |
tools/lldb-gdbserver/CMakeLists.txt | ||
20–23 | I would rather call add_lldb_executable() and target_link_libraries() in one place. Instead use the if statement to build the source file list and the link library list. Then after the if statement, call each one. | |
41–44 | We don't need any of these 3 lines when BUILD_SHARED_LIBS is true? |
What's the status of this? If it has been committed, can we close this? If not, is it abandoned?
Fixes compilation/run error with BUILD_SHARED_LIBS=TRUE
Summary:
BUILD_SHARED_LIBS=TRUE currently isn't working for Linux x86_64
This patch fixes the link errors and also some runtime errors
Test Plan:
CC=clang CXX=clang++ cmake -GNinja -DBUILD_SHARED_LIBS=TRUE -DCMAKE_LINKER=ld.gold -DCMAKE_BUILD_TYPE=Debug ../../llvm
ninja
ninja check-lldb
Should this go into add_lldb_library instead?
In other words, change this:
to this: