From aeddd8bb19a2d716755ab9ee94aa0f1671eea8f5 Mon Sep 17 00:00:00 2001 From: Todd Fiala Date: Tue, 17 Jun 2014 20:54:56 +0000 Subject: [PATCH] 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. llvm-svn: 211123 --- lldb/CMakeLists.txt | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lldb/CMakeLists.txt b/lldb/CMakeLists.txt index bad83e8..4cfa1d9 100644 --- a/lldb/CMakeLists.txt +++ b/lldb/CMakeLists.txt @@ -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() -- 2.7.4