aboutsummaryrefslogtreecommitdiff
path: root/mesonbuild/compilers/d.py
diff options
context:
space:
mode:
authorMatthias Klumpp <matthias@tenstral.net>2019-02-17 05:12:05 +0100
committerJussi Pakkanen <jpakkane@gmail.com>2019-02-18 22:11:19 +0200
commit2cede4d6c9264f725ab57f48e929c748fa1f1ac8 (patch)
treef24491b638403f2403e4d4aa469d78e629c8ad8a /mesonbuild/compilers/d.py
parent51dadb92d0d177b173bcb10f2b5d6c31f714d027 (diff)
downloadmeson-2cede4d6c9264f725ab57f48e929c748fa1f1ac8.zip
meson-2cede4d6c9264f725ab57f48e929c748fa1f1ac8.tar.gz
meson-2cede4d6c9264f725ab57f48e929c748fa1f1ac8.tar.bz2
d: Translate the -isystem flag for LDC and DMD
Diffstat (limited to 'mesonbuild/compilers/d.py')
-rw-r--r--mesonbuild/compilers/d.py11
1 files changed, 11 insertions, 0 deletions
diff --git a/mesonbuild/compilers/d.py b/mesonbuild/compilers/d.py
index 40906c5..afc287f 100644
--- a/mesonbuild/compilers/d.py
+++ b/mesonbuild/compilers/d.py
@@ -380,6 +380,17 @@ class DCompiler(Compiler):
# translate library link flag
dcargs.append('-L=' + arg)
continue
+ elif arg.startswith('-isystem'):
+ # translate -isystem system include path
+ # this flag might sometimes be added by C library Cflags via
+ # pkg-config.
+ # NOTE: -isystem and -I are not 100% equivalent, so this is just
+ # a workaround for the most common cases.
+ if arg.startswith('-isystem='):
+ dcargs.append('-I=' + arg[9:])
+ else:
+ dcargs.append('-I')
+ continue
elif arg.startswith('-L/') or arg.startswith('-L./'):
# we need to handle cases where -L is set by e.g. a pkg-config
# setting to select a linker search path. We can however not