3 'strict_aliasing%': 'false', # turn on/off -fstrict-aliasing
4 'visibility%': 'hidden', # V8's visibility setting
5 'target_arch%': 'ia32', # set v8's target architecture
6 'host_arch%': 'ia32', # set v8's host architecture
7 'want_separate_host_toolset': 0, # V8 should not build target and host
8 'library%': 'static_library', # allow override to 'shared_library' for DLL/.so builds
9 'component%': 'static_library', # NB. these names match with what V8 expects
10 'msvs_multi_core_compile': '0', # we do enable multicore compiles, but not using the V8 way
11 'v8_postmortem_support': 'true', # V8's postmortem metadata
15 'default_configuration': 'Release',
18 'defines': [ 'DEBUG', '_DEBUG' ],
19 'cflags': [ '-g', '-O0' ],
21 ['target_arch=="x64"', {
22 'msvs_configuration_platform': 'x64',
27 'RuntimeLibrary': 1, # static debug
28 'Optimization': 0, # /Od, no optimization
29 'MinimalRebuild': 'true',
30 'OmitFramePointers': 'false',
31 'BasicRuntimeChecks': 3, # /RTC1
34 'LinkIncremental': 2, # enable incremental linking
39 'cflags': [ '-O3', '-fdata-sections', '-ffunction-sections' ],
41 ['target_arch=="x64"', {
42 'msvs_configuration_platform': 'x64',
45 'cflags': [ '-fno-omit-frame-pointer' ],
46 # pull in V8's postmortem metadata
47 'ldflags': [ '-Wl,-z,allextract' ]
49 ['strict_aliasing!="true"', {
50 'cflags': [ '-fno-strict-aliasing' ],
55 'RuntimeLibrary': 0, # static release
56 'Optimization': 3, # /Ox, full optimization
57 'FavorSizeOrSpeed': 1, # /Ot, favour speed over size
58 'InlineFunctionExpansion': 2, # /Ob2, inline anything eligible
59 'WholeProgramOptimization': 'true', # /GL, whole program optimization, needed for LTCG
60 'OmitFramePointers': 'true',
61 'EnableFunctionLevelLinking': 'true',
62 'EnableIntrinsicFunctions': 'true',
63 'RuntimeTypeInfo': 'false',
64 'ExceptionHandling': '0',
65 'AdditionalOptions': [
66 '/MP', # compile across multiple CPUs
70 'AdditionalOptions': [
71 '/LTCG', # link time code generation
75 'LinkTimeCodeGeneration': 1, # link-time code generation
76 'OptimizeReferences': 2, # /OPT:REF
77 'EnableCOMDATFolding': 2, # /OPT:ICF
78 'LinkIncremental': 1, # disable incremental linking
85 'StringPooling': 'true', # pool string literals
86 'DebugInformationFormat': 3, # Generate a PDB
88 'BufferSecurityCheck': 'true',
89 'ExceptionHandling': 1, # /EHsc
90 'SuppressStartupBanner': 'true',
91 'WarnAsError': 'false',
97 ['target_arch=="x64"', {
98 'TargetMachine' : 17 # /MACHINE:X64
101 'GenerateDebugInformation': 'true',
102 'RandomizedBaseAddress': 2, # enable ASLR
103 'DataExecutionPrevention': 2, # enable DEP
104 'AllowIsolation': 'true',
105 'SuppressStartupBanner': 'true',
106 'target_conditions': [
107 ['_type=="executable"', {
108 'SubSystem': 1, # console executable
115 'msvs_cygwin_shell': 0, # prevent actions from trying to use cygwin
118 # we don't really want VC++ warning us about
119 # how dangerous C functions are...
120 '_CRT_SECURE_NO_DEPRECATE',
121 # ... or that C implementations shouldn't use
123 '_CRT_NONSTDC_NO_DEPRECATE',
124 'BUILDING_V8_SHARED=1',
125 'BUILDING_UV_SHARED=1',
130 '_FILE_OFFSET_BITS=64',
133 [ 'OS=="linux" or OS=="freebsd" or OS=="openbsd" or OS=="solaris"', {
134 'cflags': [ '-Wall', '-pthread', ],
135 'cflags_cc': [ '-fno-rtti', '-fno-exceptions' ],
136 'ldflags': [ '-pthread', ],
138 [ 'target_arch=="ia32"', {
139 'cflags': [ '-m32' ],
140 'ldflags': [ '-m32' ],
143 'cflags': [ '-ansi' ],
144 'ldflags': [ '-rdynamic' ],
147 'cflags': [ '-pthreads' ],
148 'ldflags': [ '-pthreads' ],
149 'cflags!': [ '-pthread' ],
150 'ldflags!': [ '-pthread' ],
155 'defines': ['_DARWIN_USE_64_BIT_INODE=1'],
157 'ALWAYS_SEARCH_USER_PATHS': 'NO',
158 'GCC_CW_ASM_SYNTAX': 'NO', # No -fasm-blocks
159 'GCC_DYNAMIC_NO_PIC': 'NO', # No -mdynamic-no-pic
160 # (Equivalent to -fPIC)
161 'GCC_ENABLE_CPP_EXCEPTIONS': 'NO', # -fno-exceptions
162 'GCC_ENABLE_CPP_RTTI': 'NO', # -fno-rtti
163 'GCC_ENABLE_PASCAL_STRINGS': 'NO', # No -mpascal-strings
164 'GCC_THREADSAFE_STATICS': 'NO', # -fno-threadsafe-statics
165 'GCC_VERSION': '4.2',
166 'GCC_WARN_ABOUT_MISSING_NEWLINE': 'YES', # -Wnewline-eof
167 'PREBINDING': 'NO', # No -Wl,-prebind
168 'USE_HEADERMAP': 'NO',
170 '-fno-strict-aliasing',
176 '-Wno-unused-parameter',
179 'target_conditions': [
180 ['_type!="static_library"', {
181 'xcode_settings': {'OTHER_LDFLAGS': ['-Wl,-search_paths_first']},
185 ['target_arch=="ia32"', {
186 'xcode_settings': {'ARCHS': ['i386']},
188 ['target_arch=="x64"', {
189 'xcode_settings': {'ARCHS': ['x86_64']},