GHC issueshttps://gitlab.haskell.org/ghc/ghc/-/issues2021-06-10T14:45:04Zhttps://gitlab.haskell.org/ghc/ghc/-/issues/16912LLVM version check for GHC 8.8.1-alpha22021-06-10T14:45:04ZStefan Schulze FrielinghausLLVM version check for GHC 8.8.1-alpha2While giving 8.8.1-alpha2 a try and using the LLVM backend I receive a lot of warnings of the form
```
You are using an unsupported version of LLVM! ...While giving 8.8.1-alpha2 a try and using the LLVM backend I receive a lot of warnings of the form
```
You are using an unsupported version of LLVM!
Currently only 7 is supported.
We will try though...
```
However, I'm using version 7:
```
$ llc --version
LLVM (http://llvm.org/):
LLVM version 7.0.1
...
$ opt --version
LLVM (http://llvm.org/):
LLVM version 7.0.1
...
```
I guess the problematic part is the following of file `compiler/llvmGen/LlvmCodeGen.hs`
```
debugTraceMsg dflags 2
(text "Using LLVM version:" <+> text (show ver))
let doWarn = wopt Opt_WarnUnsupportedLlvmVersion dflags
when (ver /= supportedLlvmVersion && doWarn) $
putMsg dflags (text "You are using an unsupported version of LLVM!"
$+$ text ("Currently only " ++
llvmVersionStr supportedLlvmVersion ++
" is supported.")
$+$ text "We will try though...")
```
In my case `ver` equals `LlvmVersion 7` and `supportedLlvmVersion` equals `LlvmVersionOld 7 0`. Thus `ver /= supportedLlvmVersion` evaluates to `False` which is Ok but it shouldn't ;-)
Used GHC version e20fe447e1930fcb8d019904d1b26b4312a835228.8.2