@@ -106,15 +106,15 @@ Warning: Creating the above links usually requires adminstrator privileges. The
106
106
- This must be done from within a developer command prompt. CMark is a fairly
107
107
small project and should only take a few minutes to build.
108
108
``` cmd
109
- mkdir "S:\build\Ninja-DebugAssert \cmark-windows-amd64"
110
- pushd "S:\build\Ninja-DebugAssert \cmark-windows-amd64"
109
+ mkdir "S:\build\Ninja-RelWithDebInfoAssert \cmark-windows-amd64"
110
+ pushd "S:\build\Ninja-RelWithDebInfoAssert \cmark-windows-amd64"
111
111
cmake -G Ninja^
112
- -DCMAKE_BUILD_TYPE=Debug ^
112
+ -DCMAKE_BUILD_TYPE=RelWithDebInfo ^
113
113
-DCMAKE_C_COMPILER=cl^
114
114
-DCMAKE_CXX_COMPILER=cl^
115
115
S:/cmark
116
116
popd
117
- cmake --build "S:\build\Ninja-DebugAssert \cmark-windows-amd64"
117
+ cmake --build "S:\build\Ninja-RelWithDebInfoAssert \cmark-windows-amd64"
118
118
```
119
119
120
120
### 6. Build LLVM/Clang
@@ -123,25 +123,26 @@ cmake --build "S:\build\Ninja-DebugAssert\cmark-windows-amd64"
123
123
type (e.g. ` Debug ` , ` Release ` , ` RelWithDebInfoAssert ` ) for LLVM/Clang matches the
124
124
build type for Swift.
125
125
``` cmd
126
- mkdir "S:\build\Ninja-DebugAssert \llvm-windows-amd64"
127
- pushd "S:\build\Ninja-DebugAssert \llvm-windows-amd64"
126
+ mkdir "S:\build\Ninja-RelWithDebInfoAssert \llvm-windows-amd64"
127
+ pushd "S:\build\Ninja-RelWithDebInfoAssert \llvm-windows-amd64"
128
128
cmake -G Ninja^
129
- -DCMAKE_BUILD_TYPE=Debug ^
129
+ -DCMAKE_BUILD_TYPE=Release ^
130
130
-DCMAKE_C_COMPILER=cl^
131
131
-DCMAKE_CXX_COMPILER=cl^
132
132
-DLLVM_DEFAULT_TARGET_TRIPLE=x86_64-unknown-windows-msvc^
133
133
-DLLVM_ENABLE_ASSERTIONS=ON^
134
+ -DLLVM_ENABLE_PDB=YES^
134
135
-DLLVM_ENABLE_PROJECTS=clang^
135
136
-DLLVM_TARGETS_TO_BUILD=X86^
136
137
S:/llvm
137
138
popd
138
- cmake --build "S:\build\Ninja-DebugAssert \llvm-windows-amd64"
139
+ cmake --build "S:\build\Ninja-RelWithDebInfoAssert \llvm-windows-amd64"
139
140
```
140
141
141
142
- Update your path to include the LLVM tools.
142
143
143
144
``` cmd
144
- PATH S:\build\Ninja-DebugAssert \llvm-windows-amd64\bin;%PATH%
145
+ PATH S:\build\Ninja-RelWithDebInfoAssert \llvm-windows-amd64\bin;%PATH%
145
146
```
146
147
147
148
### 7. Build Swift
@@ -150,22 +151,22 @@ PATH S:\build\Ninja-DebugAssert\llvm-windows-amd64\bin;%PATH%
150
151
- You may need to adjust the ` SWIFT_WINDOWS_LIB_DIRECTORY ` parameter depending on
151
152
your target platform or Windows SDK version.
152
153
``` cmd
153
- mkdir "S:\build\Ninja-DebugAssert \swift-windows-amd64"
154
- pushd "S:\build\Ninja-DebugAssert \swift-windows-amd64"
154
+ mkdir "S:\build\Ninja-RelWithDebInfoAssert \swift-windows-amd64"
155
+ pushd "S:\build\Ninja-RelWithDebInfoAssert \swift-windows-amd64"
155
156
cmake -G Ninja^
156
- -DCMAKE_BUILD_TYPE=Debug ^
157
+ -DCMAKE_BUILD_TYPE=RelWithDebInfo ^
157
158
-DCMAKE_C_COMPILER=clang-cl^
158
159
-DCMAKE_CXX_COMPILER=clang-cl^
159
160
-DCMAKE_CXX_FLAGS:STRING="-Wno-c++98-compat -Wno-c++98-compat-pedantic"^
160
161
-DCMAKE_EXE_LINKER_FLAGS:STRING="/INCREMENTAL:NO"^
161
162
-DCMAKE_SHARED_LINKER_FLAGS:STRING="/INCREMENTAL:NO"^
162
163
-DSWIFT_INCLUDE_DOCS=OFF^
163
164
-DSWIFT_PATH_TO_CMARK_SOURCE="S:\cmark"^
164
- -DSWIFT_PATH_TO_CMARK_BUILD="S:\build\Ninja-DebugAssert \cmark-windows-amd64"^
165
+ -DSWIFT_PATH_TO_CMARK_BUILD="S:\build\Ninja-RelWithDebInfoAssert \cmark-windows-amd64"^
165
166
-DSWIFT_PATH_TO_LLVM_SOURCE="S:\llvm"^
166
- -DSWIFT_PATH_TO_LLVM_BUILD="S:\build\Ninja-DebugAssert \llvm-windows-amd64"^
167
+ -DSWIFT_PATH_TO_LLVM_BUILD="S:\build\Ninja-RelWithDebInfoAssert \llvm-windows-amd64"^
167
168
-DSWIFT_PATH_TO_CLANG_SOURCE="S:\clang"^
168
- -DSWIFT_PATH_TO_CLANG_BUILD="S:\build\Ninja-DebugAssert \llvm-windows-amd64"^
169
+ -DSWIFT_PATH_TO_CLANG_BUILD="S:\build\Ninja-RelWithDebInfoAssert \llvm-windows-amd64"^
169
170
-DSWIFT_PATH_TO_LIBDISPATCH_SOURCE="S:\swift-corelibs-libdispatch"^
170
171
-DSWIFT_WINDOWS_x86_64_ICU_UC_INCLUDE="S:\icu\include"^
171
172
-DSWIFT_WINDOWS_x86_64_ICU_UC="S:\icu\lib64\icuuc.lib"^
@@ -174,7 +175,7 @@ cmake -G Ninja^
174
175
-DCMAKE_INSTALL_PREFIX="C:\Library\Developer\Toolchains\unknown-Asserts-development.xctoolchain\usr"^
175
176
S:/swift
176
177
popd
177
- cmake --build "S:\build\Ninja-DebugAssert \swift-windows-amd64"
178
+ cmake --build "S:\build\Ninja-RelWithDebInfoAssert \swift-windows-amd64"
178
179
```
179
180
180
181
- To create a Visual Studio project, you'll need to change the generator and,
@@ -192,23 +193,23 @@ cmake -G "Visual Studio 2017" -A x64 -T "host=x64"^ ...
192
193
- This must be done from within a developer command prompt and could take hours
193
194
depending on your system.
194
195
``` cmd
195
- mkdir "S:/build/Ninja-DebugAssert /lldb-windows-amd64"
196
- pushd "S:/build/Ninja-DebugAssert /lldb-windows-amd64"
196
+ mkdir "S:/build/Ninja-RelWithDebInfoAssert /lldb-windows-amd64"
197
+ pushd "S:/build/Ninja-RelWithDebInfoAssert /lldb-windows-amd64"
197
198
cmake -G Ninja^
198
- -DCMAKE_BUILD_TYPE=Debug ^
199
+ -DCMAKE_BUILD_TYPE=RelWithDebInfo ^
199
200
-DLLDB_ALLOW_STATIC_BINDINGS=YES^
200
201
-DLLDB_PATH_TO_LLVM_SOURCE="S:/llvm"^
201
202
-DLLDB_PATH_TO_CLANG_SOURCE="S:/clang"^
202
203
-DLLDB_PATH_TO_SWIFT_SOURCE="S:/swift"^
203
- -DLLDB_PATH_TO_CMARK_BUILD="S:/build/Ninja-DebugAssert /cmark-windows-amd64"^
204
- -DLLDB_PATH_TO_CLANG_BUILD="S:/build/Ninja-DebugAssert /llvm-windows-amd64"^
205
- -DLLDB_PATH_TO_LLVM_BUILD="S:/build/Ninja-DebugAssert /llvm-windows-amd64"^
206
- -DLLDB_PATH_TO_SWIFT_BUILD="S:/build/Ninja-DebugAssert /swift-windows-amd64"^
204
+ -DLLDB_PATH_TO_CMARK_BUILD="S:/build/Ninja-RelWithDebInfoAssert /cmark-windows-amd64"^
205
+ -DLLDB_PATH_TO_CLANG_BUILD="S:/build/Ninja-RelWithDebInfoAssert /llvm-windows-amd64"^
206
+ -DLLDB_PATH_TO_LLVM_BUILD="S:/build/Ninja-RelWithDebInfoAssert /llvm-windows-amd64"^
207
+ -DLLDB_PATH_TO_SWIFT_BUILD="S:/build/Ninja-RelWithDebInfoAssert /swift-windows-amd64"^
207
208
-DLLVM_ENABLE_ASSERTIONS=ON^
208
209
-DPYTHON_HOME=%ProgramFiles(x86)%\Microsoft Visual Studio\Shared\Python37_64^
209
210
S:/lldb
210
211
popd
211
- cmake --build "S:/build/Ninja-DebugAssert /lldb-windows-amd64"
212
+ cmake --build "S:/build/Ninja-RelWithDebInfoAssert /lldb-windows-amd64"
212
213
```
213
214
214
215
### 9. Running tests on Windows
@@ -222,21 +223,21 @@ Running the testsuite on Windows has additional external dependencies. You must
222
223
5 . sed
223
224
224
225
``` cmd
225
- set PATH=S:\build\Ninja-DebugAssert \swift-windows-amd64\bin;S:\build\Ninja-DebugAssert \swift-windows-amd64\libdispatch-prefix\bin;%PATH%;C:\Program Files (x86)\GnuWin32\bin
226
- ninja -C "S:/build/Ninja-DebugAssert /swift-windows-amd64" check-swift
226
+ set PATH=S:\build\Ninja-RelWithDebInfoAssert \swift-windows-amd64\bin;S:\build\Ninja-RelWithDebInfoAssert \swift-windows-amd64\libdispatch-prefix\bin;%PATH%;C:\Program Files (x86)\GnuWin32\bin
227
+ ninja -C "S:/build/Ninja-RelWithDebInfoAssert /swift-windows-amd64" check-swift
227
228
```
228
229
229
230
### 10. Build swift-corelibs-libdispatch
230
231
231
232
``` cmd
232
- mkdir "S:/build/Ninja-DebugAssert /swift-corelibs-libdispatch-windows-amd64"
233
- pushd "S:/build/Ninja-DebugAssert /swift-corelibs-libdispatch-windows-amd64"
233
+ mkdir "S:/build/Ninja-RelWithDebInfoAssert /swift-corelibs-libdispatch-windows-amd64"
234
+ pushd "S:/build/Ninja-RelWithDebInfoAssert /swift-corelibs-libdispatch-windows-amd64"
234
235
cmake -G Ninja^
235
- -DCMAKE_BUILD_TYPE=Debug ^
236
- -DCMAKE_C_COMPILER="S:/build/Ninja-DebugAssert /llvm-windows-amd64/bin/clang-cl.exe"^
237
- -DCMAKE_CXX_COMPILER="S:/build/Ninja-DebugAssert /llvm-windows-amd64/bin/clang-cl.exe"^
238
- -DCMAKE_SWIFT_COMPILER="S:/build/Ninja-DebugAssert /swift-windows-amd64/bin/swiftc.exe"^
239
- -DSwift_DIR="S:/build/Ninja-DebugAssert /swift-windows-amd64/lib/cmake/swift"^
236
+ -DCMAKE_BUILD_TYPE=RelWithDebInfo ^
237
+ -DCMAKE_C_COMPILER="S:/build/Ninja-RelWithDebInfoAssert /llvm-windows-amd64/bin/clang-cl.exe"^
238
+ -DCMAKE_CXX_COMPILER="S:/build/Ninja-RelWithDebInfoAssert /llvm-windows-amd64/bin/clang-cl.exe"^
239
+ -DCMAKE_SWIFT_COMPILER="S:/build/Ninja-RelWithDebInfoAssert /swift-windows-amd64/bin/swiftc.exe"^
240
+ -DSwift_DIR="S:/build/Ninja-RelWithDebInfoAssert /swift-windows-amd64/lib/cmake/swift"^
240
241
-DENABLE_SWIFT=ON^
241
242
-DENABLE_TESTING=OFF^
242
243
S:/swift-corelibs-libdispatch
@@ -252,21 +253,21 @@ To build Foundation you will need builds of:
252
253
- ` libcurl ` (https://curl.haxx.se , download the source, ` cd ` into ` winbuild ` , and run ` nmake /f Makefile.vc mode=static VC=15 MACHINE=x64 ` )
253
254
254
255
``` cmd
255
- mkdir "S:/build/Ninja-DebugAssert /swift-corelibs-foundation-windows-amd64"
256
- pushd "S:/build/Ninja-DebugAssert /swift-corelibs-foundation-windows-amd64"
256
+ mkdir "S:/build/Ninja-RelWithDebInfoAsset /swift-corelibs-foundation-windows-amd64"
257
+ pushd "S:/build/Ninja-RelWithDebInfoAssert /swift-corelibs-foundation-windows-amd64"
257
258
cmake -G Ninja^
258
- -DCMAKE_BUILD_TYPE=Debug ^
259
- -DCMAKE_C_COMPILER="S:/build/Ninja-DebugAssert /llvm-windows-amd64/bin/clang-cl.exe"^
260
- -DCMAKE_SWIFT_COMPILER="S:/build/Ninja-DebugAssert /swift-windows-amd64/bin/swiftc.exe"^
259
+ -DCMAKE_BUILD_TYPE=RelWithDebInfo ^
260
+ -DCMAKE_C_COMPILER="S:/build/Ninja-RelWithDebInfoAssert /llvm-windows-amd64/bin/clang-cl.exe"^
261
+ -DCMAKE_SWIFT_COMPILER="S:/build/Ninja-RelWithDebInfoAssert /swift-windows-amd64/bin/swiftc.exe"^
261
262
-DCURL_LIBRARY="S:/curl/builds/libcurl-vc15-x64-release-static-ipv6-sspi-winssl/lib/libcurl_a.lib"^
262
263
-DCURL_INCLUDE_DIR="S:/curl/builds/libcurl-vc15-x64-release-static-ipv6-sspi-winssl/include"^
263
264
-DICU_ROOT="S:/thirdparty/icu4c-63_1-Win64-MSVC2017"^
264
265
-DLIBXML2_LIBRARY="S:/libxml2/win32/bin.msvc/libxml2_a.lib"^
265
266
-DLIBXML2_INCLUDE_DIR="S:/libxml2/include"^
266
267
-DFOUNDATION_PATH_TO_LIBDISPATCH_SOURCE="S:/swift-corelibs-libdispatch"^
267
- -DFOUNDATION_PATH_TO_LIBDISPATCH_BUILD="S:/build/Ninja-DebugAssert /swift-corelibs-libdispatch-windows-amd64"^
268
+ -DFOUNDATION_PATH_TO_LIBDISPATCH_BUILD="S:/build/Ninja-RelWithDebInfoAssert /swift-corelibs-libdispatch-windows-amd64"^
268
269
S:/swift-corelibs-foundation
269
- cmake --build "S:/build/Ninja-DebugAssert /swift-corelibs-foundation-windows-amd64"
270
+ cmake --build "S:/build/Ninja-RelWithDebInfoAssert /swift-corelibs-foundation-windows-amd64"
270
271
271
272
```
272
273
@@ -275,7 +276,7 @@ cmake -G Ninja^
275
276
- Run ninja install:
276
277
277
278
``` cmd
278
- ninja -C "S:/build/Ninja-DebugAssert /swift-windows-amd64" install
279
+ ninja -C "S:/build/Ninja-RelWithDebInfoAssert /swift-windows-amd64" install
279
280
```
280
281
281
282
- Add the Swift on Windows binaries path (` C:\Library\Developer\Toolchains\unknown-Asserts-development.xctoolchain\usr\bin ` ) to the ` PATH ` environment variable.
0 commit comments