From 77dd0429cfb0b5309b44df4acc5380aa014c5bd1 Mon Sep 17 00:00:00 2001 From: Andrei Horodniceanu Date: Tue, 11 Mar 2025 12:12:14 +0200 Subject: mesonbuild/compilers/detect.py: Support Open D ldc and dmd Signed-off-by: Andrei Horodniceanu --- mesonbuild/compilers/detect.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/mesonbuild/compilers/detect.py b/mesonbuild/compilers/detect.py index 784e00d3d..bce0be8a8 100644 --- a/mesonbuild/compilers/detect.py +++ b/mesonbuild/compilers/detect.py @@ -1191,7 +1191,11 @@ def detect_d_compiler(env: 'Environment', for_machine: MachineChoice) -> Compile version = search_version(out) full_version = out.split('\n', 1)[0] - if 'LLVM D compiler' in out: + # The OpenD fork should stay close enough to upstream D (in + # the areas that interest us) to allow supporting them both + # without much hassle. + # See: https://github.com/orgs/opendlang/discussions/56 + if 'LLVM D compiler' in out or 'LLVM Open D compiler' in out: cls = d.LLVMDCompiler # LDC seems to require a file # We cannot use NamedTemporaryFile on windows, its documented -- cgit v1.3