Skip to content

Add instructions for building Swift on Windows using clang-cl/MSVC #6458

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 1 commit into from
Jan 11, 2017
Merged

Add instructions for building Swift on Windows using clang-cl/MSVC #6458

merged 1 commit into from
Jan 11, 2017

Conversation

hughbe
Copy link
Contributor

@hughbe hughbe commented Dec 22, 2016

Extracted from #5904

mkdir "%swift_source_dir%/build/Ninja-DebugAssert/swift-windows-amd64/ninja"
pushd "%swift_source_dir%/build/Ninja-DebugAssert/swift-windows-amd64/ninja"
cmake -G "Ninja" "%swift_source_dir%/swift"^
-DCMAKE_CXX_FLAGS="/std:c++14"^
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We dont use C++14 features yet, why do we have to push /std:c++14?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I've removed this, and also got rid of the mentions of libedit (the cmake flag to disable it no longer exists)

@compnerd
Copy link
Member

@swift-ci please smoke test

@compnerd
Copy link
Member

@hughbe are you okay with this going in before the rest of the patches? (I dont have a strong preference).

@hughbe
Copy link
Contributor Author

hughbe commented Dec 22, 2016

Fine by me - order doesn't matter for any of the patches. couple of changes might need to be made though, e.g remove libedit, get rid of c++ 14 flag.

To be filled in.
- Windows doesn't currently have a build script. You'll need to run commands manually to build Swift on Windows.
- Release/RelWithDebInfo modes have not been tested and may not be supported.
- x86 has not been tested.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

FYI, the cross-compilation based windows support has been tested and shown to be working :-).

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Awesome! I meant a from-windows build (not X compilation)

I know I'm having some problems with release mode not working, though - I hit an assertition compiling the stdlib

-DICU_I18N_INCLUDE_DIRS="%swift_source_dir%/icu/include"^
-DICU_I18N_LIBRARY_DIRS="%swift_source_dir%/icu/lib64"^
-DICU_UC_LIB_NAME="icuucd"^
-DICU_I18N_LIB_NAME="icuind"^
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is there a particular reason to use a debug build of ICU instead of a release ICU build as it is an external dependency?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nope, just the one I've tested.

@compnerd
Copy link
Member

@swift-ci please test

@slavapestov
Copy link
Contributor

@swift-ci Please smoke test

@slavapestov slavapestov merged commit 72cd23e into swiftlang:master Jan 11, 2017
@hughbe hughbe deleted the windows-instructions branch January 11, 2017 08:33
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