Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Newer
Older
100644 177 lines (175 sloc) 6.339 kB
d9b0534 @japj gyp: enable debug symbols with MSVC
japj authored
1 {
2942f5a @DrPizza GYP upates
DrPizza authored
2 'variables': {
7db243d @DrPizza Bring inline with node common.gypi.
DrPizza authored
3 'visibility%': 'hidden', # V8's visibility setting
2942f5a @DrPizza GYP upates
DrPizza authored
4 'target_arch%': 'ia32', # set v8's target architecture
5 'host_arch%': 'ia32', # set v8's host architecture
6 'library%': 'static_library', # allow override to 'shared_library' for DLL/.so builds
7 'component%': 'static_library', # NB. these names match with what V8 expects
8 'msvs_multi_core_compile': '0', # we do enable multicore compiles, but not using the V8 way
9 },
10
11 'target_defaults': {
12 'default_configuration': 'Debug',
13 'configurations': {
14 'Debug': {
15 'defines': [ 'DEBUG', '_DEBUG' ],
16 'cflags': [ '-g', '-O0' ],
d9b0534 @japj gyp: enable debug symbols with MSVC
japj authored
17 'msvs_settings': {
2942f5a @DrPizza GYP upates
DrPizza authored
18 'VCCLCompilerTool': {
19 'target_conditions': [
20 ['library=="static_library"', {
21 'RuntimeLibrary': 1, # static debug
22 }, {
23 'RuntimeLibrary': 3, # DLL debug
24 }],
25 ],
26 'Optimization': 0, # /Od, no optimization
0c32087 @piscisaureus Windows: disable minimal rebuild (/Gm)
piscisaureus authored
27 'MinimalRebuild': 'false',
2942f5a @DrPizza GYP upates
DrPizza authored
28 'OmitFramePointers': 'false',
29 'BasicRuntimeChecks': 3, # /RTC1
30 },
31 'VCLinkerTool': {
32 'LinkIncremental': 2, # enable incremental linking
33 },
34 },
2c01791 @ry Make libev verify itself in debug build
ry authored
35 'conditions': [
36 ['OS != "win"', {
37 'defines': [ 'EV_VERIFY=2' ],
38 }],
39 ]
2942f5a @DrPizza GYP upates
DrPizza authored
40 },
41 'Release': {
42 'defines': [ 'NDEBUG' ],
43 'cflags': [ '-O3', '-fomit-frame-pointer', '-fdata-sections', '-ffunction-sections' ],
44 'msvs_settings': {
45 'VCCLCompilerTool': {
46 'target_conditions': [
47 ['library=="static_library"', {
48 'RuntimeLibrary': 0, # static release
49 }, {
50 'RuntimeLibrary': 2, # debug release
51 }],
52 ],
53 'Optimization': 3, # /Ox, full optimization
54 'FavorSizeOrSpeed': 1, # /Ot, favour speed over size
55 'InlineFunctionExpansion': 2, # /Ob2, inline anything eligible
56 'WholeProgramOptimization': 'true', # /GL, whole program optimization, needed for LTCG
57 'OmitFramePointers': 'true',
58 'EnableFunctionLevelLinking': 'true',
59 'EnableIntrinsicFunctions': 'true',
60 },
61 'VCLibrarianTool': {
62 'AdditionalOptions': [
63 '/LTCG', # link time code generation
64 ],
65 },
d9b0534 @japj gyp: enable debug symbols with MSVC
japj authored
66 'VCLinkerTool': {
2942f5a @DrPizza GYP upates
DrPizza authored
67 'LinkTimeCodeGeneration': 1, # link-time code generation
68 'OptimizeReferences': 2, # /OPT:REF
69 'EnableCOMDATFolding': 2, # /OPT:ICF
70 'LinkIncremental': 1, # disable incremental linking
d9b0534 @japj gyp: enable debug symbols with MSVC
japj authored
71 },
72 },
2942f5a @DrPizza GYP upates
DrPizza authored
73 }
74 },
75 'msvs_settings': {
76 'VCCLCompilerTool': {
77 'StringPooling': 'true', # pool string literals
78 'DebugInformationFormat': 3, # Generate a PDB
79 'WarningLevel': 3,
80 'BufferSecurityCheck': 'true',
81 'ExceptionHandling': 1, # /EHsc
82 'SuppressStartupBanner': 'true',
83 'WarnAsError': 'false',
b386c44 @piscisaureus Windows: always enable multicore compile
piscisaureus authored
84 'AdditionalOptions': [
85 '/MP', # compile across multiple CPUs
86 ],
2942f5a @DrPizza GYP upates
DrPizza authored
87 },
88 'VCLibrarianTool': {
d9b0534 @japj gyp: enable debug symbols with MSVC
japj authored
89 },
2942f5a @DrPizza GYP upates
DrPizza authored
90 'VCLinkerTool': {
91 'GenerateDebugInformation': 'true',
92 'RandomizedBaseAddress': 2, # enable ASLR
93 'DataExecutionPrevention': 2, # enable DEP
94 'AllowIsolation': 'true',
95 'SuppressStartupBanner': 'true',
7db243d @DrPizza Bring inline with node common.gypi.
DrPizza authored
96 'target_conditions': [
97 ['_type=="executable"', {
98 'SubSystem': 1, # console executable
99 }],
100 ],
2942f5a @DrPizza GYP upates
DrPizza authored
101 },
102 },
103 'conditions': [
104 ['OS == "win"', {
105 'msvs_cygwin_shell': 0, # prevent actions from trying to use cygwin
106 'defines': [
107 'WIN32',
108 # we don't really want VC++ warning us about
109 # how dangerous C functions are...
110 '_CRT_SECURE_NO_DEPRECATE',
111 # ... or that C implementations shouldn't use
112 # POSIX names
113 '_CRT_NONSTDC_NO_DEPRECATE',
114 ],
115 }],
116 [ 'OS=="linux" or OS=="freebsd" or OS=="openbsd" or OS=="solaris"', {
cb6cd92 @bnoordhuis build: fix gcc 3.x build
bnoordhuis authored
117 'variables': {
118 'gcc_version%': '<!(python build/gcc_version.py)>)',
119 },
3ecb319 @bnoordhuis build: sunos expects -pthreads, not -pthread
bnoordhuis authored
120 'cflags': [ '-Wall' ],
7db243d @DrPizza Bring inline with node common.gypi.
DrPizza authored
121 'cflags_cc': [ '-fno-rtti', '-fno-exceptions' ],
122 'conditions': [
8f6f324 @bnoordhuis build: use -m32 only when host_arch != target_arch
bnoordhuis authored
123 [ 'host_arch != target_arch and target_arch=="ia32"', {
7db243d @DrPizza Bring inline with node common.gypi.
DrPizza authored
124 'cflags': [ '-m32' ],
125 'ldflags': [ '-m32' ],
126 }],
127 [ 'OS=="linux"', {
128 'cflags': [ '-ansi' ],
129 }],
3ecb319 @bnoordhuis build: sunos expects -pthreads, not -pthread
bnoordhuis authored
130 [ 'OS=="solaris"', {
131 'cflags': [ '-pthreads' ],
132 'ldflags': [ '-pthreads' ],
133 }, {
134 'cflags': [ '-pthread' ],
135 'ldflags': [ '-pthread' ],
136 }],
cb6cd92 @bnoordhuis build: fix gcc 3.x build
bnoordhuis authored
137 [ 'visibility=="hidden" and gcc_version >= "4.0.0"', {
7db243d @DrPizza Bring inline with node common.gypi.
DrPizza authored
138 'cflags': [ '-fvisibility=hidden' ],
139 }],
140 ],
2942f5a @DrPizza GYP upates
DrPizza authored
141 }],
142 ['OS=="mac"', {
7db243d @DrPizza Bring inline with node common.gypi.
DrPizza authored
143 'xcode_settings': {
144 'ALWAYS_SEARCH_USER_PATHS': 'NO',
145 'GCC_CW_ASM_SYNTAX': 'NO', # No -fasm-blocks
146 'GCC_DYNAMIC_NO_PIC': 'NO', # No -mdynamic-no-pic
147 # (Equivalent to -fPIC)
148 'GCC_ENABLE_CPP_EXCEPTIONS': 'NO', # -fno-exceptions
149 'GCC_ENABLE_CPP_RTTI': 'NO', # -fno-rtti
150 'GCC_ENABLE_PASCAL_STRINGS': 'NO', # No -mpascal-strings
151 # GCC_INLINES_ARE_PRIVATE_EXTERN maps to -fvisibility-inlines-hidden
152 'GCC_INLINES_ARE_PRIVATE_EXTERN': 'YES',
153 'GCC_SYMBOLS_PRIVATE_EXTERN': 'YES', # -fvisibility=hidden
154 'GCC_THREADSAFE_STATICS': 'NO', # -fno-threadsafe-statics
155 'GCC_WARN_ABOUT_MISSING_NEWLINE': 'YES', # -Wnewline-eof
156 'PREBINDING': 'NO', # No -Wl,-prebind
157 'USE_HEADERMAP': 'NO',
158 'OTHER_CFLAGS': [
159 '-fno-strict-aliasing',
160 ],
161 'WARNING_CFLAGS': [
162 '-Wall',
163 '-Wendif-labels',
164 '-W',
165 '-Wno-unused-parameter',
2942f5a @DrPizza GYP upates
DrPizza authored
166 ],
167 },
7db243d @DrPizza Bring inline with node common.gypi.
DrPizza authored
168 'target_conditions': [
169 ['_type!="static_library"', {
170 'xcode_settings': {'OTHER_LDFLAGS': ['-Wl,-search_paths_first']},
171 }],
172 ],
2942f5a @DrPizza GYP upates
DrPizza authored
173 }],
174 ],
175 },
176 }
Something went wrong with that request. Please try again.