Skip to content

Commit e50dd73

Browse files
author
Frankie Robertson
committed
Prevent /link being passed twice in compiler flags
This does not work correctly with clang-cl/lld-link
1 parent f5d81d0 commit e50dd73

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

mesonbuild/compilers/mixins/visualstudio.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -188,7 +188,7 @@ def get_optimization_args(self, optimization_level: str) -> T.List[str]:
188188
return args
189189

190190
def linker_to_compiler_args(self, args: T.List[str]) -> T.List[str]:
191-
return ['/link'] + args
191+
return ['/link'] + [arg for arg in args if arg != "/link"]
192192

193193
def get_pic_args(self) -> T.List[str]:
194194
return [] # PIC is handled by the loader on Windows

0 commit comments

Comments
 (0)