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' ],
48 'cflags': [ '-O3', '-fomit-frame-pointer', '-fdata-sections', '-ffunction-sections' ],
51 'target_conditions': [
52 ['library=="static_library"', {
53 'RuntimeLibrary': 0, # static release
55 'RuntimeLibrary': 2, # debug release
58 'Optimization': 3, # /Ox, full optimization
59 'FavorSizeOrSpeed': 1, # /Ot, favour speed over size
60 'InlineFunctionExpansion': 2, # /Ob2, inline anything eligible
61 'WholeProgramOptimization': 'true', # /GL, whole program optimization, needed for LTCG
62 'OmitFramePointers': 'true',
63 'EnableFunctionLevelLinking': 'true',
64 'EnableIntrinsicFunctions': 'true',
67 'AdditionalOptions': [
68 '/LTCG', # link time code generation
72 'LinkTimeCodeGeneration': 1, # link-time code generation
73 'OptimizeReferences': 2, # /OPT:REF
74 'EnableCOMDATFolding': 2, # /OPT:ICF
75 'LinkIncremental': 1, # disable incremental linking
82 'StringPooling': 'true', # pool string literals
83 'DebugInformationFormat': 3, # Generate a PDB
85 'BufferSecurityCheck': 'true',
86 'ExceptionHandling': 1, # /EHsc
87 'SuppressStartupBanner': 'true',
88 'WarnAsError': 'false',
89 'AdditionalOptions': [
90 '/MP', # compile across multiple CPUs
96 'GenerateDebugInformation': 'true',
97 'RandomizedBaseAddress': 2, # enable ASLR
98 'DataExecutionPrevention': 2, # enable DEP
99 'AllowIsolation': 'true',
100 'SuppressStartupBanner': 'true',
101 'target_conditions': [
102 ['_type=="executable"', {
103 'SubSystem': 1, # console executable
110 'msvs_cygwin_shell': 0, # prevent actions from trying to use cygwin
113 # we don't really want VC++ warning us about
114 # how dangerous C functions are...
115 '_CRT_SECURE_NO_DEPRECATE',
116 # ... or that C implementations shouldn't use
118 '_CRT_NONSTDC_NO_DEPRECATE',
120 'target_conditions': [
121 ['target_arch=="x64"', {
122 'msvs_configuration_platform': 'x64'
126 [ 'OS=="linux" or OS=="freebsd" or OS=="openbsd" or OS=="solaris"', {
127 'cflags': [ '-Wall' ],
128 'cflags_cc': [ '-fno-rtti', '-fno-exceptions' ],
130 [ 'host_arch != target_arch and target_arch=="ia32"', {
131 'cflags': [ '-m32' ],
132 'ldflags': [ '-m32' ],
135 'cflags': [ '-ansi' ],
138 'cflags': [ '-pthreads' ],
139 'ldflags': [ '-pthreads' ],
141 'cflags': [ '-pthread' ],
142 'ldflags': [ '-pthread' ],
144 [ 'visibility=="hidden" and (clang==1 or gcc_version >= 40)', {
145 'cflags': [ '-fvisibility=hidden' ],
151 'ALWAYS_SEARCH_USER_PATHS': 'NO',
152 'GCC_CW_ASM_SYNTAX': 'NO', # No -fasm-blocks
153 'GCC_DYNAMIC_NO_PIC': 'NO', # No -mdynamic-no-pic
154 # (Equivalent to -fPIC)
155 'GCC_ENABLE_CPP_EXCEPTIONS': 'NO', # -fno-exceptions
156 'GCC_ENABLE_CPP_RTTI': 'NO', # -fno-rtti
157 'GCC_ENABLE_PASCAL_STRINGS': 'NO', # No -mpascal-strings
158 # GCC_INLINES_ARE_PRIVATE_EXTERN maps to -fvisibility-inlines-hidden
159 'GCC_INLINES_ARE_PRIVATE_EXTERN': 'YES',
160 'GCC_SYMBOLS_PRIVATE_EXTERN': 'YES', # -fvisibility=hidden
161 'GCC_THREADSAFE_STATICS': 'NO', # -fno-threadsafe-statics
162 'GCC_WARN_ABOUT_MISSING_NEWLINE': 'YES', # -Wnewline-eof
163 'PREBINDING': 'NO', # No -Wl,-prebind
164 'USE_HEADERMAP': 'NO',
166 '-fno-strict-aliasing',
172 '-Wno-unused-parameter',
175 'target_conditions': [
176 ['_type!="static_library"', {
177 'xcode_settings': {'OTHER_LDFLAGS': ['-Wl,-search_paths_first']},