Browse Source

configure: remove compiler detection

The GCC version is no longer relevant since only 4.8 and newer are
supported. It's probably safe to assume clang on mac since V8 does
so too.

PR-URL: https://github.com/iojs/io.js/pull/205
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
archived-io.js-v0.12
Nikolai Vavilov 10 years ago
committed by Ben Noordhuis
parent
commit
0f3d7e6032
  1. 7
      common.gypi
  2. 22
      configure

7
common.gypi

@ -9,8 +9,6 @@
'library%': 'static_library', # allow override to 'shared_library' for DLL/.so builds 'library%': 'static_library', # allow override to 'shared_library' for DLL/.so builds
'component%': 'static_library', # NB. these names match with what V8 expects 'component%': 'static_library', # NB. these names match with what V8 expects
'msvs_multi_core_compile': '0', # we do enable multicore compiles, but not using the V8 way 'msvs_multi_core_compile': '0', # we do enable multicore compiles, but not using the V8 way
'gcc_version%': 'unknown',
'clang%': 0,
'python%': 'python', 'python%': 'python',
'node_tag%': '', 'node_tag%': '',
@ -38,6 +36,11 @@
'OBJ_DIR': '<(PRODUCT_DIR)/obj.target', 'OBJ_DIR': '<(PRODUCT_DIR)/obj.target',
'V8_BASE': '<(PRODUCT_DIR)/obj.target/deps/v8/tools/gyp/libv8_base.a', 'V8_BASE': '<(PRODUCT_DIR)/obj.target/deps/v8/tools/gyp/libv8_base.a',
}], }],
['OS=="mac"', {
'clang%': 1,
}, {
'clang%': 0,
}],
], ],
}, },

22
configure

@ -398,22 +398,6 @@ def host_arch_win():
return matchup.get(arch, 'ia32') return matchup.get(arch, 'ia32')
def compiler_version():
try:
proc = subprocess.Popen(shlex.split(CC) + ['--version'],
stdout=subprocess.PIPE)
except WindowsError:
return (0, False)
is_clang = 'clang' in proc.communicate()[0].split('\n')[0]
proc = subprocess.Popen(shlex.split(CC) + ['-dumpversion'],
stdout=subprocess.PIPE)
version = tuple(map(int, proc.communicate()[0].split('.')))
return (version, is_clang)
def configure_arm(o): def configure_arm(o):
if options.arm_float_abi: if options.arm_float_abi:
arm_float_abi = options.arm_float_abi arm_float_abi = options.arm_float_abi
@ -455,12 +439,6 @@ def configure_node(o):
if target_arch == 'arm': if target_arch == 'arm':
configure_arm(o) configure_arm(o)
cc_version, is_clang = compiler_version()
o['variables']['clang'] = 1 if is_clang else 0
if not is_clang and cc_version != 0:
o['variables']['gcc_version'] = 10 * cc_version[0] + cc_version[1]
if flavor in ('solaris', 'mac', 'linux', 'freebsd'): if flavor in ('solaris', 'mac', 'linux', 'freebsd'):
use_dtrace = not options.without_dtrace use_dtrace = not options.without_dtrace
# Don't enable by default on linux and freebsd # Don't enable by default on linux and freebsd

Loading…
Cancel
Save