-
Notifications
You must be signed in to change notification settings - Fork 59
/
common.gypi
98 lines (97 loc) · 2.7 KB
/
common.gypi
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
# Copyright Joyent, Inc. and other Node contributors.
# 2013 (C) Peter Rekdal Sunde
{
'variables': {
'target_arch%': 'x86',
'library%': 'static_library',
'openssl_enable_asm%': 0, # only supported with the Visual Studio 2012 (VC11) toolchain.
'gcc_version%': 0,
'is_clang%': 0,
},
'target_defaults': {
'default_configuration': 'Release',
'configurations': {
'Debug': {
'defines': [
'DEBUG',
'_DEBUG'
],
'cflags': [
'-g',
'-O0'
],
'conditions': [
['target_arch=="x64"', {#
'msvs_configuration_platform': 'x64',
}
],
],
'msvs_settings': {
'VCCLCompilerTool': {
'RuntimeLibrary': 1, #static debug
'Optimization': 0, #/Od, no optimization
'MinimalRebuild': 'false',
'OmitFramePointers': 'false',
'BasicRuntimeChecks': 3, # /RTC1
},
'VCLinkerTool': {
'LinkIncremental': 2, #enable incremental linking
'conditions':
[
['target_arch=="x64"', {
'TargetMachine': 17 # /MACHINE:X64
}],
],
},
},
},
'Release': {
'conditions': [
['target_arch=="x64"', {#
'msvs_configuration_platform': 'x64',
}
],
],
'msvs_settings': {
'VCCLCompilerTool': {
'RuntimeLibrary': 0, #static release
'Optimization': 3, #/Ox, full optimization
'FavorSizeOrSpeed': 1, # /Ot, favour speed over size
'InlineFunctionExpansion': 2, #/Ob2, inline anything eligible
'WholeProgramOptimization': 'true', # /GL, whole program optimization, needed for LTCG
'OmitFramePointers': 'true',
'EnableFunctionLevelLinking': 'true',
'EnableIntrinsicFunctions': 'true',
'RuntimeTypeInfo': 'false',
'ExceptionHandling': '0',
'AdditionalOptions': [
'/MP', #compile across multiple CPUs
],
},
'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
'conditions':
[
['target_arch=="x64"', {
'TargetMachine': 17 # /MACHINE:X64
}],
],
},
},
},
},
'msvs_settings' : {
'VCLinkerTool' : {
'GenerateDebugInformation': 'true',
}
}
},
}