Chromium Code Reviews| Index: build/common.gypi |
| diff --git a/build/common.gypi b/build/common.gypi |
| index 708e12c2aa3f6ae9ff536f5c7a71f33ca6d4f34f..71eef19e53144750c1af5c9a89ad80d5ecbaa0ae 100644 |
| --- a/build/common.gypi |
| +++ b/build/common.gypi |
| @@ -346,6 +346,10 @@ |
| # by the GYP command line or by ~/.gyp/include.gypi. |
| 'component%': 'static_library', |
| + # /analyze is off by default on Windows because it is very slow and noisy. |
| + # Enable with GYP_DEFINES=win_analyze=1 |
| + 'win_analyze%': 0, |
| + |
| # Set to select the Title Case versions of strings in GRD files. |
| 'use_titlecase_in_grd%': 0, |
| @@ -1108,6 +1112,7 @@ |
| 'chroot_cmd%': '<(chroot_cmd)', |
| 'system_libdir%': '<(system_libdir)', |
| 'component%': '<(component)', |
| + 'win_analyze%': '<(win_analyze)', |
| 'enable_resource_whitelist_generation%': '<(enable_resource_whitelist_generation)', |
| 'use_titlecase_in_grd%': '<(use_titlecase_in_grd)', |
| 'use_third_party_translations%': '<(use_third_party_translations)', |
| @@ -2786,13 +2791,18 @@ |
| # This define is required to pull in the new Win8 interfaces from |
| # system headers like ShObjIdl.h. |
| 'NTDDI_VERSION=0x06020000', |
| - # This is required for ATL to use XP-safe versions of its functions. |
| - '_USING_V110_SDK71_', |
| ], |
| 'include_dirs': [ |
| '<(DEPTH)/third_party/wtl/include', |
| ], |
| 'conditions': [ |
| + ['win_analyze==0', { |
|
scottmg
2014/10/27 17:47:02
i think it would be better to do
'win_analyze':
|
| + # This is required for ATL to use XP-safe versions of its functions. |
| + # However it is prohibited when running /analyze. |
| + 'defines': [ |
| + '_USING_V110_SDK71_', |
| + ], |
| + }], |
| ['win_z7!=0', { |
| 'msvs_settings': { |
| # Generates debug info when win_z7=1 |
| @@ -3210,6 +3220,24 @@ |
| # "/Oy /Oy-" and warnings about overriding. |
| 'AdditionalOptions': ['/Oy-'], |
| }], |
| + ['win_analyze!=0', { |
|
scottmg
2014/10/27 17:47:03
just 'win_analyze' is fine.
|
| + # When win_analye is specified add the /analyze switch. There will be many |
|
scottmg
2014/10/27 17:47:02
rewrap to 80col
|
| + # warnings do disable warnings-as-errors. Putting it on additiona-options |
| + # is the only practical way to do it for all projects. |
| + # Also, disable various noisy warnings that have low value. |
| + 'AdditionalOptions': ['/analyze /WX- /wd6312 /wd6326 /wd28159 /wd28204 /wd28251 /wd28301 /wd28252 /wd28196 /wd6340 /wd6334 /wd6011 /wd6246 /wd6244 /wd28182'], |
|
scottmg
2014/10/27 17:47:02
make these separate items in a list, i.e.
'Additi
|
| + # 6340 6334 6011 6246 6244 28182 |
| + # /analyze related warnings |
| + #6312, # Possible infinite loop: use of the constant EXCEPTION_CONTINUE_EXECUTION in the exception-filter expression of a try-except |
| + #6326, # Potential comparison of a constant with another constant. |
| + #28159, # Consider using 'GetTickCount64' instead of 'GetTickCount'. |
| + #28204, # Inconsistent SAL annotations |
| + #28251, # Inconsistent SAL annotations |
| + #28252, # Inconsistent SAL annotations |
| + #28301, # Inconsistent SAL annotations |
| + #28196, # The requirement that (precondition) is not satisfied. |
| + # 6340 6334 6011 6246 6244 28182 |
| + }], |
| ], |
| 'AdditionalOptions': [ '<@(win_debug_extra_cflags)', ], |
| }, |