fix UnboundLocalError if guess_win_linker fails in detect_fortran_compiler

pull/12806/head
H. Vetinari 10 months ago committed by Dylan Baker
parent cb54f0d707
commit 6fcf8632c6
  1. 1
      mesonbuild/compilers/detect.py

@ -769,6 +769,7 @@ def detect_fortran_compiler(env: 'Environment', for_machine: MachineChoice) -> C
if 'flang' in out or 'clang' in out: if 'flang' in out or 'clang' in out:
cls = fortran.FlangFortranCompiler cls = fortran.FlangFortranCompiler
linker = None
if 'windows' in out or env.machines[for_machine].is_windows(): if 'windows' in out or env.machines[for_machine].is_windows():
# If we're in a MINGW context this actually will use a gnu # If we're in a MINGW context this actually will use a gnu
# style ld, but for flang on "real" windows we'll use # style ld, but for flang on "real" windows we'll use

Loading…
Cancel
Save