diff options
| author | GoaLitiuM <goalitium@kapsi.fi> | 2018-09-06 04:52:09 +0300 |
|---|---|---|
| committer | GoaLitiuM <goalitium@kapsi.fi> | 2018-09-06 05:18:08 +0300 |
| commit | 644809fe59f331a7143587b9b71ad3c514cbb59b (patch) | |
| tree | 1da51256e73ae191dabcc1e2e2b70e7e3fc882d9 | |
| parent | 040dd03a7a605829df14678dac4aa2dee0eda4b1 (diff) | |
| download | meson-644809fe59f331a7143587b9b71ad3c514cbb59b.tar.gz | |
Make sure static library files are passed properly to the linker
| -rw-r--r-- | mesonbuild/compilers/d.py | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/mesonbuild/compilers/d.py b/mesonbuild/compilers/d.py index 6801db75e..5433b3626 100644 --- a/mesonbuild/compilers/d.py +++ b/mesonbuild/compilers/d.py @@ -328,6 +328,17 @@ class DCompiler(Compiler): # compiler (pass flag through to the linker) # Hence, we guess here whether the flag was intended to pass # a linker search path. + + # Make sure static library files are passed properly to the linker. + if arg.endswith('.a') or arg.endswith('.lib'): + if arg.startswith('-L='): + farg = arg[3:] + else: + farg = arg[2:] + if len(farg) > 0 and not farg.startswith('-'): + dcargs.append('-L=' + farg) + continue + dcargs.append('-L=' + arg) continue |
