Skip to content

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

Merged
merged 2 commits into from
Jan 27, 2019
Merged

Several minor fixes to Windows build instructions #22165

merged 2 commits into from
Jan 27, 2019

Conversation

gwynne
Copy link
Contributor

@gwynne gwynne commented Jan 27, 2019

  • 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

- 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`
@gwynne gwynne requested a review from compnerd January 27, 2019 21:56
```

### 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
Copy link
Member

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.
Copy link
Member

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^
Copy link
Member

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%
Copy link
Member

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.

Copy link
Member

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"^ ...
Copy link
Member

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
Copy link
Member

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 :-(

@compnerd
Copy link
Member

Thanks for these fixes/improvements @gwynne!

@compnerd
Copy link
Member

@swift-ci please smoke test and merge

@swift-ci swift-ci merged commit 4f106b2 into swiftlang:master Jan 27, 2019
@gwynne gwynne deleted the winbuild-instructions-fixes branch April 9, 2023 00:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants