3 'visibility%': 'hidden', # V8's visibility setting
4 'target_arch%': 'ia32', # set v8's target architecture
5 'host_arch%': 'ia32', # set v8's host architecture
6 'want_separate_host_toolset': 0, # V8 should not build target and host
7 'library%': 'static_library', # allow override to 'shared_library' for DLL/.so builds
8 'component%': 'static_library', # NB. these names match with what V8 expects
9 'msvs_multi_core_compile': '0', # we do enable multicore compiles, but not using the V8 way
11 # Turn on optimizations that may trigger compiler bugs.
12 # Use at your own risk. Do *NOT* report bugs if this option is enabled.
13 'node_unsafe_optimizations%': 0,
15 # Enable V8's post-mortem debugging only on unix flavors.
18 'v8_postmortem_support': 'true'
24 'default_configuration': 'Release',
27 'defines': [ 'DEBUG', '_DEBUG' ],
28 'cflags': [ '-g', '-O0' ],
30 ['target_arch=="x64"', {
31 'msvs_configuration_platform': 'x64',
36 'RuntimeLibrary': 1, # static debug
37 'Optimization': 0, # /Od, no optimization
38 'MinimalRebuild': 'false',
39 'OmitFramePointers': 'false',
40 'BasicRuntimeChecks': 3, # /RTC1
43 'LinkIncremental': 2, # enable incremental linking
49 ['node_unsafe_optimizations==1', {
50 'cflags': [ '-O3', '-ffunction-sections', '-fdata-sections' ],
51 'ldflags': [ '-Wl,--gc-sections' ],
53 'cflags': [ '-O2', '-fno-strict-aliasing', '-fno-tree-vrp' ],
56 '-ffunction-sections',
59 ['target_arch=="x64"', {
60 'msvs_configuration_platform': 'x64',
63 'cflags': [ '-fno-omit-frame-pointer' ],
64 # pull in V8's postmortem metadata
65 'ldflags': [ '-Wl,-z,allextract' ]
70 'RuntimeLibrary': 0, # static release
71 'Optimization': 3, # /Ox, full optimization
72 'FavorSizeOrSpeed': 1, # /Ot, favour speed over size
73 'InlineFunctionExpansion': 2, # /Ob2, inline anything eligible
74 'WholeProgramOptimization': 'true', # /GL, whole program optimization, needed for LTCG
75 'OmitFramePointers': 'true',
76 'EnableFunctionLevelLinking': 'true',
77 'EnableIntrinsicFunctions': 'true',
78 'RuntimeTypeInfo': 'false',
79 'ExceptionHandling': '0',
80 'AdditionalOptions': [
81 '/MP', # compile across multiple CPUs
85 'AdditionalOptions': [
86 '/LTCG', # link time code generation
90 'LinkTimeCodeGeneration': 1, # link-time code generation
91 'OptimizeReferences': 2, # /OPT:REF
92 'EnableCOMDATFolding': 2, # /OPT:ICF
93 'LinkIncremental': 1, # disable incremental linking
100 'StringPooling': 'true', # pool string literals
101 'DebugInformationFormat': 3, # Generate a PDB
103 'BufferSecurityCheck': 'true',
104 'ExceptionHandling': 1, # /EHsc
105 'SuppressStartupBanner': 'true',
106 'WarnAsError': 'false',
112 ['target_arch=="x64"', {
113 'TargetMachine' : 17 # /MACHINE:X64
116 'GenerateDebugInformation': 'true',
117 'RandomizedBaseAddress': 2, # enable ASLR
118 'DataExecutionPrevention': 2, # enable DEP
119 'AllowIsolation': 'true',
120 'SuppressStartupBanner': 'true',
121 'target_conditions': [
122 ['_type=="executable"', {
123 'SubSystem': 1, # console executable
130 'msvs_cygwin_shell': 0, # prevent actions from trying to use cygwin
133 # we don't really want VC++ warning us about
134 # how dangerous C functions are...
135 '_CRT_SECURE_NO_DEPRECATE',
136 # ... or that C implementations shouldn't use
138 '_CRT_NONSTDC_NO_DEPRECATE',
139 'BUILDING_V8_SHARED=1',
140 'BUILDING_UV_SHARED=1',
145 '_FILE_OFFSET_BITS=64',
148 [ 'OS=="linux" or OS=="freebsd" or OS=="openbsd" or OS=="solaris"', {
149 'cflags': [ '-Wall', '-pthread', ],
150 'cflags_cc': [ '-fno-rtti', '-fno-exceptions' ],
151 'ldflags': [ '-pthread', '-rdynamic' ],
153 [ 'target_arch=="ia32"', {
154 'cflags': [ '-m32' ],
155 'ldflags': [ '-m32' ],
157 [ 'target_arch=="x64"', {
158 'cflags': [ '-m64' ],
159 'ldflags': [ '-m64' ],
162 'cflags': [ '-pthreads' ],
163 'ldflags': [ '-pthreads' ],
164 'cflags!': [ '-pthread' ],
165 'ldflags!': [ '-pthread' ],
170 'defines': ['_DARWIN_USE_64_BIT_INODE=1'],
172 'ALWAYS_SEARCH_USER_PATHS': 'NO',
173 'GCC_CW_ASM_SYNTAX': 'NO', # No -fasm-blocks
174 'GCC_DYNAMIC_NO_PIC': 'NO', # No -mdynamic-no-pic
175 # (Equivalent to -fPIC)
176 'GCC_ENABLE_CPP_EXCEPTIONS': 'NO', # -fno-exceptions
177 'GCC_ENABLE_CPP_RTTI': 'NO', # -fno-rtti
178 'GCC_ENABLE_PASCAL_STRINGS': 'NO', # No -mpascal-strings
179 'GCC_THREADSAFE_STATICS': 'NO', # -fno-threadsafe-statics
180 'GCC_VERSION': '4.2',
181 'GCC_WARN_ABOUT_MISSING_NEWLINE': 'YES', # -Wnewline-eof
182 'PREBINDING': 'NO', # No -Wl,-prebind
183 'MACOSX_DEPLOYMENT_TARGET': '10.5', # -mmacosx-version-min=10.5
184 'USE_HEADERMAP': 'NO',
186 '-fno-strict-aliasing',
192 '-Wno-unused-parameter',
195 'target_conditions': [
196 ['_type!="static_library"', {
197 'xcode_settings': {'OTHER_LDFLAGS': ['-Wl,-search_paths_first']},
201 ['target_arch=="ia32"', {
202 'xcode_settings': {'ARCHS': ['i386']},
204 ['target_arch=="x64"', {
205 'xcode_settings': {'ARCHS': ['x86_64']},