[llvm] r244767 - Use /Zc:inline when building with MSVC.

Reid Kleckner via llvm-commits llvm-commits at lists.llvm.org
Thu Aug 13 09:42:19 PDT 2015


Fixed in r244908 and r244910 by removing the static. It follows the pattern
used in the DLL thunk files and Chromium.

On Thu, Aug 13, 2015 at 9:27 AM, Reid Kleckner <rnk at google.com> wrote:

> Apparently /Zc:inline causes this bit of data to be discarded:
>
> // Put a pointer to __asan_set_seh_filter at the end of the global list
> // of C initializers, after the default EH is set by the CRT.
> #pragma section(".CRT$XIZ", long, read)  // NOLINT
> static __declspec(allocate(".CRT$XIZ"))
>     int (*__intercept_seh)() = __asan_set_seh_filter;
> #endif
>
> This means the unhandled exception filter doesn't get installed at
> startup. I guess we can slap USED on more globals to fix it.
>
> On Thu, Aug 13, 2015 at 9:04 AM, Reid Kleckner <rnk at google.com> wrote:
>
>> Reverting this change makes the tests pass.
>>
>> On Wed, Aug 12, 2015 at 10:38 PM, Reid Kleckner <rnk at google.com> wrote:
>>
>>> Hm, I did misblame it. Still, the build with your fix has the test
>>> failures that we see at head:
>>> http://lab.llvm.org:8011/builders/sanitizer-windows/builds/8278
>>>
>>> The changes since then are Chandler's alias analysis stuff, which could
>>> be related but is unlikely.
>>>
>>> Anyway, I'll look into it tomorrow.
>>>
>>> On Wed, Aug 12, 2015 at 6:16 PM, Rafael EspĂ­ndola <
>>> rafael.espindola at gmail.com> wrote:
>>>
>>>> It is now linking:
>>>>
>>>>
>>>> http://lab.llvm.org:8011/builders/sanitizer-windows/builds/8313/steps/run%20tests/logs/stdio
>>>>
>>>> Kostya, was there any semantic value in the function being marked
>>>> always_inline?
>>>>
>>>>
>>>> On 12 August 2015 at 20:22, Reid Kleckner <rnk at google.com> wrote:
>>>> > This broke the winasan tests:
>>>> > http://lab.llvm.org:8011/builders/sanitizer-windows/builds/8274
>>>> >
>>>> > The alwaysinline tweak didn't seem to fix it.
>>>> >
>>>> > On Wed, Aug 12, 2015 at 10:09 AM, Rafael Espindola via llvm-commits
>>>> > <llvm-commits at lists.llvm.org> wrote:
>>>> >>
>>>> >> Author: rafael
>>>> >> Date: Wed Aug 12 12:09:25 2015
>>>> >> New Revision: 244767
>>>> >>
>>>> >> URL: http://llvm.org/viewvc/llvm-project?rev=244767&view=rev
>>>> >> Log:
>>>> >> Use /Zc:inline when building with MSVC.
>>>> >>
>>>> >> This reduces the total .obj size when building llvm from
>>>> >> 496,690,342 to 219,334,936 bytes.
>>>> >>
>>>> >> Modified:
>>>> >>     llvm/trunk/cmake/modules/HandleLLVMOptions.cmake
>>>> >>
>>>> >> Modified: llvm/trunk/cmake/modules/HandleLLVMOptions.cmake
>>>> >> URL:
>>>> >>
>>>> http://llvm.org/viewvc/llvm-project/llvm/trunk/cmake/modules/HandleLLVMOptions.cmake?rev=244767&r1=244766&r2=244767&view=diff
>>>> >>
>>>> >>
>>>> ==============================================================================
>>>> >> --- llvm/trunk/cmake/modules/HandleLLVMOptions.cmake (original)
>>>> >> +++ llvm/trunk/cmake/modules/HandleLLVMOptions.cmake Wed Aug 12
>>>> 12:09:25
>>>> >> 2015
>>>> >> @@ -348,6 +348,8 @@ if( MSVC )
>>>> >>      append("${flag}" CMAKE_C_FLAGS CMAKE_CXX_FLAGS)
>>>> >>    endforeach(flag)
>>>> >>
>>>> >> +  append("/Zc:inline" CMAKE_C_FLAGS CMAKE_CXX_FLAGS)
>>>> >> +
>>>> >>    # Disable sized deallocation if the flag is supported. MSVC fails
>>>> to
>>>> >> compile
>>>> >>    # the operator new overload in User otherwise.
>>>> >>    check_c_compiler_flag("/WX /Zc:sizedDealloc-"
>>>> SUPPORTS_SIZED_DEALLOC)
>>>> >>
>>>> >>
>>>> >> _______________________________________________
>>>> >> 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/20150813/714e5ce9/attachment.html>


More information about the llvm-commits mailing list