-
Notifications
You must be signed in to change notification settings - Fork 10.5k
Several minor fixes to Windows build instructions #22165
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Several minor fixes to Windows build instructions #22165
Conversation
- Fix minor typos - Add missing `git clone` for LLDB - Fix inconsistent/missing quotes in code blocks - A few other consistency fixups - `SWIFT_PATH_TO_LIBDISPATCH_SOURCE` is only used on Linux - Use `-A` and `-T` with modern CMake instead of `-DCMAKE_GENERATOR_PLATFORM` - Add missing info on `libcurl` and `libxml2` requirements for `swift-corelibs-foundation`
``` | ||
|
||
### 3. Acquire ICU | ||
1. Download ICU from [ICU Project](http://site.icu-project.org) for Windows x64 and extract the binaries. | ||
1. Add the `bin64` folder to your `Path` environment variable. | ||
|
||
```cmd |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think that we can sink this to the end. The binaries are only needed when running the tests, not building.
``` | ||
|
||
Warning: Creating the above links usually requires adminstrator privileges. The quick and easy way to do this is to open a second developer prompt by right clicking whatever shortcut you used to open the first one, choosing Run As Administrator, and pasting the above commands into the resulting window. You can then close the privileged prompt; this is the only step which requires elevation. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Might be nice to make Warning
bold.
-DCMAKE_BUILD_TYPE=Debug^ | ||
-DCMAKE_C_COMPILER=cl^ | ||
-DCMAKE_CXX_COMPILER=cl^ | ||
-DLLVM_DEFAULT_TARGET_TRIPLE=x86_64-unknown-windows-msvc^ | ||
-DLLVM_ENABLE_ASSERTIONS=TRUE^ | ||
-DLLVM_ENABLE_ASSERTIONS=ON^ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The reason for using TRUE
or YES
here is so it sounds more like English. YES
, TRUE
, and ON
are synonyms for CMake.
popd | ||
cmake --build "S:\build\Ninja-DebugAssert\llvm-windows-amd64" | ||
``` | ||
|
||
- Update your path to include the LLVM tools. | ||
|
||
```cmd | ||
set PATH=S:\build\Ninja-DebugAssert\llvm-windows-amd64\bin;%PATH% | ||
PATH S:\build\Ninja-DebugAssert\llvm-windows-amd64\bin;%PATH% |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This seems wrong... it is no longer a valid command.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
TIL that this allows you to modify the path! Thanks @gwynne
@@ -177,7 +184,7 @@ cmake --build "S:\build\Ninja-DebugAssert\swift-windows-amd64" | |||
a file. | |||
|
|||
```cmd | |||
cmake -G "Visual Studio 2017" -DCMAKE_GENERATOR_PLATFORM="x64"^ ... | |||
cmake -G "Visual Studio 2017" -A x64 -T "host=x64"^ ... |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice! Perhaps we should also add the example with the clang/LLVM toolset?
@@ -186,7 +193,7 @@ cmake -G "Visual Studio 2017" -DCMAKE_GENERATOR_PLATFORM="x64"^ ... | |||
```cmd | |||
mkdir "S:/build/Ninja-DebugAssert/lldb-windows-amd64" | |||
pushd "S:/build/Ninja-DebugAssert/lldb-windows-amd64" | |||
cmake -G "Ninja" "S:/lldb"^ | |||
cmake -G Ninja |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Missing trailing ^
breaking copy and paste :-(
Thanks for these fixes/improvements @gwynne! |
@swift-ci please smoke test and merge |
git clone
for LLDBSWIFT_PATH_TO_LIBDISPATCH_SOURCE
is only used on Linux-A
and-T
with modern CMake instead of-DCMAKE_GENERATOR_PLATFORM
libcurl
andlibxml2
requirements forswift-corelibs-foundation