File tree Expand file tree Collapse file tree 1 file changed +7
-0
lines changed
mesonbuild/compilers/mixins Expand file tree Collapse file tree 1 file changed +7
-0
lines changed Original file line number Diff line number Diff line change @@ -111,6 +111,13 @@ def openmp_flags(self) -> T.List[str]:
111111 # Shouldn't work, but it'll be checked explicitly in the OpenMP dependency.
112112 return []
113113
114+ def gen_vs_module_defs_args (self , defsfile : str ) -> T .List [str ]:
115+ if isinstance (self .linker , (MSVCDynamicLinker )):
116+ # With MSVC, DLLs only export symbols that are explicitly exported,
117+ # so if a module defs file is specified, we use that to export symbols
118+ return ['-Wl,/DEF:' + defsfile ]
119+ return super ().gen_vs_module_defs_args (defsfile )
120+
114121 @classmethod
115122 def use_linker_args (cls , linker : str , version : str ) -> T .List [str ]:
116123 # Clang additionally can use a linker specified as a path, which GCC
You can’t perform that action at this time.
0 commit comments