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 # Enable V8's post-mortem debugging only on unix flavors.
14 'v8_postmortem_support': 'true'
20 'default_configuration': 'Release',
23 'defines': [ 'DEBUG', '_DEBUG' ],
24 'cflags': [ '-g', '-O0' ],
26 ['target_arch=="x64"', {
27 'msvs_configuration_platform': 'x64',
32 'RuntimeLibrary': 1, # static debug
33 'Optimization': 0, # /Od, no optimization
34 'MinimalRebuild': 'false',
35 'OmitFramePointers': 'false',
36 'BasicRuntimeChecks': 3, # /RTC1
39 'LinkIncremental': 2, # enable incremental linking
44 # Do *NOT* enable -ffunction-sections or -fdata-sections again.
45 # We don't link with -Wl,--gc-sections so they're effectively no-ops.
46 # Worse, they trigger very nasty bugs in some versions of gcc, notably
47 # v4.4.6 on x86_64-redhat-linux (i.e. RHEL and CentOS).
48 'cflags!': [ '-ffunction-sections', '-fdata-sections' ],
51 ['target_arch=="x64"', {
52 'msvs_configuration_platform': 'x64',
55 'cflags': [ '-fno-omit-frame-pointer' ],
56 # pull in V8's postmortem metadata
57 'ldflags': [ '-Wl,-z,allextract' ]
62 'RuntimeLibrary': 0, # static release
63 'Optimization': 3, # /Ox, full optimization
64 'FavorSizeOrSpeed': 1, # /Ot, favour speed over size
65 'InlineFunctionExpansion': 2, # /Ob2, inline anything eligible
66 'WholeProgramOptimization': 'true', # /GL, whole program optimization, needed for LTCG
67 'OmitFramePointers': 'true',
68 'EnableFunctionLevelLinking': 'true',
69 'EnableIntrinsicFunctions': 'true',
70 'RuntimeTypeInfo': 'false',
71 'ExceptionHandling': '0',
72 'AdditionalOptions': [
73 '/MP', # compile across multiple CPUs
77 'AdditionalOptions': [
78 '/LTCG', # link time code generation
82 'LinkTimeCodeGeneration': 1, # link-time code generation
83 'OptimizeReferences': 2, # /OPT:REF
84 'EnableCOMDATFolding': 2, # /OPT:ICF
85 'LinkIncremental': 1, # disable incremental linking
92 'StringPooling': 'true', # pool string literals
93 'DebugInformationFormat': 3, # Generate a PDB
95 'BufferSecurityCheck': 'true',
96 'ExceptionHandling': 1, # /EHsc
97 'SuppressStartupBanner': 'true',
98 'WarnAsError': 'false',
104 ['target_arch=="x64"', {
105 'TargetMachine' : 17 # /MACHINE:X64
108 'GenerateDebugInformation': 'true',
109 'RandomizedBaseAddress': 2, # enable ASLR
110 'DataExecutionPrevention': 2, # enable DEP
111 'AllowIsolation': 'true',
112 'SuppressStartupBanner': 'true',
113 'target_conditions': [
114 ['_type=="executable"', {
115 'SubSystem': 1, # console executable
122 'msvs_cygwin_shell': 0, # prevent actions from trying to use cygwin
125 # we don't really want VC++ warning us about
126 # how dangerous C functions are...
127 '_CRT_SECURE_NO_DEPRECATE',
128 # ... or that C implementations shouldn't use
130 '_CRT_NONSTDC_NO_DEPRECATE',
131 'BUILDING_V8_SHARED=1',
132 'BUILDING_UV_SHARED=1',
137 '_FILE_OFFSET_BITS=64',
140 [ 'OS=="linux" or OS=="freebsd" or OS=="openbsd" or OS=="solaris"', {
141 'cflags': [ '-Wall', '-pthread', ],
142 'cflags_cc': [ '-fno-rtti', '-fno-exceptions' ],
143 'ldflags': [ '-pthread', ],
145 [ 'target_arch=="ia32"', {
146 'cflags': [ '-m32' ],
147 'ldflags': [ '-m32' ],
149 [ 'target_arch=="x64"', {
150 'cflags': [ '-m64' ],
151 'ldflags': [ '-m64' ],
154 'ldflags': [ '-rdynamic' ],
157 'cflags': [ '-pthreads' ],
158 'ldflags': [ '-pthreads' ],
159 'cflags!': [ '-pthread' ],
160 'ldflags!': [ '-pthread' ],
165 'defines': ['_DARWIN_USE_64_BIT_INODE=1'],
167 'ALWAYS_SEARCH_USER_PATHS': 'NO',
168 'GCC_CW_ASM_SYNTAX': 'NO', # No -fasm-blocks
169 'GCC_DYNAMIC_NO_PIC': 'NO', # No -mdynamic-no-pic
170 # (Equivalent to -fPIC)
171 'GCC_ENABLE_CPP_EXCEPTIONS': 'NO', # -fno-exceptions
172 'GCC_ENABLE_CPP_RTTI': 'NO', # -fno-rtti
173 'GCC_ENABLE_PASCAL_STRINGS': 'NO', # No -mpascal-strings
174 'GCC_THREADSAFE_STATICS': 'NO', # -fno-threadsafe-statics
175 'GCC_VERSION': '4.2',
176 'GCC_WARN_ABOUT_MISSING_NEWLINE': 'YES', # -Wnewline-eof
177 'PREBINDING': 'NO', # No -Wl,-prebind
178 'MACOSX_DEPLOYMENT_TARGET': '10.5', # -mmacosx-version-min=10.5
179 'USE_HEADERMAP': 'NO',
181 '-fno-strict-aliasing',
187 '-Wno-unused-parameter',
190 'target_conditions': [
191 ['_type!="static_library"', {
192 'xcode_settings': {'OTHER_LDFLAGS': ['-Wl,-search_paths_first']},
196 ['target_arch=="ia32"', {
197 'xcode_settings': {'ARCHS': ['i386']},
199 ['target_arch=="x64"', {
200 'xcode_settings': {'ARCHS': ['x86_64']},