[Lldb-commits] [lldb] r211123 - Fix up lldb cmake linker flags for MacOSX.

Todd Fiala todd.fiala at gmail.com
Tue Jun 17 13:54:56 PDT 2014


Author: tfiala
Date: Tue Jun 17 15:54:56 2014
New Revision: 211123

URL: http://llvm.org/viewvc/llvm-project?rev=211123&view=rev
Log:
Fix up lldb cmake linker flags for MacOSX.

Change r210035 broke the Darwin cmake build.  The
initial change was intended to stop the --start-group/--end-group
linker flags from being passed to non-gcc/clang-looking compilers,
stopping MSVC from warning on linking.  That change, however,
caused MacOSX cmake-based builds to start using the --start-group/
--end-group flags, even though the MacOSX linker doesn't support
them.  That broke the MacOSX clang build.

The fix keeps the newer check for a gcc-compatible compiler, but
specifically excludes MacOSX.

Modified:
    lldb/trunk/CMakeLists.txt

Modified: lldb/trunk/CMakeLists.txt
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/CMakeLists.txt?rev=211123&r1=211122&r2=211123&view=diff
==============================================================================
--- lldb/trunk/CMakeLists.txt (original)
+++ lldb/trunk/CMakeLists.txt Tue Jun 17 15:54:56 2014
@@ -218,7 +218,8 @@ macro(add_lldb_library name)
   endif ()
 
   if(LLDB_USED_LIBS)
-    if (LLVM_COMPILER_IS_GCC_COMPATIBLE)
+    # The Darwin linker doesn't understand --start-group/--end-group.
+    if (LLVM_COMPILER_IS_GCC_COMPATIBLE AND NOT "${CMAKE_SYSTEM_NAME}" MATCHES "Darwin")
       target_link_libraries(${name} ${cmake_2_8_12_PUBLIC}
                             -Wl,--start-group ${LLDB_USED_LIBS} -Wl,--end-group)
     else()





More information about the lldb-commits mailing list