[compiler-rt] r308072 - [compiler-rt] [CMake] Build compiler-rt with no optimizations if the flag says so

George Karpenkov via llvm-commits llvm-commits at lists.llvm.org
Mon Jul 17 11:54:04 PDT 2017


OK if there are both bots maybe it’s best to leave it in then.

Thanks!
> On Jul 17, 2017, at 11:52 AM, Vitaly Buka <vitalybuka at google.com> wrote:
> 
> Oh, I forgot to add link to the failure. http://lab.llvm.org:8011/builders/sanitizer-x86_64-linux-autoconf/builds/11071 <http://lab.llvm.org:8011/builders/sanitizer-x86_64-linux-autoconf/builds/11071>
> Same bot runs both, opt and no-opt for tsan. I am not aware about debug bots for other sanitizers.
> 
> I am OK either way, if you leave it as is or if you revert it.
> 
> 
> On Mon, Jul 17, 2017 at 11:36 AM, George Karpenkov <ekarpenkov at apple.com <mailto:ekarpenkov at apple.com>> wrote:
> 
>> On Jul 17, 2017, at 11:28 AM, Vitaly Buka <vitalybuka at google.com <mailto:vitalybuka at google.com>> wrote:
>> 
>> I believe it has nothing to do with buildbot.
>> If we have option to set COMPILER_RT_DEBUG=True, all test must pass.
>> Also it's not about debug symbols but about optimization.
> 
> I agree, I was just not sure whether we have a buildbot with COMPILER_RT_DEBUG set to off.
> If we don’t, then the test would not be exercised in CI.
> 
> It might even make more sense to rollback my commit https://reviews.llvm.org/D35400 <https://reviews.llvm.org/D35400> instead,
> but then there would be no available configuration to have unoptimized compiler-rt with debug
> symbols bundled with an optimized build of a compiler.
> 
> 
>> 
>> On Mon, Jul 17, 2017 at 11:26 AM, George Karpenkov <ekarpenkov at apple.com <mailto:ekarpenkov at apple.com>> wrote:
>> Hi Vitaly,
>> 
>> I saw your fix, but I’m not sure that’s the correct way to go:
>> why is the buildbot configured with COMPILER_RT_DEBUG=True in the first place?
>> If tests only pass on optimized compiler runtime (which is also a bit confusing in itself),
>> wouldn’t it make more sense not ask for debug symbols in it on a buildbot?
>> 
>> 
>>> On Jul 15, 2017, at 6:13 PM, Vitaly Buka <vitalybuka at google.com <mailto:vitalybuka at google.com>> wrote:
>>> 
>>> FYI: I had to disable TSAN test because of this change https://reviews.llvm.org/rL308121 <https://reviews.llvm.org/rL308121>
>>> 
>>> On Fri, Jul 14, 2017 at 5:30 PM, George Karpenkov via llvm-commits <llvm-commits at lists.llvm.org <mailto:llvm-commits at lists.llvm.org>> wrote:
>>> Author: george.karpenkov
>>> Date: Fri Jul 14 17:30:46 2017
>>> New Revision: 308072
>>> 
>>> URL: http://llvm.org/viewvc/llvm-project?rev=308072&view=rev <http://llvm.org/viewvc/llvm-project?rev=308072&view=rev>
>>> Log:
>>> [compiler-rt] [CMake] Build compiler-rt with no optimizations if the flag says so
>>> 
>>> Differential Revision: https://reviews.llvm.org/D35400 <https://reviews.llvm.org/D35400>
>>> 
>>> Modified:
>>>     compiler-rt/trunk/CMakeLists.txt
>>> 
>>> Modified: compiler-rt/trunk/CMakeLists.txt
>>> URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/CMakeLists.txt?rev=308072&r1=308071&r2=308072&view=diff <http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/CMakeLists.txt?rev=308072&r1=308071&r2=308072&view=diff>
>>> ==============================================================================
>>> --- compiler-rt/trunk/CMakeLists.txt (original)
>>> +++ compiler-rt/trunk/CMakeLists.txt Fri Jul 14 17:30:46 2017
>>> @@ -172,10 +172,16 @@ endif()
>>> 
>>>  append_list_if(COMPILER_RT_DEBUG -DSANITIZER_DEBUG=1 SANITIZER_COMMON_CFLAGS)
>>> 
>>> -# Build with optimization, unless we're in debug mode. If we're using MSVC,
>>> +# If we're using MSVC,
>>>  # always respect the optimization flags set by CMAKE_BUILD_TYPE instead.
>>> -if(NOT COMPILER_RT_DEBUG AND NOT MSVC)
>>> -  list(APPEND SANITIZER_COMMON_CFLAGS -O3)
>>> +if (NOT MSVC)
>>> +
>>> +  # Build with optimization, unless we're in debug mode.
>>> +  if(COMPILER_RT_DEBUG)
>>> +    list(APPEND SANITIZER_COMMON_CFLAGS -O0)
>>> +  else()
>>> +    list(APPEND SANITIZER_COMMON_CFLAGS -O3)
>>> +  endif()
>>>  endif()
>>> 
>>>  # Determine if we should restrict stack frame sizes.
>>> 
>>> 
>>> _______________________________________________
>>> llvm-commits mailing list
>>> llvm-commits at lists.llvm.org <mailto:llvm-commits at lists.llvm.org>
>>> http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-commits <http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-commits>
>>> 
>> 
>> 
> 
> 

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20170717/b18fb9de/attachment.html>


More information about the llvm-commits mailing list