-
Notifications
You must be signed in to change notification settings - Fork 140
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
Windows support #635
Comments
I believe it was only not supported to begin with since Swift itself didn't support Swift. I believe we want to support Windows.
There are a couple TODOs that mention Windows, I would start there. Getting it working locally would be the first step (I have a guide for easily working on bazel dependencies), then we would ideally setup some CI jobs for it as well. |
@compnerd is looking at this now |
I think that most of the C++ work is now complete - so the remainder of the work I expect that anyone should be easily able to help with. Core bazel
swift-driver
rules_swift
|
As a status check, with the latest main build, I have the following hacks applied locally which nearly works:
With that workaround applied, I can almost run the following (the same as the CI checks):
Unfortunately, this seems to be failing, from what I can tell, due to path limitations:
I believe that lld deals better with this, but I've been struggling to get the build to work with
Working around that (by accidentally disabling debug information), hits the next set of issues - |
Latest update: the current version is able to build and test With a workaround applied for long paths (something which the CI builders forcefully enable) I get further with eventual failures in gRPC due to hardcoded path separator assumptions and subsequently a tool invocation that fails somewhere within the protobuf compiler. |
I'm surprised swift doesn't infer the debug info type? |
Note I think google plans to drop the grpc rule soon. And I think we will follow suite |
No, Swift does not (and cannot) infer the debug info type for multiple reasons. If you use LINK, you cannot use DWARF period. If you use LLD, you can potentially get a partially correct DWARF binary that will likely confuse LLDB and may kind of work (except when it doesn't). You cannot use CodeView if you use The secondary reason is that the correct Debug Info format cannot be determined until link time - because that is when we know what linker you are using. The tertiary reason is that CodeView is preferable when interacting with system libraries, but DWARF is preferable when working with LLDB. Unfortunately, LLDB does not deal well with CodeView and WinDBG does not deal well with DWARF (for various reasons that will eventually become solvable). This is less problematic for individual packages, but would be a problem were you to try to build something large and complicated that spanned multiple languages. |
Hi! What we should implement to run swift bazel rules on windows? |
@SpectralDragon thanks to @compnerd I think a lot of things are working here now, I would suggest trying it out and reporting any issues you hit! |
Completely agreed @keith! I think that we should take another pass at the CI situation for Windows with 5.10. The installer was completely overhauled and now does per-user installation, so there should be no need for administrative rights. This might be sufficient to get us past the sticking point in the past. |
Therefore there appears to be potential now for a Swift/Bazel/CLion developer environment on Windows.
rules_swift
to support Windows as a host and target?The text was updated successfully, but these errors were encountered: