[compiler-rt] r225049 - Avoid building compiler-rt with LTO.

David Blaikie dblaikie at gmail.com
Fri Jan 2 13:36:31 PST 2015


On Fri, Jan 2, 2015 at 1:34 PM, Alexey Samsonov <vonosmas at gmail.com> wrote:

> Alright. Do you think we should fix Clang so that "clang -fno-lto foo.S"
> doesn't print warnings?
>

Probably, though I don't feel sufficiently informed about flag
naming/behavior/etc to make that call myself.


>
> On Fri, Jan 2, 2015 at 1:31 PM, David Blaikie <dblaikie at gmail.com> wrote:
>
>>
>>
>> On Fri, Jan 2, 2015 at 1:28 PM, Alexey Samsonov <vonosmas at gmail.com>
>> wrote:
>>
>>> clang-3.4? Do you use ToT Clang for that build?
>>>
>>
>> I rebuilt & installed ToT. It's just the CMake build never bothers to
>> update the binary name once it's configured:
>>
>> $ clang --version
>> clang version 3.6.0 (trunk 225013) (llvm/trunk 225080)
>> Target: x86_64-unknown-linux-gnu
>> Thread model: posix
>> $ which clang
>> /usr/local/google/home/blaikie/install/bin/clang
>> $ ll `which clang`
>> lrwxrwxrwx 1 blaikie eng 9 Sep 18 20:07
>> /usr/local/google/home/blaikie/install/bin/clang -> clang-3.4*
>>
>>
>>>
>>> FWIW, I think the driver shouldn't print unused-argument warning in this
>>> case.
>>>
>>> On Fri, Jan 2, 2015 at 11:22 AM, David Blaikie <dblaikie at gmail.com>
>>> wrote:
>>>
>>>> Seems to be breaking my build?
>>>>
>>>> [54/816] Building C object
>>>> projects/compiler-rt/lib/tsan/CMakeFiles/clang_rt.tsan-x86_64.dir/rtl/tsan_rtl_amd64.S.o
>>>> FAILED: /usr/local/google/home/blaikie/install/bin/clang  -D_DEBUG
>>>> -D_GNU_SOURCE -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS
>>>> -D__STDC_LIMIT_MACROS -fcolor-diagnostics -fPIC -Wall -W
>>>> -Wno-unused-parameter -Wwrite-strings -Wmissing-field-initializers
>>>> -pedantic -Wno-long-long -Wcovered-switch-default -Werror
>>>> -fcolor-diagnostics -ffunction-sections -fdata-sections -Wall -Werror -g
>>>> -Iprojects/compiler-rt/lib/tsan
>>>> -I/usr/local/google/home/blaikie/dev/llvm/src/projects/compiler-rt/lib/tsan
>>>> -Iinclude -I/usr/local/google/home/blaikie/dev/llvm/src/include
>>>> -I/usr/local/google/home/blaikie/dev/llvm/src/projects/compiler-rt/lib/tsan/..
>>>>    -gsplit-dwarf  -m64 -fPIC -fno-builtin -fno-exceptions
>>>> -fomit-frame-pointer -funwind-tables -fno-stack-protector
>>>> -fvisibility=hidden -fno-function-sections -fno-lto -O3 -gline-tables-only
>>>> -Wno-gnu -Wno-variadic-macros -Wno-c99-extensions -Wno-non-virtual-dtor
>>>> -fPIE -fno-rtti -Wframe-larger-than=512 -Wglobal-constructors -MMD -MT
>>>> projects/compiler-rt/lib/tsan/CMakeFiles/clang_rt.tsan-x86_64.dir/rtl/tsan_rtl_amd64.S.o
>>>> -MF
>>>> projects/compiler-rt/lib/tsan/CMakeFiles/clang_rt.tsan-x86_64.dir/rtl/tsan_rtl_amd64.S.o.d
>>>> -o
>>>> projects/compiler-rt/lib/tsan/CMakeFiles/clang_rt.tsan-x86_64.dir/rtl/tsan_rtl_amd64.S.o
>>>>   -c
>>>> /usr/local/google/home/blaikie/dev/llvm/src/projects/compiler-rt/lib/tsan/rtl/tsan_rtl_amd64.S
>>>> clang-3.4: error: argument unused during compilation: '-fno-lto'
>>>>
>>>> On Wed, Dec 31, 2014 at 10:20 AM, Rafael Espindola <
>>>> rafael.espindola at gmail.com> wrote:
>>>>
>>>>> Author: rafael
>>>>> Date: Wed Dec 31 12:20:52 2014
>>>>> New Revision: 225049
>>>>>
>>>>> URL: http://llvm.org/viewvc/llvm-project?rev=225049&view=rev
>>>>> Log:
>>>>> Avoid building compiler-rt with LTO.
>>>>>
>>>>> During a LTO we still need to build a compiler_rt with regular object
>>>>> files
>>>>> in the .a.
>>>>>
>>>>> Modified:
>>>>>     compiler-rt/trunk/CMakeLists.txt
>>>>>     compiler-rt/trunk/cmake/config-ix.cmake
>>>>>
>>>>> Modified: compiler-rt/trunk/CMakeLists.txt
>>>>> URL:
>>>>> http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/CMakeLists.txt?rev=225049&r1=225048&r2=225049&view=diff
>>>>>
>>>>> ==============================================================================
>>>>> --- compiler-rt/trunk/CMakeLists.txt (original)
>>>>> +++ compiler-rt/trunk/CMakeLists.txt Wed Dec 31 12:20:52 2014
>>>>> @@ -231,6 +231,7 @@ append_list_if(COMPILER_RT_HAS_FUNWIND_T
>>>>>  append_list_if(COMPILER_RT_HAS_FNO_STACK_PROTECTOR_FLAG
>>>>> -fno-stack-protector SANITIZER_COMMON_CFLAGS)
>>>>>  append_list_if(COMPILER_RT_HAS_FVISIBILITY_HIDDEN_FLAG
>>>>> -fvisibility=hidden SANITIZER_COMMON_CFLAGS)
>>>>>  append_list_if(COMPILER_RT_HAS_FNO_FUNCTION_SECTIONS_FLAG
>>>>> -fno-function-sections SANITIZER_COMMON_CFLAGS)
>>>>> +append_list_if(COMPILER_RT_HAS_FNO_LTO_FLAG -fno-lto
>>>>> SANITIZER_COMMON_CFLAGS)
>>>>>
>>>>>  if(MSVC)
>>>>>    # Replace the /MD[d] flags with /MT.
>>>>>
>>>>> Modified: compiler-rt/trunk/cmake/config-ix.cmake
>>>>> URL:
>>>>> http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/cmake/config-ix.cmake?rev=225049&r1=225048&r2=225049&view=diff
>>>>>
>>>>> ==============================================================================
>>>>> --- compiler-rt/trunk/cmake/config-ix.cmake (original)
>>>>> +++ compiler-rt/trunk/cmake/config-ix.cmake Wed Dec 31 12:20:52 2014
>>>>> @@ -16,6 +16,7 @@ check_cxx_compiler_flag(-ffreestanding
>>>>>  check_cxx_compiler_flag("-Werror -fno-function-sections"
>>>>> COMPILER_RT_HAS_FNO_FUNCTION_SECTIONS_FLAG)
>>>>>  check_cxx_compiler_flag(-std=c++11
>>>>>  COMPILER_RT_HAS_STD_CXX11_FLAG)
>>>>>  check_cxx_compiler_flag(-ftls-model=initial-exec
>>>>> COMPILER_RT_HAS_FTLS_MODEL_INITIAL_EXEC)
>>>>> +check_cxx_compiler_flag(-fno-lto
>>>>>  COMPILER_RT_HAS_FNO_LTO_FLAG)
>>>>>
>>>>>  check_cxx_compiler_flag(/GR COMPILER_RT_HAS_GR_FLAG)
>>>>>  check_cxx_compiler_flag(/GS COMPILER_RT_HAS_GS_FLAG)
>>>>>
>>>>>
>>>>> _______________________________________________
>>>>> llvm-commits mailing list
>>>>> llvm-commits at cs.uiuc.edu
>>>>> http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits
>>>>>
>>>>
>>>>
>>>> _______________________________________________
>>>> llvm-commits mailing list
>>>> llvm-commits at cs.uiuc.edu
>>>> http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits
>>>>
>>>>
>>>
>>>
>>> --
>>> Alexey Samsonov
>>> vonosmas at gmail.com
>>>
>>
>>
>
>
> --
> Alexey Samsonov
> vonosmas at gmail.com
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20150102/4ad377aa/attachment.html>


More information about the llvm-commits mailing list