Skip to content

Commit 3e21e7a

Browse files
committed
build: canonicalise the windows paths prior to use
In order to substitute the path into the VFS overlay, we need to escape the paths. Instead, opt on the CMake behaviour of `get_filename_component` providing the canonicalised path with forward slashes rather than backslashes. This allows the overlay to be used on Windows as well as Linux.
1 parent cfaff1d commit 3e21e7a

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

cmake/modules/SwiftWindowsSupport.cmake

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -61,8 +61,8 @@ endfunction()
6161
function(swift_windows_generate_sdk_vfs_overlay flags)
6262
swift_verify_windows_environment_variables()
6363

64-
set(VCToolsInstallDir $ENV{VCToolsInstallDir})
65-
set(UniversalCRTSdkDir $ENV{UniversalCRTSdkDir})
64+
get_filename_component(VCToolsInstallDir $ENV{VCToolsInstallDir} ABSOLUTE)
65+
get_filename_component(UniversalCRTSdkDir $ENV{UniversalCRTSdkDir} ABSOLUTE)
6666
set(UCRTVersion $ENV{UCRTVersion})
6767

6868
# TODO(compnerd) use a target to avoid re-creating this file all the time

0 commit comments

Comments
 (0)