File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 77 'library%' : 'static_library' , # allow override to 'shared_library' for DLL/.so builds
88 'component%' : 'static_library' , # NB. these names match with what V8 expects
99 'msvs_multi_core_compile' : '0' , # we do enable multicore compiles, but not using the V8 way
10+ 'gcc_version%' : 'unknown' ,
11+ 'clang%' : 0 ,
1012
1113 # Turn on optimizations that may trigger compiler bugs.
1214 # Use at your own risk. Do *NOT* report bugs if this option is enabled.
5355 'cflags' : [ '-O3' , '-ffunction-sections' , '-fdata-sections' ],
5456 'ldflags' : [ '-Wl,--gc-sections' ],
5557 }, {
56- 'cflags' : [ '-O2' , '-fno-strict-aliasing' , '-fno-tree-vrp' ],
58+ 'cflags' : [ '-O2' , '-fno-strict-aliasing' ],
5759 'cflags!' : [ '-O3' , '-fstrict-aliasing' ],
5860 'conditions' : [
5961 # Required by the dtrace post-processor. Unfortunately,
6466 }, {
6567 'cflags!' : [ '-ffunction-sections' , '-fdata-sections' ],
6668 }],
69+ ['clang==1 or gcc_version >= 40' , {
70+ 'cflags' : [ '-fno-tree-vrp' ],
71+ }],
6772 ],
6873 }],
6974 ['OS=="solaris"' , {
Original file line number Diff line number Diff line change @@ -339,8 +339,13 @@ def configure_node(o):
339339 o ['variables' ]['v8_use_arm_eabi_hardfloat' ] = b (hard_float )
340340 o ['variables' ]['armv7' ] = 1 if is_arch_armv7 () else 0
341341
342- # clang has always supported -fvisibility=hidden, right?
343342 cc_version , is_clang = compiler_version ()
343+ o ['variables' ]['clang' ] = 1 if is_clang else 0
344+
345+ if not is_clang :
346+ o ['variables' ]['gcc_version' ] = 10 * cc_version [0 ] + cc_version [1 ]
347+
348+ # clang has always supported -fvisibility=hidden, right?
344349 if not is_clang and cc_version < (4 ,0 ,0 ):
345350 o ['variables' ]['visibility' ] = ''
346351
You can’t perform that action at this time.
0 commit comments