diff options
author | Jussi Pakkanen <jpakkane@gmail.com> | 2019-01-06 22:47:25 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-01-06 22:47:25 +0200 |
commit | a34ac74cf918a7251d44c2f646972106da1a7f25 (patch) | |
tree | 479a07f584c119a5931b197546b10ffce88f329d /mesonbuild/compilers/d.py | |
parent | 735e138382c2876c181edd09e6bf9bb76225be6d (diff) | |
parent | 52071c6d4ee15c750f8a8620e038b78627db890e (diff) | |
download | meson-a34ac74cf918a7251d44c2f646972106da1a7f25.zip meson-a34ac74cf918a7251d44c2f646972106da1a7f25.tar.gz meson-a34ac74cf918a7251d44c2f646972106da1a7f25.tar.bz2 |
Merge pull request #4547 from mensinda/introIncDirs
mintro: Save introspection to disk and --targets modifications
Diffstat (limited to 'mesonbuild/compilers/d.py')
-rw-r--r-- | mesonbuild/compilers/d.py | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/mesonbuild/compilers/d.py b/mesonbuild/compilers/d.py index 2cf0fbd..3065ac7 100644 --- a/mesonbuild/compilers/d.py +++ b/mesonbuild/compilers/d.py @@ -111,6 +111,19 @@ class DCompiler(Compiler): def get_include_args(self, path, is_system): return ['-I=' + path] + def compute_parameters_with_absolute_paths(self, parameter_list, build_dir): + for idx, i in enumerate(parameter_list): + if i[:3] == '-I=': + parameter_list[idx] = i[:3] + os.path.normpath(os.path.join(build_dir, i[3:])) + if i[:4] == '-L-L': + parameter_list[idx] = i[:4] + os.path.normpath(os.path.join(build_dir, i[4:])) + if i[:5] == '-L=-L': + parameter_list[idx] = i[:5] + os.path.normpath(os.path.join(build_dir, i[5:])) + if i[:6] == '-Wl,-L': + parameter_list[idx] = i[:6] + os.path.normpath(os.path.join(build_dir, i[6:])) + + return parameter_list + def get_warn_args(self, level): return ['-wi'] @@ -511,6 +524,13 @@ class GnuDCompiler(DCompiler): def get_buildtype_args(self, buildtype): return d_gdc_buildtype_args[buildtype] + def compute_parameters_with_absolute_paths(self, parameter_list, build_dir): + for idx, i in enumerate(parameter_list): + if i[:2] == '-I' or i[:2] == '-L': + parameter_list[idx] = i[:2] + os.path.normpath(os.path.join(build_dir, i[2:])) + + return parameter_list + def build_rpath_args(self, build_dir, from_dir, rpath_paths, build_rpath, install_rpath): return self.build_unix_rpath_args(build_dir, from_dir, rpath_paths, build_rpath, install_rpath) |