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' ],
20 'target_conditions': [
21 ['library=="static_library"', {
22 'RuntimeLibrary': 1, # static debug
24 'RuntimeLibrary': 3, # DLL debug
27 'Optimization': 0, # /Od, no optimization
28 'MinimalRebuild': 'true',
29 'OmitFramePointers': 'false',
30 'BasicRuntimeChecks': 3, # /RTC1
33 'LinkIncremental': 2, # enable incremental linking
38 'defines': [ 'NDEBUG' ],
39 'cflags': [ '-O3', '-fomit-frame-pointer', '-fdata-sections', '-ffunction-sections' ],
42 'target_conditions': [
43 ['library=="static_library"', {
44 'RuntimeLibrary': 0, # static release
46 'RuntimeLibrary': 2, # debug release
49 'Optimization': 3, # /Ox, full optimization
50 'FavorSizeOrSpeed': 1, # /Ot, favour speed over size
51 'InlineFunctionExpansion': 2, # /Ob2, inline anything eligible
52 'WholeProgramOptimization': 'true', # /GL, whole program optimization, needed for LTCG
53 'OmitFramePointers': 'true',
54 'EnableFunctionLevelLinking': 'true',
55 'EnableIntrinsicFunctions': 'true',
56 'AdditionalOptions': [
57 '/MP', # compile across multiple CPUs
61 'AdditionalOptions': [
62 '/LTCG', # link time code generation
66 'LinkTimeCodeGeneration': 1, # link-time code generation
67 'OptimizeReferences': 2, # /OPT:REF
68 'EnableCOMDATFolding': 2, # /OPT:ICF
69 'LinkIncremental': 1, # disable incremental linking
76 'StringPooling': 'true', # pool string literals
77 'DebugInformationFormat': 3, # Generate a PDB
79 'BufferSecurityCheck': 'true',
80 'ExceptionHandling': 1, # /EHsc
81 'SuppressStartupBanner': 'true',
82 'WarnAsError': 'false',
87 'GenerateDebugInformation': 'true',
88 'RandomizedBaseAddress': 2, # enable ASLR
89 'DataExecutionPrevention': 2, # enable DEP
90 'AllowIsolation': 'true',
91 'SuppressStartupBanner': 'true',
92 'target_conditions': [
93 ['_type=="executable"', {
94 'SubSystem': 1, # console executable
101 'msvs_cygwin_shell': 0, # prevent actions from trying to use cygwin
104 # we don't really want VC++ warning us about
105 # how dangerous C functions are...
106 '_CRT_SECURE_NO_DEPRECATE',
107 # ... or that C implementations shouldn't use
109 '_CRT_NONSTDC_NO_DEPRECATE',
110 'BUILDING_V8_SHARED=1',
111 'BUILDING_UV_SHARED=1',
116 '_FILE_OFFSET_BITS=64',
119 [ 'OS=="linux" or OS=="freebsd" or OS=="openbsd" or OS=="solaris"', {
120 'cflags': [ '-Wall', '-pthread', ],
121 'cflags_cc': [ '-fno-rtti', '-fno-exceptions' ],
122 'ldflags': [ '-pthread', ],
124 [ 'target_arch=="ia32"', {
125 'cflags': [ '-m32' ],
126 'ldflags': [ '-m32' ],
129 'cflags': [ '-ansi' ],
131 [ 'visibility=="hidden"', {
132 'cflags': [ '-fvisibility=hidden' ],
138 'ALWAYS_SEARCH_USER_PATHS': 'NO',
139 'GCC_CW_ASM_SYNTAX': 'NO', # No -fasm-blocks
140 'GCC_DYNAMIC_NO_PIC': 'NO', # No -mdynamic-no-pic
141 # (Equivalent to -fPIC)
142 'GCC_ENABLE_CPP_EXCEPTIONS': 'NO', # -fno-exceptions
143 'GCC_ENABLE_CPP_RTTI': 'NO', # -fno-rtti
144 'GCC_ENABLE_PASCAL_STRINGS': 'NO', # No -mpascal-strings
145 'GCC_THREADSAFE_STATICS': 'NO', # -fno-threadsafe-statics
146 'GCC_VERSION': '4.2',
147 'GCC_WARN_ABOUT_MISSING_NEWLINE': 'YES', # -Wnewline-eof
148 'MACOSX_DEPLOYMENT_TARGET': '10.4', # -mmacosx-version-min=10.4
149 'PREBINDING': 'NO', # No -Wl,-prebind
150 'USE_HEADERMAP': 'NO',
152 '-fno-strict-aliasing',
158 '-Wno-unused-parameter',
161 'target_conditions': [
162 ['_type!="static_library"', {
163 'xcode_settings': {'OTHER_LDFLAGS': ['-Wl,-search_paths_first']},