Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

configure: remove compiler detection #205

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 5 additions & 2 deletions common.gypi
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,6 @@
'library%': 'static_library', # allow override to 'shared_library' for DLL/.so builds
'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
'gcc_version%': 'unknown',
'clang%': 0,
'python%': 'python',

'node_tag%': '',
Expand Down Expand Up @@ -38,6 +36,11 @@
'OBJ_DIR': '<(PRODUCT_DIR)/obj.target',
'V8_BASE': '<(PRODUCT_DIR)/obj.target/deps/v8/tools/gyp/libv8_base.a',
}],
['OS=="mac"', {
'clang%': 1,
}, {
'clang%': 0,
}],
],
},

Expand Down
22 changes: 0 additions & 22 deletions configure
Original file line number Diff line number Diff line change
Expand Up @@ -398,22 +398,6 @@ def host_arch_win():
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):
if options.arm_float_abi:
arm_float_abi = options.arm_float_abi
Expand Down Expand Up @@ -455,12 +439,6 @@ def configure_node(o):
if target_arch == 'arm':
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'):
use_dtrace = not options.without_dtrace
# Don't enable by default on linux and freebsd
Expand Down