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
13 'default_configuration': 'Debug',
16 'defines': [ 'DEBUG', '_DEBUG' ],
17 'cflags': [ '-g', '-O0' ],
19 ['target_arch=="x64"', {
20 'msvs_configuration_platform': 'x64',
25 'RuntimeLibrary': 1, # static debug
26 'Optimization': 0, # /Od, no optimization
27 'MinimalRebuild': 'true',
28 'OmitFramePointers': 'false',
29 'BasicRuntimeChecks': 3, # /RTC1
32 'LinkIncremental': 2, # enable incremental linking
39 'cflags': [ '-fomit-frame-pointer' ]
42 # 'defines': [ 'NDEBUG' ],
43 'cflags': [ '-O3', '-fdata-sections', '-ffunction-sections' ],
45 ['target_arch=="x64"', {
46 'msvs_configuration_platform': 'x64',
51 'RuntimeLibrary': 0, # static release
52 'Optimization': 3, # /Ox, full optimization
53 'FavorSizeOrSpeed': 1, # /Ot, favour speed over size
54 'InlineFunctionExpansion': 2, # /Ob2, inline anything eligible
55 'WholeProgramOptimization': 'true', # /GL, whole program optimization, needed for LTCG
56 'OmitFramePointers': 'true',
57 'EnableFunctionLevelLinking': 'true',
58 'EnableIntrinsicFunctions': 'true',
59 'RuntimeTypeInfo': 'false',
60 'ExceptionHandling': '0',
61 'AdditionalOptions': [
62 '/MP', # compile across multiple CPUs
66 'AdditionalOptions': [
67 '/LTCG', # link time code generation
71 'LinkTimeCodeGeneration': 1, # link-time code generation
72 'OptimizeReferences': 2, # /OPT:REF
73 'EnableCOMDATFolding': 2, # /OPT:ICF
74 'LinkIncremental': 1, # disable incremental linking
81 'StringPooling': 'true', # pool string literals
82 'DebugInformationFormat': 3, # Generate a PDB
84 'BufferSecurityCheck': 'true',
85 'ExceptionHandling': 1, # /EHsc
86 'SuppressStartupBanner': 'true',
87 'WarnAsError': 'false',
93 ['target_arch=="x64"', {
94 'TargetMachine' : 17 # /MACHINE:X64
97 'GenerateDebugInformation': 'true',
98 'RandomizedBaseAddress': 2, # enable ASLR
99 'DataExecutionPrevention': 2, # enable DEP
100 'AllowIsolation': 'true',
101 'SuppressStartupBanner': 'true',
102 'target_conditions': [
103 ['_type=="executable"', {
104 'SubSystem': 1, # console executable
111 'msvs_cygwin_shell': 0, # prevent actions from trying to use cygwin
114 # we don't really want VC++ warning us about
115 # how dangerous C functions are...
116 '_CRT_SECURE_NO_DEPRECATE',
117 # ... or that C implementations shouldn't use
119 '_CRT_NONSTDC_NO_DEPRECATE',
120 'BUILDING_V8_SHARED=1',
121 'BUILDING_UV_SHARED=1',
126 '_FILE_OFFSET_BITS=64',
129 [ 'OS=="linux" or OS=="freebsd" or OS=="openbsd" or OS=="solaris"', {
130 'cflags': [ '-Wall', '-pthread', ],
131 'cflags_cc': [ '-fno-rtti', '-fno-exceptions' ],
132 'ldflags': [ '-pthread', ],
134 [ 'target_arch=="ia32"', {
135 'cflags': [ '-m32' ],
136 'ldflags': [ '-m32' ],
139 'cflags': [ '-ansi' ],
140 'ldflags': [ '-rdynamic' ],
146 'ALWAYS_SEARCH_USER_PATHS': 'NO',
147 'GCC_CW_ASM_SYNTAX': 'NO', # No -fasm-blocks
148 'GCC_DYNAMIC_NO_PIC': 'NO', # No -mdynamic-no-pic
149 # (Equivalent to -fPIC)
150 'GCC_ENABLE_CPP_EXCEPTIONS': 'NO', # -fno-exceptions
151 'GCC_ENABLE_CPP_RTTI': 'NO', # -fno-rtti
152 'GCC_ENABLE_PASCAL_STRINGS': 'NO', # No -mpascal-strings
153 'GCC_THREADSAFE_STATICS': 'NO', # -fno-threadsafe-statics
154 'GCC_VERSION': '4.2',
155 'GCC_WARN_ABOUT_MISSING_NEWLINE': 'YES', # -Wnewline-eof
156 'PREBINDING': 'NO', # No -Wl,-prebind
157 'USE_HEADERMAP': 'NO',
159 '-fno-strict-aliasing',
165 '-Wno-unused-parameter',
168 'target_conditions': [
169 ['_type!="static_library"', {
170 'xcode_settings': {'OTHER_LDFLAGS': ['-Wl,-search_paths_first']},
174 ['target_arch=="ia32"', {
175 'xcode_settings': {'ARCHS': ['i386']},
177 ['target_arch=="x64"', {
178 'xcode_settings': {'ARCHS': ['x86_64']},