aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRemi Thebault <remi.thebault@gmail.com>2021-02-28 19:29:29 +0100
committerDylan Baker <dylan@pnwbakers.com>2021-03-01 09:51:40 -0800
commit3bf207ab1bb85ffd6bc35acbbf63609a33928ed6 (patch)
tree725bd8632771d6da6a1426e1d6ae65b0b398f6ce
parent62b744b2c4458bce30f187bca1e817ffb3a78aeb (diff)
downloadmeson-3bf207ab1bb85ffd6bc35acbbf63609a33928ed6.zip
meson-3bf207ab1bb85ffd6bc35acbbf63609a33928ed6.tar.gz
meson-3bf207ab1bb85ffd6bc35acbbf63609a33928ed6.tar.bz2
D add build dir to -J switch
-rw-r--r--mesonbuild/compilers/d.py8
1 files changed, 6 insertions, 2 deletions
diff --git a/mesonbuild/compilers/d.py b/mesonbuild/compilers/d.py
index eac2aa7..4a6a046 100644
--- a/mesonbuild/compilers/d.py
+++ b/mesonbuild/compilers/d.py
@@ -220,13 +220,15 @@ class DmdLikeCompilerMixin(CompilerMixinBase):
for idir_obj in import_dirs:
basedir = idir_obj.get_curdir()
for idir in idir_obj.get_incdirs():
+ bldtreedir = os.path.join(basedir, idir)
# Avoid superfluous '/.' at the end of paths when d is '.'
if idir not in ('', '.'):
- expdir = os.path.join(basedir, idir)
+ expdir = bldtreedir
else:
expdir = basedir
srctreedir = os.path.join(build_to_src, expdir)
res.append('{0}{1}'.format(import_dir_arg, srctreedir))
+ res.append('{0}{1}'.format(import_dir_arg, bldtreedir))
if kwargs:
raise EnvironmentException('Unknown D compiler feature(s) selected: %s' % ', '.join(kwargs.keys()))
@@ -592,13 +594,15 @@ class DCompiler(Compiler):
for idir_obj in import_dirs:
basedir = idir_obj.get_curdir()
for idir in idir_obj.get_incdirs():
+ bldtreedir = os.path.join(basedir, idir)
# Avoid superfluous '/.' at the end of paths when d is '.'
if idir not in ('', '.'):
- expdir = os.path.join(basedir, idir)
+ expdir = bldtreedir
else:
expdir = basedir
srctreedir = os.path.join(build_to_src, expdir)
res.append('{0}{1}'.format(import_dir_arg, srctreedir))
+ res.append('{0}{1}'.format(import_dir_arg, bldtreedir))
if kwargs:
raise EnvironmentException('Unknown D compiler feature(s) selected: %s' % ', '.join(kwargs.keys()))