1
0
mirror of https://github.com/libuv/libuv synced 2025-03-28 21:13:16 +00:00

build: handle bad gcc -dumpversion output

`gcc -dumpversion` usually prints major.minor - but on sunos it prints
major.minor.patch.
This commit is contained in:
Ben Noordhuis 2012-08-17 16:28:29 +02:00
parent 034ea318af
commit 1ba01fddda

4
gyp_uv
View File

@ -22,7 +22,9 @@ def compiler_version():
proc = subprocess.Popen(CC.split() + ['--version'], stdout=subprocess.PIPE)
is_clang = 'clang' in proc.communicate()[0].split('\n')[0]
proc = subprocess.Popen(CC.split() + ['-dumpversion'], stdout=subprocess.PIPE)
version = tuple(map(int, proc.communicate()[0].split('.')))
version = proc.communicate()[0].split('.')
version = map(int, version[:2])
version = tuple(version)
return (version, is_clang)