From 2256e6314b610b8f6645d0c5384536001ddeccf9 Mon Sep 17 00:00:00 2001 From: Marvin Scholz Date: Thu, 25 Oct 2018 03:26:36 +0200 Subject: 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 --- mesonbuild/compilers/c.py | 3 +++ 1 file changed, 3 insertions(+) (limited to 'mesonbuild/compilers') 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'] -- cgit v1.1