Skip to content

Commit c3a26ec

Browse files
authored
docs: running tests on Windows
Start documenting how to run the test suite on Windows so that others can easily reproduce the test results. Document the external dependencies from the test suite. Since the LLVM test suite depends on the GNUWin32 tools, I believe that this dependency is not too onerous. Over time, it may be possible to implement more of the functionality in lit to reduce the dependency, but, for now, use the tools to speed up the test suite bring up.
1 parent 518f26a commit c3a26ec

File tree

1 file changed

+21
-2
lines changed

1 file changed

+21
-2
lines changed

docs/WindowsBuild.md

Lines changed: 21 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,17 @@ set swift_source_dir=path-to-directory-containing-all-cloned-repositories
7272

7373
- Set up the `ucrt`, `visualc`, and `WinSDK` modules by copying `ucrt.modulemap` located at
7474
`swift/stdlib/public/Platform/ucrt.modulemap` into
75-
`${UniversalCRTSdkDir}/Include/${UCRTVersion}/ucrt` as `module.modulemap`, copying `visualc.modulemap` located at `swift/stdlib/public/Platform/visualc.modulemap` into `${VCToolsInstallDir}/include` as `module.modulemap`, and copying `winsdk.modulemap` located at `swift/stdlib/public/Platform/winsdk.modulemap` into `${UniversalCRTSdkDir}/Include/10.0.107663/um`
75+
`${UniversalCRTSdkDir}/Include/${UCRTVersion}/ucrt` as `module.modulemap`, copying `visualc.modulemap` located at `swift/stdlib/public/Platform/visualc.modulemap` into `${VCToolsInstallDir}/include` as `module.modulemap`, and copying `winsdk.modulemap` located at `swift/stdlib/public/Platform/winsdk.modulemap` into `${UniversalCRTSdkDir}/Include/${UCRTVersion}/um` and setup the `visualc.apinotes` located at `swift/stdlib/public/Platform/visualc.apinotes` into `${VCToolsInstallDir}/include` as `visualc.apinotes`
76+
77+
```cmd
78+
cd %UniversalCRTSdkDir%\Include\%UCRTVersion%\ucrt
79+
mklink module.modulemap %swift_source_dir%\swift\stdlib\public\Platform\ucrt.modulemap
80+
cd %VCToolsInstallDir%\include
81+
mklink module.modulemap %swift_source_dir%\swift\stdlib\public\Platform\visualc.modulemap
82+
mklink visualc.apinotes %swift_source_dir%\swift\stdlib\public\Platform\visualc.apinotes
83+
cd %UniversalCRTSdkDir\Include\%UCRTVersion%\um
84+
mklink module.modulemap %swift_source_dir%\swift\stdlib\public\Platform\winsdk.modulemap
85+
```
7686

7787
### 5. Build CMark
7888
- This must be done from within a developer command prompt. CMark is a fairly
@@ -178,7 +188,16 @@ popd
178188
cmake --build "%swift_source_dir%/build/Ninja-RelWithDebInfoAssert/lldb-windows-amd64"
179189
```
180190

181-
### 9. Install Swift on Windows
191+
### 9. Running tests on Windows
192+
193+
Running the testsuite on Windows has additional external dependencies. You must have a subset of the GNUWin32 programs installed and available in your path. The following packages are currently required:
194+
195+
1. coreutils
196+
2. diffutils
197+
3. grep
198+
4. sed
199+
200+
### 10. Install Swift on Windows
182201

183202
- Run ninja install:
184203
```cmd

0 commit comments

Comments
 (0)