[Lldb-commits] [lldb] r210035 - Fix most of the remaining Windows build warnings.

Todd Fiala tfiala at google.com
Tue Jun 17 11:33:14 PDT 2014


Hey Ed - can you test this out on FreeBSD?  This is a patch that fixes
cmake on MacOSX.  I verified it works on MacOSX and Linux with cmake/ninja.

The original code looks like it was opting in for the
--start-group/--end-group linker options on FreeBSD, which this patch would
change but might be a no-op on your end.

Thanks!

Index: CMakeLists.txt
===================================================================
--- CMakeLists.txt (revision 211105)
+++ CMakeLists.txt (working copy)
@@ -218,7 +218,7 @@
   endif ()

   if(LLDB_USED_LIBS)
-    if (LLVM_COMPILER_IS_GCC_COMPATIBLE)
+    if (LLVM_COMPILER_IS_GCC_COMPATIBLE AND NOT "${CMAKE_CXX_COMPILER_ID}"
MATCHES "[Cc]lang")
       target_link_libraries(${name} ${cmake_2_8_12_PUBLIC}
                             -Wl,--start-group ${LLDB_USED_LIBS}
-Wl,--end-group)
     else()



-Todd



On Tue, Jun 17, 2014 at 10:48 AM, Todd Fiala <tfiala at google.com> wrote:

> I've been able to replicate with:
> 1. sync llvm, llvm/tools/clang, llvm/tools/lldb into llvm/
> 2. mkdir build && cd build
> 3. cmake -GNinja ../llvm
> 4. ninja
>
> On MacOSX 10.9.3 and cmake 3.0.0 with ninja head of git repo.
>
> Working on a fix now.
>
>
> On Tue, Jun 17, 2014 at 9:03 AM, Todd Fiala <tfiala at google.com> wrote:
>
>> Okay thanks.  I'll work on fixing that up today.
>>
>>
>> On Mon, Jun 16, 2014 at 8:05 PM, Kuba Břečka <kuba.brecka at gmail.com>
>> wrote:
>>
>>> Thanks, here's the message:
>>>
>>> Linking CXX shared library ../../../lib/liblldb.dylib
>>> ld: unknown option: --start-group
>>> clang: error: linker command failed with exit code 1 (use -v to see
>>> invocation)
>>>
>>> Kuba
>>>
>>>
>>>
>>> On Mon, Jun 16, 2014 at 7:49 PM, Todd Fiala <tfiala at google.com> wrote:
>>>
>>>> Ah I see.
>>>>
>>>> Can you send me the error output?  I'll get it fixed up.
>>>>
>>>> Thanks!
>>>>
>>>> -Todd
>>>>
>>>>
>>>> On Mon, Jun 16, 2014 at 5:45 PM, Kuba Břečka <kuba.brecka at gmail.com>
>>>> wrote:
>>>>
>>>>> Hi Todd,
>>>>> yes, it's failing on my OS X. I would too expect LLVM_COMPILER_IS_GCC_COMPATIBLE
>>>>> to be false, but HandleLLVMStdlib.cmake says otherwise:
>>>>>
>>>>>   if(CMAKE_COMPILER_IS_GNUCXX)
>>>>>     set(LLVM_COMPILER_IS_GCC_COMPATIBLE ON)
>>>>>   elseif( MSVC )
>>>>>     set(LLVM_COMPILER_IS_GCC_COMPATIBLE OFF)
>>>>>   elseif( "${CMAKE_CXX_COMPILER_ID}" MATCHES "Clang" )
>>>>>     set(LLVM_COMPILER_IS_GCC_COMPATIBLE ON)
>>>>>   endif()
>>>>>
>>>>> Kuba
>>>>>
>>>>>
>>>>>
>>>>> On Mon, Jun 16, 2014 at 5:28 PM, Todd Fiala <tfiala at google.com> wrote:
>>>>>
>>>>>> Hi Kuba,
>>>>>>
>>>>>> I've been running on both MacOSX and Linux with the change in place.
>>>>>>  On MacOSX I'm using the canonical MacOSX build, Xcode-based.  It's been a
>>>>>> while since I built MacOSX with cmake primarily because I cannot get that
>>>>>> build to run any tests successfully on my end.
>>>>>>
>>>>>> Have you tried it on OSX and it's failing?  I would expect
>>>>>> LLVM_COMPILER_IS_GCC_COMPATIBLE to be false on MacOSX and thus for the
>>>>>> check to be no change w/r/t cmake MacOSX if I read it right.
>>>>>>
>>>>>>
>>>>>> On Mon, Jun 16, 2014 at 3:08 PM, Kuba Břečka <kuba.brecka at gmail.com>
>>>>>> wrote:
>>>>>>
>>>>>>> I think this patch breaks builds on default OS X systems. Or is
>>>>>>> there anything else than just "cmake ../llvm; make" for OS X?
>>>>>>>
>>>>>>> Kuba
>>>>>>>
>>>>>>> Modified: lldb/trunk/CMakeLists.txt
>>>>>>>> URL:
>>>>>>>> http://llvm.org/viewvc/llvm-project/lldb/trunk/CMakeLists.txt?rev=210035&r1=210034&r2=210035&view=diff
>>>>>>>>
>>>>>>>> ==============================================================================
>>>>>>>> --- lldb/trunk/CMakeLists.txt (original)
>>>>>>>> +++ lldb/trunk/CMakeLists.txt Mon Jun  2 12:30:22 2014
>>>>>>>> @@ -218,9 +218,7 @@ macro(add_lldb_library name)
>>>>>>>>    endif ()
>>>>>>>>
>>>>>>>>    if(LLDB_USED_LIBS)
>>>>>>>> -    if (CMAKE_SYSTEM_NAME MATCHES "Linux" OR
>>>>>>>> -        CMAKE_SYSTEM_NAME MATCHES "FreeBSD" OR
>>>>>>>> -        CMAKE_SYSTEM_NAME MATCHES "Windows")
>>>>>>>> +    if (LLVM_COMPILER_IS_GCC_COMPATIBLE)
>>>>>>>>        target_link_libraries(${name} ${cmake_2_8_12_PUBLIC}
>>>>>>>>                              -Wl,--start-group ${LLDB_USED_LIBS}
>>>>>>>> -Wl,--end-group)
>>>>>>>>      else()
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>> _______________________________________________
>>>>>>> lldb-commits mailing list
>>>>>>> lldb-commits at cs.uiuc.edu
>>>>>>> http://lists.cs.uiuc.edu/mailman/listinfo/lldb-commits
>>>>>>>
>>>>>>>
>>>>>>
>>>>>>
>>>>>> --
>>>>>>  Todd Fiala | Software Engineer |  tfiala at google.com |  650-943-3180
>>>>>>
>>>>>
>>>>>
>>>>
>>>>
>>>> --
>>>> Todd Fiala | Software Engineer |  tfiala at google.com |  650-943-3180
>>>>
>>>
>>>
>>
>>
>> --
>> Todd Fiala | Software Engineer |  tfiala at google.com |  650-943-3180
>>
>
>
>
> --
> Todd Fiala | Software Engineer |  tfiala at google.com |  650-943-3180
>



-- 
Todd Fiala | Software Engineer | tfiala at google.com | 650-943-3180
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/lldb-commits/attachments/20140617/fd1e5afb/attachment.html>


More information about the lldb-commits mailing list