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
12 # Enable V8's post-mortem debugging only on unix flavors.
15 'v8_postmortem_support': 'true'
21 'default_configuration': 'Release',
24 'defines': [ 'DEBUG', '_DEBUG' ],
25 'cflags': [ '-g', '-O0' ],
27 ['target_arch=="x64"', {
28 'msvs_configuration_platform': 'x64',
33 'RuntimeLibrary': 1, # static debug
34 'Optimization': 0, # /Od, no optimization
35 'MinimalRebuild': 'false',
36 'OmitFramePointers': 'false',
37 'BasicRuntimeChecks': 3, # /RTC1
40 'LinkIncremental': 2, # enable incremental linking
45 'cflags': [ '-O3', '-fdata-sections', '-ffunction-sections' ],
47 ['target_arch=="x64"', {
48 'msvs_configuration_platform': 'x64',
51 'cflags': [ '-fno-omit-frame-pointer' ],
52 # pull in V8's postmortem metadata
53 'ldflags': [ '-Wl,-z,allextract' ]
55 ['strict_aliasing!="true"', {
56 'cflags': [ '-fno-strict-aliasing' ],
61 'RuntimeLibrary': 0, # static release
62 'Optimization': 3, # /Ox, full optimization
63 'FavorSizeOrSpeed': 1, # /Ot, favour speed over size
64 'InlineFunctionExpansion': 2, # /Ob2, inline anything eligible
65 'WholeProgramOptimization': 'true', # /GL, whole program optimization, needed for LTCG
66 'OmitFramePointers': 'true',
67 'EnableFunctionLevelLinking': 'true',
68 'EnableIntrinsicFunctions': 'true',
69 'RuntimeTypeInfo': 'false',
70 'ExceptionHandling': '0',
71 'AdditionalOptions': [
72 '/MP', # compile across multiple CPUs
76 'AdditionalOptions': [
77 '/LTCG', # link time code generation
81 'LinkTimeCodeGeneration': 1, # link-time code generation
82 'OptimizeReferences': 2, # /OPT:REF
83 'EnableCOMDATFolding': 2, # /OPT:ICF
84 'LinkIncremental': 1, # disable incremental linking
91 'StringPooling': 'true', # pool string literals
92 'DebugInformationFormat': 3, # Generate a PDB
94 'BufferSecurityCheck': 'true',
95 'ExceptionHandling': 1, # /EHsc
96 'SuppressStartupBanner': 'true',
97 'WarnAsError': 'false',
103 ['target_arch=="x64"', {
104 'TargetMachine' : 17 # /MACHINE:X64
107 'GenerateDebugInformation': 'true',
108 'RandomizedBaseAddress': 2, # enable ASLR
109 'DataExecutionPrevention': 2, # enable DEP
110 'AllowIsolation': 'true',
111 'SuppressStartupBanner': 'true',
112 'target_conditions': [
113 ['_type=="executable"', {
114 'SubSystem': 1, # console executable
121 'msvs_cygwin_shell': 0, # prevent actions from trying to use cygwin
124 # we don't really want VC++ warning us about
125 # how dangerous C functions are...
126 '_CRT_SECURE_NO_DEPRECATE',
127 # ... or that C implementations shouldn't use
129 '_CRT_NONSTDC_NO_DEPRECATE',
130 'BUILDING_V8_SHARED=1',
131 'BUILDING_UV_SHARED=1',
136 '_FILE_OFFSET_BITS=64',
139 [ 'OS=="linux" or OS=="freebsd" or OS=="openbsd" or OS=="solaris"', {
140 'cflags': [ '-Wall', '-pthread', ],
141 'cflags_cc': [ '-fno-rtti', '-fno-exceptions' ],
142 'ldflags': [ '-pthread', ],
144 [ 'target_arch=="ia32"', {
145 'cflags': [ '-m32' ],
146 'ldflags': [ '-m32' ],
149 'ldflags': [ '-rdynamic' ],
152 'cflags': [ '-pthreads' ],
153 'ldflags': [ '-pthreads' ],
154 'cflags!': [ '-pthread' ],
155 'ldflags!': [ '-pthread' ],
160 'defines': ['_DARWIN_USE_64_BIT_INODE=1'],
162 'ALWAYS_SEARCH_USER_PATHS': 'NO',
163 'GCC_CW_ASM_SYNTAX': 'NO', # No -fasm-blocks
164 'GCC_DYNAMIC_NO_PIC': 'NO', # No -mdynamic-no-pic
165 # (Equivalent to -fPIC)
166 'GCC_ENABLE_CPP_EXCEPTIONS': 'NO', # -fno-exceptions
167 'GCC_ENABLE_CPP_RTTI': 'NO', # -fno-rtti
168 'GCC_ENABLE_PASCAL_STRINGS': 'NO', # No -mpascal-strings
169 'GCC_THREADSAFE_STATICS': 'NO', # -fno-threadsafe-statics
170 'GCC_VERSION': '4.2',
171 'GCC_WARN_ABOUT_MISSING_NEWLINE': 'YES', # -Wnewline-eof
172 'PREBINDING': 'NO', # No -Wl,-prebind
173 'MACOSX_DEPLOYMENT_TARGET': '10.5', # -mmacosx-version-min=10.5
174 'USE_HEADERMAP': 'NO',
176 '-fno-strict-aliasing',
182 '-Wno-unused-parameter',
185 'target_conditions': [
186 ['_type!="static_library"', {
187 'xcode_settings': {'OTHER_LDFLAGS': ['-Wl,-search_paths_first']},
191 ['target_arch=="ia32"', {
192 'xcode_settings': {'ARCHS': ['i386']},
194 ['target_arch=="x64"', {
195 'xcode_settings': {'ARCHS': ['x86_64']},