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',
39 'OTHER_CFLAGS': [ '-Wno-strict-aliasing' ],
43 'defines': [ 'EV_VERIFY=2' ],
48 'defines': [ 'NDEBUG' ],
52 '-fomit-frame-pointer',
54 '-ffunction-sections',
58 'target_conditions': [
59 ['library=="static_library"', {
60 'RuntimeLibrary': 0, # static release
62 'RuntimeLibrary': 2, # debug release
65 'Optimization': 3, # /Ox, full optimization
66 'FavorSizeOrSpeed': 1, # /Ot, favour speed over size
67 'InlineFunctionExpansion': 2, # /Ob2, inline anything eligible
68 'WholeProgramOptimization': 'true', # /GL, whole program optimization, needed for LTCG
69 'OmitFramePointers': 'true',
70 'EnableFunctionLevelLinking': 'true',
71 'EnableIntrinsicFunctions': 'true',
74 'AdditionalOptions': [
75 '/LTCG', # link time code generation
79 'LinkTimeCodeGeneration': 1, # link-time code generation
80 'OptimizeReferences': 2, # /OPT:REF
81 'EnableCOMDATFolding': 2, # /OPT:ICF
82 'LinkIncremental': 1, # disable incremental linking
89 'StringPooling': 'true', # pool string literals
90 'DebugInformationFormat': 3, # Generate a PDB
92 'BufferSecurityCheck': 'true',
93 'ExceptionHandling': 1, # /EHsc
94 'SuppressStartupBanner': 'true',
95 'WarnAsError': 'false',
96 'AdditionalOptions': [
97 '/MP', # compile across multiple CPUs
103 'GenerateDebugInformation': 'true',
104 'RandomizedBaseAddress': 2, # enable ASLR
105 'DataExecutionPrevention': 2, # enable DEP
106 'AllowIsolation': 'true',
107 'SuppressStartupBanner': 'true',
108 'target_conditions': [
109 ['_type=="executable"', {
110 'SubSystem': 1, # console executable
117 'msvs_cygwin_shell': 0, # prevent actions from trying to use cygwin
120 # we don't really want VC++ warning us about
121 # how dangerous C functions are...
122 '_CRT_SECURE_NO_DEPRECATE',
123 # ... or that C implementations shouldn't use
125 '_CRT_NONSTDC_NO_DEPRECATE',
127 'target_conditions': [
128 ['target_arch=="x64"', {
129 'msvs_configuration_platform': 'x64'
133 ['OS in "freebsd linux openbsd solaris android"', {
134 'cflags': [ '-Wall' ],
135 'cflags_cc': [ '-fno-rtti', '-fno-exceptions' ],
136 'target_conditions': [
137 ['_type=="static_library"', {
138 'standalone_static_library': 1, # disable thin archive which needs binutils >= 2.19
142 [ 'host_arch != target_arch and target_arch=="ia32"', {
143 'cflags': [ '-m32' ],
144 'ldflags': [ '-m32' ],
147 'cflags': [ '-ansi' ],
150 'cflags': [ '-pthreads' ],
151 'ldflags': [ '-pthreads' ],
153 [ 'OS not in "solaris android"', {
154 'cflags': [ '-pthread' ],
155 'ldflags': [ '-pthread' ],
157 [ 'visibility=="hidden" and (clang==1 or gcc_version >= 40)', {
158 'cflags': [ '-fvisibility=hidden' ],
164 'ALWAYS_SEARCH_USER_PATHS': 'NO',
165 'GCC_CW_ASM_SYNTAX': 'NO', # No -fasm-blocks
166 'GCC_DYNAMIC_NO_PIC': 'NO', # No -mdynamic-no-pic
167 # (Equivalent to -fPIC)
168 'GCC_ENABLE_CPP_EXCEPTIONS': 'NO', # -fno-exceptions
169 'GCC_ENABLE_CPP_RTTI': 'NO', # -fno-rtti
170 'GCC_ENABLE_PASCAL_STRINGS': 'NO', # No -mpascal-strings
171 # GCC_INLINES_ARE_PRIVATE_EXTERN maps to -fvisibility-inlines-hidden
172 'GCC_INLINES_ARE_PRIVATE_EXTERN': 'YES',
173 'GCC_SYMBOLS_PRIVATE_EXTERN': 'YES', # -fvisibility=hidden
174 'GCC_THREADSAFE_STATICS': 'NO', # -fno-threadsafe-statics
175 'GCC_WARN_ABOUT_MISSING_NEWLINE': 'YES', # -Wnewline-eof
176 'PREBINDING': 'NO', # No -Wl,-prebind
177 'USE_HEADERMAP': 'NO',
185 '-Wno-unused-parameter',
189 ['target_arch=="ia32"', {
190 'xcode_settings': {'ARCHS': ['i386']},
192 ['target_arch=="x64"', {
193 'xcode_settings': {'ARCHS': ['x86_64']},
196 'target_conditions': [
197 ['_type!="static_library"', {
198 'xcode_settings': {'OTHER_LDFLAGS': ['-Wl,-search_paths_first']},
203 'cflags': [ '-fno-omit-frame-pointer' ],
204 # pull in V8's postmortem metadata
205 'ldflags': [ '-Wl,-z,allextract' ]