diff options
author | FFY00 <filipe.lains@gmail.com> | 2018-08-25 23:43:56 +0100 |
---|---|---|
committer | Jussi Pakkanen <jpakkane@gmail.com> | 2018-08-27 00:57:35 +0300 |
commit | ac07ae7d41e82663c955363e5124404fe9410262 (patch) | |
tree | ad0da4724490cf2edb4de7935d623f7226838a68 /mesonbuild/environment.py | |
parent | e0e980e0646c299bc8e0dd1b32b85a6e53fd6f6c (diff) | |
download | meson-ac07ae7d41e82663c955363e5124404fe9410262.zip meson-ac07ae7d41e82663c955363e5124404fe9410262.tar.gz meson-ac07ae7d41e82663c955363e5124404fe9410262.tar.bz2 |
d: disallow dmd frontends (ldmd and gdc)
Diffstat (limited to 'mesonbuild/environment.py')
-rw-r--r-- | mesonbuild/environment.py | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/mesonbuild/environment.py b/mesonbuild/environment.py index c64fe59..a5586dd 100644 --- a/mesonbuild/environment.py +++ b/mesonbuild/environment.py @@ -813,6 +813,12 @@ This is probably wrong, it should always point to the native compiler.''' % evar # up to date language version at time (2016). if 'DC' in os.environ: exelist = shlex.split(os.environ['DC']) + for dc in exelist[:]: + if os.path.basename(dc).startswith(('ldmd', 'gdmd')): + mlog.log('Meson doesn\'t support', mlog.bold(dc), 'as it\'s only a DMD frontend for another compiler, skipping.') + exelist.remove(dc) + if not exelist: + raise EnvironmentException('Couldn\'t find any compatible D compiler in the DC environment variable. Please provide a valid value for DC or unset it so that Meson resolve the compiler by itself.') elif self.is_cross_build() and want_cross: exelist = mesonlib.stringlistify(self.cross_info.config['binaries']['d']) is_cross = True |