diff options
author | FFY00 <filipe.lains@gmail.com> | 2018-08-27 16:10:46 +0100 |
---|---|---|
committer | Jussi Pakkanen <jpakkane@gmail.com> | 2018-08-27 23:48:51 +0300 |
commit | 234bb45b025700182d942b8f8421bc78f4cd7d4e (patch) | |
tree | a66807b8ccf2e89d0d3e9722399665fcaa6bc1b5 /mesonbuild/environment.py | |
parent | fb770e1e3d17d548c34817001733f2a13f24ce9f (diff) | |
download | meson-234bb45b025700182d942b8f8421bc78f4cd7d4e.zip meson-234bb45b025700182d942b8f8421bc78f4cd7d4e.tar.gz meson-234bb45b025700182d942b8f8421bc78f4cd7d4e.tar.bz2 |
d: fix how the DC variable is handled
Diffstat (limited to 'mesonbuild/environment.py')
-rw-r--r-- | mesonbuild/environment.py | 8 |
1 files changed, 2 insertions, 6 deletions
diff --git a/mesonbuild/environment.py b/mesonbuild/environment.py index 38f66e9..9e9b5fc 100644 --- a/mesonbuild/environment.py +++ b/mesonbuild/environment.py @@ -814,12 +814,8 @@ 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.') + if os.path.basename(exelist[-1]).startswith(('ldmd', 'gdmd')): + raise EnvironmentException('Meson doesn\'t support %s as it\'s only a DMD frontend for another compiler. Please provide a valid value for DC or unset it so that Meson can resolve the compiler by itself.' % exelist[-1]) elif self.is_cross_build() and want_cross: exelist = mesonlib.stringlistify(self.cross_info.config['binaries']['d']) is_cross = True |