From dec93ce9a52b234ed4cb25646eaf13c503ba739a Mon Sep 17 00:00:00 2001 From: Sam James Date: Wed, 13 Mar 2024 00:39:07 +0000 Subject: [PATCH] environment: fix LLVM 18 support in get_llvm_tool_names() In 67afddbf431140c1ee064bf79a2fa5a95575488e, 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 Signed-off-by: Eli Schwartz --- mesonbuild/environment.py | 1 + 1 file changed, 1 insertion(+) diff --git a/mesonbuild/environment.py b/mesonbuild/environment.py index 86bbbb136..54fb50af1 100644 --- a/mesonbuild/environment.py +++ b/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',