From 084a65d6a9b316571557451a287c06d9dcbf58c8 Mon Sep 17 00:00:00 2001 From: Matthew Leibowitz Date: Tue, 24 Jan 2017 17:03:19 -0500 Subject: [PATCH] Updated gyp config to optimize for size and linking --- gyp/common_conditions.gypi | 8 +++++++- gyp/common_variables.gypi | 2 +- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/gyp/common_conditions.gypi b/gyp/common_conditions.gypi index be31266..a86ed0c 100644 --- a/gyp/common_conditions.gypi +++ b/gyp/common_conditions.gypi @@ -437,6 +437,8 @@ 'Release': { 'cflags': [ '-O<(skia_release_optimization_level)', + '-ffunction-sections', + '-fdata-sections', ], 'defines': [ 'NDEBUG' ], }, @@ -625,7 +627,11 @@ ], 'configurations': { 'Release': { - 'cflags': ['-O2'], + 'cflags': [ + '-O<(skia_release_optimization_level)', + '-ffunction-sections', + '-fdata-sections', + ], 'conditions': [ [ 'skia_clang_build', { 'cflags!': ['-g'], diff --git a/gyp/common_variables.gypi b/gyp/common_variables.gypi index 9fef11b..9280c47 100644 --- a/gyp/common_variables.gypi +++ b/gyp/common_variables.gypi @@ -156,7 +156,7 @@ # These variables determine the default optimization level for different # compilers. 'skia_default_vs_optimization_level': 3, # full (/Ox) - 'skia_default_gcc_optimization_level': 3, # -O3 + 'skia_default_gcc_optimization_level': 's', # -O3 }, 'conditions': [ -- 2.7.4