aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMarvin Scholz <epirat07@gmail.com>2018-10-25 03:26:36 +0200
committerJussi Pakkanen <jpakkane@gmail.com>2018-10-25 19:30:42 +0300
commit2256e6314b610b8f6645d0c5384536001ddeccf9 (patch)
tree58e1a5c1c3fcf092dc562d84052551a7753346a8
parentfc3e2f5ad03d207e5f91aa06c26f8b079c2a29c6 (diff)
downloadmeson-2256e6314b610b8f6645d0c5384536001ddeccf9.zip
meson-2256e6314b610b8f6645d0c5384536001ddeccf9.tar.gz
meson-2256e6314b610b8f6645d0c5384536001ddeccf9.tar.bz2
compilers/c: Fix allow undefined link arg for PE/COFF
For PE/COFF it is not possible to allow undefined symbols, so do not try to use the option to do so. While gcc ld silently ignores it, this is not the case for the llvm linker. Fix #4415
-rw-r--r--mesonbuild/compilers/c.py3
1 files changed, 3 insertions, 0 deletions
diff --git a/mesonbuild/compilers/c.py b/mesonbuild/compilers/c.py
index c51a6ab..c8e473a 100644
--- a/mesonbuild/compilers/c.py
+++ b/mesonbuild/compilers/c.py
@@ -164,6 +164,9 @@ class CCompiler(Compiler):
if self.compiler_type.is_osx_compiler:
# Apple ld
return ['-Wl,-undefined,dynamic_lookup']
+ elif self.compiler_type.is_windows_compiler:
+ # For PE/COFF this is impossible
+ return []
else:
# GNU ld and LLVM lld
return ['-Wl,--allow-shlib-undefined']