@@ -2672,13 +2672,6 @@ if hasattr(config, 'target_link_sdk_future_version'):
26722672 config .substitutions .append (('%target-link-sdk-future-version' ,
26732673 config .target_link_sdk_future_version ))
26742674
2675- def realpath (path ):
2676- if not kIsWindows :
2677- return os .path .realpath (path )
2678- else :
2679- # For Windows, we don't expand substitute drives due to MAX_PATH limitations, matching what the llvm lit does.
2680- return os .path .abspath (path )
2681-
26822675run_filecheck = '%s %s --allow-unused-prefixes --sanitize BUILD_DIR=%s --sanitize SOURCE_DIR=%s --use-filecheck %s %s' % (
26832676 shell_quote (sys .executable ),
26842677 shell_quote (config .PathSanitizingFileCheck ),
@@ -2688,8 +2681,8 @@ run_filecheck = '%s %s --allow-unused-prefixes --sanitize BUILD_DIR=%s --sanitiz
26882681 # we provide we use realpath here. Because PathSanitizingFileCheck only
26892682 # understands sanitize patterns with forward slashes, and realpath normalizes
26902683 # the slashes, we have to replace them back to forward slashes.
2691- shell_quote (realpath (swift_obj_root ).replace ("\\ " , "/" )),
2692- shell_quote (realpath (config .swift_src_root ).replace ("\\ " , "/" )),
2684+ shell_quote (lit . util . abs_path_preserve_drive (swift_obj_root ).replace ("\\ " , "/" )),
2685+ shell_quote (lit . util . abs_path_preserve_drive (config .swift_src_root ).replace ("\\ " , "/" )),
26932686 shell_quote (config .filecheck ),
26942687 '--enable-windows-compatibility' if kIsWindows else '' )
26952688
0 commit comments