@@ -309,10 +309,10 @@ def get_target_filename(self, t: T.Union[build.Target, build.CustomTargetIndex],
309309 else :
310310 assert isinstance (t , build .BuildTarget ), t
311311 filename = t .get_filename ()
312- return os . path . join ( self .get_target_dir (t ), filename )
312+ return ( Path ( self .get_target_dir (t )) / filename ). as_posix ( )
313313
314314 def get_target_filename_abs (self , target : T .Union [build .Target , build .CustomTargetIndex ]) -> str :
315- return os . path . join ( self .environment .get_build_dir (), self .get_target_filename (target ))
315+ return ( Path ( self .environment .get_build_dir ()) / self .get_target_filename (target )). as_posix ( )
316316
317317 def get_source_dir_include_args (self , target : build .BuildTarget , compiler : 'Compiler' , * , absolute_path : bool = False ) -> T .List [str ]:
318318 curdir = target .get_subdir ()
@@ -339,16 +339,16 @@ def get_target_filename_for_linking(self, target: T.Union[build.Target, build.Cu
339339 # On all other platforms, we link to the library directly.
340340 if isinstance (target , build .SharedLibrary ):
341341 link_lib = target .get_import_filename () or target .get_filename ()
342- return os . path . join ( self .get_target_dir (target ), link_lib )
342+ return ( Path ( self .get_target_dir (target )) / link_lib ). as_posix ( )
343343 elif isinstance (target , build .StaticLibrary ):
344- return os . path . join ( self .get_target_dir (target ), target .get_filename ())
344+ return ( Path ( self .get_target_dir (target )) / target .get_filename ()). as_posix ( )
345345 elif isinstance (target , (build .CustomTarget , build .CustomTargetIndex )):
346346 if not target .is_linkable_target ():
347347 raise MesonException (f'Tried to link against custom target "{ target .name } ", which is not linkable.' )
348- return os . path . join ( self .get_target_dir (target ), target .get_filename ())
348+ return ( Path ( self .get_target_dir (target )) / target .get_filename ()). as_posix ( )
349349 elif isinstance (target , build .Executable ):
350350 if target .import_filename :
351- return os . path . join ( self .get_target_dir (target ), target .get_import_filename () )
351+ return ( Path ( self .get_target_dir (target )) / target .import_filename ). as_posix ( )
352352 else :
353353 return None
354354 raise AssertionError (f'BUG: Tried to link to { target !r} which is not linkable' )
0 commit comments