@@ -2672,13 +2672,6 @@ if hasattr(config, 'target_link_sdk_future_version'):
2672
2672
config .substitutions .append (('%target-link-sdk-future-version' ,
2673
2673
config .target_link_sdk_future_version ))
2674
2674
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
-
2682
2675
run_filecheck = '%s %s --allow-unused-prefixes --sanitize BUILD_DIR=%s --sanitize SOURCE_DIR=%s --use-filecheck %s %s' % (
2683
2676
shell_quote (sys .executable ),
2684
2677
shell_quote (config .PathSanitizingFileCheck ),
@@ -2688,8 +2681,8 @@ run_filecheck = '%s %s --allow-unused-prefixes --sanitize BUILD_DIR=%s --sanitiz
2688
2681
# we provide we use realpath here. Because PathSanitizingFileCheck only
2689
2682
# understands sanitize patterns with forward slashes, and realpath normalizes
2690
2683
# 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 ("\\ " , "/" )),
2693
2686
shell_quote (config .filecheck ),
2694
2687
'--enable-windows-compatibility' if kIsWindows else '' )
2695
2688
0 commit comments