-
Notifications
You must be signed in to change notification settings - Fork 100
/
common.gypi
143 lines (142 loc) · 5.78 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
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
{
"conditions": [
["OS=='win'", {
"target_defaults": {
"default_configuration": "Release_x64",
"msbuild_toolset":"v140",
"msvs_settings": {
"VCCLCompilerTool": {
"ExceptionHandling": 1, # /EHsc
"RuntimeTypeInfo": "true" # /GR
}
},
"configurations": {
"Debug_Win32": {
"msvs_configuration_platform": "Win32",
"defines": [ "DEBUG","_DEBUG"],
"msvs_settings": {
"VCCLCompilerTool": {
"RuntimeLibrary": "1", # static debug /MTd
"Optimization": 0, # /Od, no optimization
"MinimalRebuild": "false",
"OmitFramePointers": "false",
"BasicRuntimeChecks": 3 # /RTC1
}
}
},
"Debug_x64": {
"msvs_configuration_platform": "x64",
"defines": [ "DEBUG","_DEBUG"],
"msvs_settings": {
"VCCLCompilerTool": {
"RuntimeLibrary": "1", # static debug /MTd
"Optimization": 0, # /Od, no optimization
"MinimalRebuild": "false",
"OmitFramePointers": "false",
"BasicRuntimeChecks": 3 # /RTC1
}
}
},
"Release_Win32": {
"msvs_configuration_platform": "Win32",
"defines": [ "NDEBUG"],
"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",
"AdditionalOptions": [
"/MP", # compile across multiple CPUs
],
"DebugInformationFormat": "0"
},
"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
"GenerateDebugInformation": "false"
}
}
},
"Release_x64": {
"msvs_configuration_platform": "x64",
"defines": [ "NDEBUG"],
"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",
"AdditionalOptions": [
"/MP", # compile across multiple CPUs
],
"DebugInformationFormat": "0"
},
"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
"GenerateDebugInformation": "false"
}
}
}
}
}
}, {
"target_defaults": {
"default_configuration": "Release",
"xcode_settings": {
"CLANG_CXX_LIBRARY": "libc++",
"CLANG_CXX_LANGUAGE_STANDARD":"c++11",
"GCC_VERSION": "com.apple.compilers.llvm.clang.1_0",
},
"cflags_cc": ["-std=c++11"],
"configurations": {
"Debug": {
"defines": [
"DEBUG"
],
"xcode_settings": {
"GCC_OPTIMIZATION_LEVEL": "0",
"GCC_GENERATE_DEBUGGING_SYMBOLS": "YES",
"OTHER_CPLUSPLUSFLAGS": [ "-Wall", "-Wextra", "-pedantic", "-g", "-O0" ]
}
},
"Release": {
"defines": [
"NDEBUG"
],
"xcode_settings": {
"GCC_OPTIMIZATION_LEVEL": "3",
"GCC_GENERATE_DEBUGGING_SYMBOLS": "NO",
"DEAD_CODE_STRIPPING": "YES",
"GCC_INLINES_ARE_PRIVATE_EXTERN": "YES",
"OTHER_CPLUSPLUSFLAGS": [ "-Wall", "-Wextra", "-pedantic", "-O3" ]
}
}
}
}
}]
]
}