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
14 'default_configuration': 'Release',
17 'defines': [ 'DEBUG', '_DEBUG' ],
18 'cflags': [ '-g', '-O0' ],
20 ['target_arch=="x64"', {
21 'msvs_configuration_platform': 'x64',
26 'RuntimeLibrary': 1, # static debug
27 'Optimization': 0, # /Od, no optimization
28 'MinimalRebuild': 'true',
29 'OmitFramePointers': 'false',
30 'BasicRuntimeChecks': 3, # /RTC1
33 'LinkIncremental': 2, # enable incremental linking
38 'cflags': [ '-O3', '-fdata-sections', '-ffunction-sections' ],
40 ['target_arch=="x64"', {
41 'msvs_configuration_platform': 'x64',
44 'cflags': [ '-fno-omit-frame-pointer' ],
46 ['strict_aliasing!="true"', {
47 'cflags': [ '-fno-strict-aliasing' ],
52 'RuntimeLibrary': 0, # static release
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 'RuntimeTypeInfo': 'false',
61 'ExceptionHandling': '0',
62 'AdditionalOptions': [
63 '/MP', # compile across multiple CPUs
67 'AdditionalOptions': [
68 '/LTCG', # link time code generation
72 'LinkTimeCodeGeneration': 1, # link-time code generation
73 'OptimizeReferences': 2, # /OPT:REF
74 'EnableCOMDATFolding': 2, # /OPT:ICF
75 'LinkIncremental': 1, # disable incremental linking
82 'StringPooling': 'true', # pool string literals
83 'DebugInformationFormat': 3, # Generate a PDB
85 'BufferSecurityCheck': 'true',
86 'ExceptionHandling': 1, # /EHsc
87 'SuppressStartupBanner': 'true',
88 'WarnAsError': 'false',
94 ['target_arch=="x64"', {
95 'TargetMachine' : 17 # /MACHINE:X64
98 'GenerateDebugInformation': 'true',
99 'RandomizedBaseAddress': 2, # enable ASLR
100 'DataExecutionPrevention': 2, # enable DEP
101 'AllowIsolation': 'true',
102 'SuppressStartupBanner': 'true',
103 'target_conditions': [
104 ['_type=="executable"', {
105 'SubSystem': 1, # console executable
112 'msvs_cygwin_shell': 0, # prevent actions from trying to use cygwin
115 # we don't really want VC++ warning us about
116 # how dangerous C functions are...
117 '_CRT_SECURE_NO_DEPRECATE',
118 # ... or that C implementations shouldn't use
120 '_CRT_NONSTDC_NO_DEPRECATE',
121 'BUILDING_V8_SHARED=1',
122 'BUILDING_UV_SHARED=1',
127 '_FILE_OFFSET_BITS=64',
130 [ 'OS=="linux" or OS=="freebsd" or OS=="openbsd" or OS=="solaris"', {
131 'cflags': [ '-Wall', '-pthread', ],
132 'cflags_cc': [ '-fno-rtti', '-fno-exceptions' ],
133 'ldflags': [ '-pthread', ],
135 [ 'target_arch=="ia32"', {
136 'cflags': [ '-m32' ],
137 'ldflags': [ '-m32' ],
140 'cflags': [ '-ansi' ],
141 'ldflags': [ '-rdynamic' ],
144 'cflags': [ '-pthreads' ],
145 'ldflags': [ '-pthreads' ],
146 'cflags!': [ '-pthread' ],
147 'ldflags!': [ '-pthread' ],
153 'ALWAYS_SEARCH_USER_PATHS': 'NO',
154 'GCC_CW_ASM_SYNTAX': 'NO', # No -fasm-blocks
155 'GCC_DYNAMIC_NO_PIC': 'NO', # No -mdynamic-no-pic
156 # (Equivalent to -fPIC)
157 'GCC_ENABLE_CPP_EXCEPTIONS': 'NO', # -fno-exceptions
158 'GCC_ENABLE_CPP_RTTI': 'NO', # -fno-rtti
159 'GCC_ENABLE_PASCAL_STRINGS': 'NO', # No -mpascal-strings
160 'GCC_THREADSAFE_STATICS': 'NO', # -fno-threadsafe-statics
161 'GCC_VERSION': '4.2',
162 'GCC_WARN_ABOUT_MISSING_NEWLINE': 'YES', # -Wnewline-eof
163 'PREBINDING': 'NO', # No -Wl,-prebind
164 'USE_HEADERMAP': 'NO',
166 '-fno-strict-aliasing',
172 '-Wno-unused-parameter',
175 'target_conditions': [
176 ['_type!="static_library"', {
177 'xcode_settings': {'OTHER_LDFLAGS': ['-Wl,-search_paths_first']},
181 ['target_arch=="ia32"', {
182 'xcode_settings': {'ARCHS': ['i386']},
184 ['target_arch=="x64"', {
185 'xcode_settings': {'ARCHS': ['x86_64']},