Skip to content
Snippets Groups Projects
Commit a260e7e8 authored by Jeffrey Salmond's avatar Jeffrey Salmond Committed by Todd Gamblin
Browse files

Bugfix in concretize_compiler (#2196)

* fix bug in search for concrete compiler

* simplify implementation of concretize_compiler

* fix flake8 errors
parent 6d1c32d4
No related branches found
No related tags found
No related merge requests found
...@@ -385,14 +385,13 @@ def _proper_compiler_style(cspec, arch): ...@@ -385,14 +385,13 @@ def _proper_compiler_style(cspec, arch):
arch.platform_os) arch.platform_os)
# copy concrete version into other_compiler # copy concrete version into other_compiler
index = 0 try:
while not _proper_compiler_style(matches[index], spec.architecture): spec.compiler = next(
index += 1 c for c in matches
if index == len(matches) - 1: if _proper_compiler_style(c, spec.architecture)).copy()
arch = spec.architecture except StopIteration:
raise UnavailableCompilerVersionError(spec.compiler, raise UnavailableCompilerVersionError(spec.compiler,
arch.platform_os) arch.platform_os)
spec.compiler = matches[index].copy()
assert(spec.compiler.concrete) assert(spec.compiler.concrete)
return True # things changed. return True # things changed.
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment