Guard against nonexisting linker.
This commit is contained in:
parent
06a69a6b1c
commit
8e68f30e8f
|
@ -352,7 +352,10 @@ class Environment():
|
||||||
|
|
||||||
def detect_static_linker(self):
|
def detect_static_linker(self):
|
||||||
exelist = self.get_static_linker_exelist()
|
exelist = self.get_static_linker_exelist()
|
||||||
|
try:
|
||||||
p = subprocess.Popen(exelist + ['--version'], stdout=subprocess.PIPE, stderr=subprocess.PIPE)
|
p = subprocess.Popen(exelist + ['--version'], stdout=subprocess.PIPE, stderr=subprocess.PIPE)
|
||||||
|
except OSError:
|
||||||
|
raise EnvironmentException('Could not execute static linker "%s".' % ' '.join(exelist))
|
||||||
(out, err) = p.communicate()
|
(out, err) = p.communicate()
|
||||||
out = out.decode()
|
out = out.decode()
|
||||||
err = err.decode()
|
err = err.decode()
|
||||||
|
|
Loading…
Reference in New Issue