r312595 - [Darwin] Enable -fstack-protector (back) by default with -ffreestanding

Joerg Sonnenberger via cfe-commits cfe-commits at lists.llvm.org
Tue Sep 5 16:58:17 PDT 2017


On Tue, Sep 05, 2017 at 11:50:58PM -0000, Bruno Cardoso Lopes via cfe-commits wrote:
> Modified: cfe/trunk/lib/Driver/ToolChains/Clang.cpp
> URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Driver/ToolChains/Clang.cpp?rev=312595&r1=312594&r2=312595&view=diff
> ==============================================================================
> --- cfe/trunk/lib/Driver/ToolChains/Clang.cpp (original)
> +++ cfe/trunk/lib/Driver/ToolChains/Clang.cpp Tue Sep  5 16:50:58 2017
> @@ -2302,11 +2302,6 @@ static void RenderSSPOptions(const ToolC
>      else if (A->getOption().matches(options::OPT_fstack_protector_all))
>        StackProtectorLevel = LangOptions::SSPReq;
>    } else {
> -    // Only use a default stack protector on Darwin in case -ffreestanding is
> -    // not specified.
> -    if (EffectiveTriple.isOSDarwin() && !IsHosted)
> -      StackProtectorLevel = 0;
> -    else
>        StackProtectorLevel = DefaultStackProtectorLevel;
>    }

Indentation?

Joerg


More information about the cfe-commits mailing list