environment: fix LLVM 18 support in get_llvm_tool_names()

In 67afddbf43, we added LLVM 18, but LLVM >= 18
uses a new version scheme of X.Y, not X.0.Y (where using "X" was enough).

See https://discourse.llvm.org/t/rfc-name-the-first-release-from-a-branch-n-1-0-instead-of-n-0-0/75384.

Without this, I get a test failure:
```
 mesonbuild.interpreterbase.exceptions.InterpreterException: Assert failed: config-tool and cmake returns different major versions
   -> frameworks: 15 llvm    (method=combination link-static=False)
```

Fixes: https://github.com/mesonbuild/meson/issues/12961
Signed-off-by: Sam James <sam@gentoo.org>
Signed-off-by: Eli Schwartz <eschwartz93@gmail.com>
pull/12964/head
Sam James 8 months ago committed by Eli Schwartz
parent 0762b86e59
commit dec93ce9a5
No known key found for this signature in database
GPG Key ID: CEB167EFB5722BD6
  1. 1
      mesonbuild/environment.py

@ -188,6 +188,7 @@ def get_llvm_tool_names(tool: str) -> T.List[str]:
# unless it becomes a stable release.
suffixes = [
'', # base (no suffix)
'-18.1', '18.1',
'-18', '18',
'-17', '17',
'-16', '16',

Loading…
Cancel
Save