From 0cc15f7b067e14fde4539a3ca07d7d73d4da7d01 Mon Sep 17 00:00:00 2001 From: Brandon Benvie Date: Sun, 19 Aug 2012 00:13:33 -0400 Subject: [PATCH] attempt to quiet some of the compiler warnings on windows --- binding.gyp | 31 ++++++++++++++++++++++++++----- 1 file changed, 26 insertions(+), 5 deletions(-) diff --git a/binding.gyp b/binding.gyp index 032bc19d..dfbc8ce8 100644 --- a/binding.gyp +++ b/binding.gyp @@ -308,6 +308,27 @@ } }], ['OS=="win"', { + 'msvs_settings': { + 'VCCLCompilerTool': { + 'WholeProgramOptimization': 'true', # /GL, whole program optimization, needed for LTCG + 'OmitFramePointers': 'true', + 'EnableFunctionLevelLinking': 'true', + 'EnableIntrinsicFunctions': 'true', + 'RuntimeTypeInfo': 'false', + 'ExceptionHandling': '1', + }, + 'VCLibrarianTool': { + 'AdditionalOptions': [ + '/LTCG', # link time code generation + ], + }, + 'VCLinkerTool': { + 'LinkTimeCodeGeneration': 1, # link-time code generation + 'OptimizeReferences': 2, # /OPT:REF + 'EnableCOMDATFolding': 2, # /OPT:ICF + 'LinkIncremental': 1, # disable incremental linking + }, + }, 'sources': [ 'src/includes/util_win.cpp', 'src/native_window/native_window_win.cpp', @@ -317,11 +338,11 @@ '_WINSOCKAPI_' ], 'link_settings': { - 'libraries': [ - 'GdiPlus.lib', - '<(module_root_dir)/deps/cef/lib/Release/libcef.lib', - '<(module_root_dir)/build/Release/lib/libcef_dll_wrapper.node' - ], + 'libraries': [ + 'GdiPlus.lib', + '<(module_root_dir)/deps/cef/lib/Release/libcef.lib', + '<(module_root_dir)/build/Release/lib/libcef_dll_wrapper.node' + ], }, }] ]