[Lldb-commits] [PATCH] Fix bug 21670

Zachary Turner zturner at google.com
Tue Dec 2 13:43:26 PST 2014


================
Comment at: source/CMakeLists.txt:34-36
@@ -33,1 +33,5 @@
+
+if (BUILD_SHARED_LIBS)
+  set(SHARED_LIBRARY 1)
+endif()
 add_subdirectory(Breakpoint)
----------------
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()

================
Comment at: tools/lldb-gdbserver/CMakeLists.txt:20-23
@@ -19,8 +19,6 @@
 
-# have to include lldb and lldb-log files since those are not libraries and llgs depends on them
-add_lldb_executable(lldb-gdbserver
-  lldb-gdbserver.cpp
-  ../../source/lldb-log.cpp
-  ../../source/lldb.cpp
-  )
+if ( BUILD_SHARED_LIBS )
+  add_lldb_executable(lldb-gdbserver
+    lldb-gdbserver.cpp
+    )
 
----------------
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.  

================
Comment at: tools/lldb-gdbserver/CMakeLists.txt:41-44
@@ -33,1 +40,6 @@
+  endif()
+  target_link_libraries(lldb-gdbserver ${CLANG_USED_LIBS})
+  llvm_config(lldb-gdbserver ${LLVM_LINK_COMPONENTS})
+
+  target_link_libraries(lldb-gdbserver ${LLDB_SYSTEM_LIBS})
 endif()
----------------
We don't need any of these 3 lines when BUILD_SHARED_LIBS is true?

http://reviews.llvm.org/D6479






More information about the lldb-commits mailing list