Commit 05603bb8 by Austin Kinross Committed by Jamie Madill

Add compiler/linker flags to optimize WinRT release builds

This reduces the WinRT binary sizes by up to 500KB. BUG=angleproject:1250 Change-Id: I2ce0e9597c49515fe4b414f105b03785d6ce132f Reviewed-on: https://chromium-review.googlesource.com/317595 Tryjob-Request: Austin Kinross <aukinros@microsoft.com> Reviewed-by: 's avatarGeoff Lang <geofflang@chromium.org> Reviewed-by: 's avatarJamie Madill <jmadill@chromium.org> Tested-by: 's avatarJamie Madill <jmadill@chromium.org>
parent e678b66c
...@@ -201,12 +201,18 @@ ...@@ -201,12 +201,18 @@
{ {
'VCCLCompilerTool': 'VCCLCompilerTool':
{ {
'Optimization': '2', # /Os
'RuntimeTypeInfo': 'false', 'RuntimeTypeInfo': 'false',
'conditions': 'conditions':
[ [
['angle_build_winrt==1', ['angle_build_winrt==1',
{ {
# Use Chromium's settings for 'Official' builds
# to optimize WinRT release builds
'Optimization': '1', # /O1, minimize size
'FavorSizeOrSpeed': '2', # /Os
'WholeProgramOptimization': 'true',
# Use the dynamic C runtime to match # Use the dynamic C runtime to match
# Windows Application Store requirements # Windows Application Store requirements
...@@ -217,6 +223,8 @@ ...@@ -217,6 +223,8 @@
'RuntimeLibrary': '2', # /MD (nondebug dll) 'RuntimeLibrary': '2', # /MD (nondebug dll)
}, },
{ {
'Optimization': '2', # /O2, maximize speed
# Use the static C runtime to # Use the static C runtime to
# match chromium and make sure # match chromium and make sure
# we don't depend on the dynamic # we don't depend on the dynamic
...@@ -228,6 +236,17 @@ ...@@ -228,6 +236,17 @@
{ {
'GenerateDebugInformation': '<(release_symbols)', 'GenerateDebugInformation': '<(release_symbols)',
'LinkIncremental': '1', 'LinkIncremental': '1',
'conditions':
[
['angle_build_winrt==1',
{
# Use Chromium's settings for 'Official' builds
# to optimize WinRT release builds
'LinkTimeCodeGeneration': '1',
'AdditionalOptions': ['/cgthreads:8'],
}],
],
}, },
}, },
}, # Release_Base }, # Release_Base
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment