[PATCH] D47829: [Driver] Accept the -fno-shrink-wrap option for GCC compatibility

Simon Dardis via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Tue Jun 12 03:28:53 PDT 2018


sdardis added a comment.

In https://reviews.llvm.org/D47829#1124040, @efriedma wrote:

> Is this something which is actually useful to control?  From your description, you want to add the flag to clang not because you actually want to use it, but just because you can't figure out how to pass the right flags to your clang build.
>
> If it is useful, it should be implemented as a function attribute, not a global flag.


This is useful to control in the sense of being able to opt-in or opt-out of the shrink wrapping pass for clang, especially in the cases of where we might discover a triggerable bug in a released version of clang.

Currently, the compiler-rt sanitizer tests make use of the CMAKE_C_FLAGS and CMAKE_CXX_FLAGS when generating the test objects. Working around this would require stripping the incompatible arguments from those variables when building the test objects. This seems to me to worse choice, as I'm also posting a patch to automatically add -fno-shrink-wrap when building LLVM with GCC for MIPS (https://reviews.llvm.org/D48069).


Repository:
  rC Clang

https://reviews.llvm.org/D47829





More information about the cfe-commits mailing list