Skip to content

Commit

Permalink
rust: Fix import lib naming when cross compiling
Browse files Browse the repository at this point in the history
  • Loading branch information
xclaesse committed Jul 21, 2023
1 parent 6d8776f commit 847151f
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions mesonbuild/build.py
Original file line number Diff line number Diff line change
Expand Up @@ -2253,8 +2253,12 @@ def determine_filenames(self):
if self.uses_rust():
# Shared library is of the form foo.dll
prefix = ''
# Import library is called foo.dll.lib
self.import_filename = f'{self.name}.dll.lib'
if self.get_using_msvc():
# Import library is called foo.dll.lib when using MSVC linker
self.import_filename = f'{self.name}.dll.lib'
else:
# Import library is called libfoo.dll.a when using GCC linker
self.import_filename = f'lib{self.name}.dll.a'
# .pdb file is only created when debug symbols are enabled
create_debug_file = self.environment.coredata.get_option(OptionKey("debug"))
elif self.get_using_msvc():
Expand Down

0 comments on commit 847151f

Please sign in to comment.