From 2fa44cf326799b1f56db3e83b35fbecce45153fd Mon Sep 17 00:00:00 2001 From: Leon Krause Date: Sat, 10 Feb 2018 03:29:18 +0100 Subject: [PATCH] Enable default linker optimisations in MSVC release and minsize builds --- mesonbuild/compilers/compilers.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/mesonbuild/compilers/compilers.py b/mesonbuild/compilers/compilers.py index dbaf7309f..034fef4eb 100644 --- a/mesonbuild/compilers/compilers.py +++ b/mesonbuild/compilers/compilers.py @@ -137,8 +137,11 @@ gnulike_buildtype_linker_args = {'plain': [], msvc_buildtype_linker_args = {'plain': [], 'debug': [], 'debugoptimized': [], - 'release': [], - 'minsize': ['/INCREMENTAL:NO'], + # The otherwise implicit REF and ICF linker + # optimisations are disabled by /DEBUG. + # REF implies ICF. + 'release': ['/OPT:REF'], + 'minsize': ['/INCREMENTAL:NO', '/OPT:REF'], } java_buildtype_args = {'plain': [],