[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
Sat Jul 15 21:41:14 PDT 2017


Apologies, I couldn't figure out the issue.
Feel free to revert my change.

Sent from my iPhone

> On Jul 15, 2017, at 18:13, Vitaly Buka <vitalybuka at google.com> wrote:
> 
> FYI: I had to disable TSAN test because of this change 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> 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
>> Log:
>> [compiler-rt] [CMake] Build compiler-rt with no optimizations if the flag says so
>> 
>> Differential Revision: 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
>> ==============================================================================
>> --- 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
>> 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/20170715/42b9eff5/attachment.html>


More information about the llvm-commits mailing list