[cfe-dev] Some clang benchmarking on Windows

Francois Pichet pichet2000 at gmail.com
Mon Oct 11 13:22:29 PDT 2010


On Mon, Oct 11, 2010 at 4:12 PM, Óscar Fuentes <ofv at wanadoo.es> wrote:
>
> That's trivial. Try this patch and see if the results warrants a new
> cmake option for supporting LTO on MSVC:
>
> diff --git a/CMakeLists.txt b/CMakeLists.txt
> index d473f51..0f1bb24 100644
> --- a/CMakeLists.txt
> +++ b/CMakeLists.txt
> @@ -224,6 +224,7 @@ if( MSVC )
>   add_llvm_definitions( -D_SCL_SECURE_NO_DEPRECATE )
>   add_llvm_definitions( -wd4146 -wd4503 -wd4996 -wd4800 -wd4244 -wd4624 )
>   add_llvm_definitions( -wd4355 -wd4715 -wd4180 -wd4345 -wd4224 )
> +  add_llvm_definitions( /GL )
>
>   # Suppress 'new behavior: elements of array 'array' will be default initialized'
>   add_llvm_definitions( -wd4351 )
>

ok but if you give /GL to the compiler you need to give /LTCG to the
linker.. how do u do that?




More information about the cfe-dev mailing list