This is an archive of the discontinued LLVM Phabricator instance.

Fix bug 21670
ClosedPublic

Authored by vharron on Dec 2 2014, 6:37 AM.

Details

Summary

Fixes compilation error when BUILD_SHARED_LIBS is turned on for Linux x86_64.

Diff Detail

Event Timeline

achien_bsi updated this revision to Diff 16808.Dec 2 2014, 6:37 AM
achien_bsi retitled this revision from to Fix bug 21670.
achien_bsi updated this object.
achien_bsi edited the test plan for this revision. (Show Details)
achien_bsi added reviewers: ismail, zturner, vharron.
achien_bsi added a subscriber: Unknown Object (MLST).
ismail edited edge metadata.Dec 2 2014, 7:02 AM

Fix works for me.

vharron edited edge metadata.Dec 2 2014, 7:57 AM

Thanks Andy!

zturner added inline comments.Dec 2 2014, 1:43 PM
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?

zturner edited edge metadata.Jan 5 2015, 9:33 AM

What's the status of this? If it has been committed, can we close this? If not, is it abandoned?

ismail added a comment.Jan 9 2015, 4:18 AM

This is still not committed and without this shared build would be broken
again.

I'll look at this today if possible.

vharron commandeered this revision.Jan 13 2015, 11:15 AM
vharron edited reviewers, added: achien_bsi; removed: vharron.
vharron updated this revision to Diff 18099.Jan 13 2015, 11:18 AM
vharron edited the test plan for this revision. (Show Details)
vharron edited edge metadata.

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

vharron updated this revision to Diff 18101.Jan 13 2015, 11:20 AM

Removed some debug code

vharron accepted this revision.Feb 18 2015, 3:24 PM
vharron added a reviewer: vharron.

Committed r226039

This revision is now accepted and ready to land.Feb 18 2015, 3:24 PM
vharron closed this revision.Feb 18 2015, 3:25 PM