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
12 'default_configuration': 'Debug',
15 'defines': [ 'DEBUG', '_DEBUG' ],
16 'cflags': [ '-g', '-O0' ],
19 'target_conditions': [
20 ['library=="static_library"', {
21 'RuntimeLibrary': 1, # static debug
23 'RuntimeLibrary': 3, # DLL debug
26 'Optimization': 0, # /Od, no optimization
27 'MinimalRebuild': 'false',
28 'OmitFramePointers': 'false',
29 'BasicRuntimeChecks': 3, # /RTC1
32 'LinkIncremental': 2, # enable incremental linking
36 'GCC_OPTIMIZATION_LEVEL': '0',
40 'defines': [ 'EV_VERIFY=2' ],
45 'defines': [ 'NDEBUG' ],
46 'cflags': [ '-O3', '-fomit-frame-pointer', '-fdata-sections', '-ffunction-sections' ],
49 'target_conditions': [
50 ['library=="static_library"', {
51 'RuntimeLibrary': 0, # static release
53 'RuntimeLibrary': 2, # debug release
56 'Optimization': 3, # /Ox, full optimization
57 'FavorSizeOrSpeed': 1, # /Ot, favour speed over size
58 'InlineFunctionExpansion': 2, # /Ob2, inline anything eligible
59 'WholeProgramOptimization': 'true', # /GL, whole program optimization, needed for LTCG
60 'OmitFramePointers': 'true',
61 'EnableFunctionLevelLinking': 'true',
62 'EnableIntrinsicFunctions': 'true',
65 'AdditionalOptions': [
66 '/LTCG', # link time code generation
70 'LinkTimeCodeGeneration': 1, # link-time code generation
71 'OptimizeReferences': 2, # /OPT:REF
72 'EnableCOMDATFolding': 2, # /OPT:ICF
73 'LinkIncremental': 1, # disable incremental linking
80 'StringPooling': 'true', # pool string literals
81 'DebugInformationFormat': 3, # Generate a PDB
83 'BufferSecurityCheck': 'true',
84 'ExceptionHandling': 1, # /EHsc
85 'SuppressStartupBanner': 'true',
86 'WarnAsError': 'false',
87 'AdditionalOptions': [
88 '/MP', # compile across multiple CPUs
94 'GenerateDebugInformation': 'true',
95 'RandomizedBaseAddress': 2, # enable ASLR
96 'DataExecutionPrevention': 2, # enable DEP
97 'AllowIsolation': 'true',
98 'SuppressStartupBanner': 'true',
99 'target_conditions': [
100 ['_type=="executable"', {
101 'SubSystem': 1, # console executable
108 'msvs_cygwin_shell': 0, # prevent actions from trying to use cygwin
111 # we don't really want VC++ warning us about
112 # how dangerous C functions are...
113 '_CRT_SECURE_NO_DEPRECATE',
114 # ... or that C implementations shouldn't use
116 '_CRT_NONSTDC_NO_DEPRECATE',
119 [ 'OS=="linux" or OS=="freebsd" or OS=="openbsd" or OS=="solaris"', {
121 'gcc_version%': '<!(python build/gcc_version.py)>)',
123 'cflags': [ '-Wall' ],
124 'cflags_cc': [ '-fno-rtti', '-fno-exceptions' ],
126 [ 'host_arch != target_arch and target_arch=="ia32"', {
127 'cflags': [ '-m32' ],
128 'ldflags': [ '-m32' ],
131 'cflags': [ '-ansi' ],
134 'cflags': [ '-pthreads' ],
135 'ldflags': [ '-pthreads' ],
137 'cflags': [ '-pthread' ],
138 'ldflags': [ '-pthread' ],
140 [ 'visibility=="hidden" and gcc_version >= "4.0.0"', {
141 'cflags': [ '-fvisibility=hidden' ],
147 'ALWAYS_SEARCH_USER_PATHS': 'NO',
148 'GCC_CW_ASM_SYNTAX': 'NO', # No -fasm-blocks
149 'GCC_DYNAMIC_NO_PIC': 'NO', # No -mdynamic-no-pic
150 # (Equivalent to -fPIC)
151 'GCC_ENABLE_CPP_EXCEPTIONS': 'NO', # -fno-exceptions
152 'GCC_ENABLE_CPP_RTTI': 'NO', # -fno-rtti
153 'GCC_ENABLE_PASCAL_STRINGS': 'NO', # No -mpascal-strings
154 # GCC_INLINES_ARE_PRIVATE_EXTERN maps to -fvisibility-inlines-hidden
155 'GCC_INLINES_ARE_PRIVATE_EXTERN': 'YES',
156 'GCC_SYMBOLS_PRIVATE_EXTERN': 'YES', # -fvisibility=hidden
157 'GCC_THREADSAFE_STATICS': 'NO', # -fno-threadsafe-statics
158 'GCC_WARN_ABOUT_MISSING_NEWLINE': 'YES', # -Wnewline-eof
159 'PREBINDING': 'NO', # No -Wl,-prebind
160 'USE_HEADERMAP': 'NO',
162 '-fno-strict-aliasing',
168 '-Wno-unused-parameter',
171 'target_conditions': [
172 ['_type!="static_library"', {
173 'xcode_settings': {'OTHER_LDFLAGS': ['-Wl,-search_paths_first']},