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