PKGBUILDs/extra/meson/0002-d-Detect-recent-DMD-compilers.patch
2018-01-28 14:35:46 +00:00

33 lines
1.5 KiB
Diff

From 67d5488753911b06b80afd57066e36b4eddec892 Mon Sep 17 00:00:00 2001
Message-Id: <67d5488753911b06b80afd57066e36b4eddec892.1517146929.git.jan.steffens@gmail.com>
In-Reply-To: <89d4decc9cdda01590c2a734c0f58924bcf30777.1517146929.git.jan.steffens@gmail.com>
References: <89d4decc9cdda01590c2a734c0f58924bcf30777.1517146929.git.jan.steffens@gmail.com>
From: Matthias Klumpp <matthias@tenstral.net>
Date: Sun, 7 Jan 2018 17:57:43 +0100
Subject: [PATCH 2/2] d: Detect recent DMD compilers
They now are published by the D Language Foundation, and not Digital
Mars. Therefore, their signature has changed slightly.
(We can not check for 'DMD', because that string appears in every
compiler version output to denote the frontend version used by the
compiler).
---
mesonbuild/environment.py | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/mesonbuild/environment.py b/mesonbuild/environment.py
index 0cb1450e..7fa4732a 100644
--- a/mesonbuild/environment.py
+++ b/mesonbuild/environment.py
@@ -725,7 +725,7 @@ class Environment:
return compilers.LLVMDCompiler(exelist, version, is_cross)
elif 'gdc' in out:
return compilers.GnuDCompiler(exelist, version, is_cross)
- elif 'Digital Mars' in out:
+ elif 'The D Language Foundation' in out or 'Digital Mars' in out:
return compilers.DmdDCompiler(exelist, version, is_cross)
raise EnvironmentException('Unknown compiler "' + ' '.join(exelist) + '"')
--
2.16.1