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 'library%': 'static_library', # allow override to 'shared_library' for DLL/.so builds
7 'component%': 'static_library', # NB. these names match with what V8 expects
8 'msvs_multi_core_compile': '0', # we do enable multicore compiles, but not using the V8 way
9 'gcc_version%': 'unknown',
14 'default_configuration': 'Debug',
17 'defines': [ 'DEBUG', '_DEBUG' ],
18 'cflags': [ '-g', '-O0', '-fwrapv' ],
21 'target_conditions': [
22 ['library=="static_library"', {
23 'RuntimeLibrary': 1, # static debug
25 'RuntimeLibrary': 3, # DLL debug
28 'Optimization': 0, # /Od, no optimization
29 'MinimalRebuild': 'false',
30 'OmitFramePointers': 'false',
31 'BasicRuntimeChecks': 3, # /RTC1
34 'LinkIncremental': 2, # enable incremental linking
38 'GCC_OPTIMIZATION_LEVEL': '0',
42 'defines': [ 'EV_VERIFY=2' ],
47 'defines': [ 'NDEBUG' ],
51 '-fomit-frame-pointer',
53 '-ffunction-sections',
57 'target_conditions': [
58 ['library=="static_library"', {
59 'RuntimeLibrary': 0, # static release
61 'RuntimeLibrary': 2, # debug release
64 'Optimization': 3, # /Ox, full optimization
65 'FavorSizeOrSpeed': 1, # /Ot, favour speed over size
66 'InlineFunctionExpansion': 2, # /Ob2, inline anything eligible
67 'WholeProgramOptimization': 'true', # /GL, whole program optimization, needed for LTCG
68 'OmitFramePointers': 'true',
69 'EnableFunctionLevelLinking': 'true',
70 'EnableIntrinsicFunctions': 'true',
73 'AdditionalOptions': [
74 '/LTCG', # link time code generation
78 'LinkTimeCodeGeneration': 1, # link-time code generation
79 'OptimizeReferences': 2, # /OPT:REF
80 'EnableCOMDATFolding': 2, # /OPT:ICF
81 'LinkIncremental': 1, # disable incremental linking
88 'StringPooling': 'true', # pool string literals
89 'DebugInformationFormat': 3, # Generate a PDB
91 'BufferSecurityCheck': 'true',
92 'ExceptionHandling': 1, # /EHsc
93 'SuppressStartupBanner': 'true',
94 'WarnAsError': 'false',
95 'AdditionalOptions': [
96 '/MP', # compile across multiple CPUs
102 'GenerateDebugInformation': 'true',
103 'RandomizedBaseAddress': 2, # enable ASLR
104 'DataExecutionPrevention': 2, # enable DEP
105 'AllowIsolation': 'true',
106 'SuppressStartupBanner': 'true',
107 'target_conditions': [
108 ['_type=="executable"', {
109 'SubSystem': 1, # console executable
116 'msvs_cygwin_shell': 0, # prevent actions from trying to use cygwin
119 # we don't really want VC++ warning us about
120 # how dangerous C functions are...
121 '_CRT_SECURE_NO_DEPRECATE',
122 # ... or that C implementations shouldn't use
124 '_CRT_NONSTDC_NO_DEPRECATE',
126 'target_conditions': [
127 ['target_arch=="x64"', {
128 'msvs_configuration_platform': 'x64'
132 [ 'OS=="linux" or OS=="freebsd" or OS=="openbsd" or OS=="solaris"', {
133 'cflags': [ '-Wall' ],
134 'cflags_cc': [ '-fno-rtti', '-fno-exceptions' ],
136 [ 'host_arch != target_arch and target_arch=="ia32"', {
137 'cflags': [ '-m32' ],
138 'ldflags': [ '-m32' ],
141 'cflags': [ '-ansi' ],
144 'cflags': [ '-pthreads' ],
145 'ldflags': [ '-pthreads' ],
147 'cflags': [ '-pthread' ],
148 'ldflags': [ '-pthread' ],
150 [ 'visibility=="hidden" and (clang==1 or gcc_version >= 40)', {
151 'cflags': [ '-fvisibility=hidden' ],
157 'ALWAYS_SEARCH_USER_PATHS': 'NO',
158 'GCC_CW_ASM_SYNTAX': 'NO', # No -fasm-blocks
159 'GCC_DYNAMIC_NO_PIC': 'NO', # No -mdynamic-no-pic
160 # (Equivalent to -fPIC)
161 'GCC_ENABLE_CPP_EXCEPTIONS': 'NO', # -fno-exceptions
162 'GCC_ENABLE_CPP_RTTI': 'NO', # -fno-rtti
163 'GCC_ENABLE_PASCAL_STRINGS': 'NO', # No -mpascal-strings
164 # GCC_INLINES_ARE_PRIVATE_EXTERN maps to -fvisibility-inlines-hidden
165 'GCC_INLINES_ARE_PRIVATE_EXTERN': 'YES',
166 'GCC_SYMBOLS_PRIVATE_EXTERN': 'YES', # -fvisibility=hidden
167 'GCC_THREADSAFE_STATICS': 'NO', # -fno-threadsafe-statics
168 'GCC_WARN_ABOUT_MISSING_NEWLINE': 'YES', # -Wnewline-eof
169 'PREBINDING': 'NO', # No -Wl,-prebind
170 'USE_HEADERMAP': 'NO',
178 '-Wno-unused-parameter',
182 ['target_arch=="ia32"', {
183 'xcode_settings': {'ARCHS': ['i386']},
185 ['target_arch=="x64"', {
186 'xcode_settings': {'ARCHS': ['x86_64']},
189 'target_conditions': [
190 ['_type!="static_library"', {
191 'xcode_settings': {'OTHER_LDFLAGS': ['-Wl,-search_paths_first']},