-
Notifications
You must be signed in to change notification settings - Fork 80
Windows Port #16
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 Port #16
Conversation
@swift-ci please test |
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.
Instead of creating a new header/cpp for this, let's inline these implementations. If we someday need to use them in more places we can expose them, but under more idiomatic API names (e.g. getCanonicalPath, not realpath).
784d559
to
7031ee9
Compare
I've removed the CrossPlatform.[h/cpp] and instead inlined the changes. @swift-ci please test |
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 left some comments on the canonical path implementation, but actually: can we just use llvm's sys::fs::real_path
?
8c0be80
to
07e6fb5
Compare
Ugh, that was really leaky. I've changed it to use llvm real_path. Like the Unix realpath, if PathBuf is NULL, it'll allocate memory and the target of the stringref would have to be freed. Thoughts on just having it return a std::string? I believe it's only ever used on Path.cpp:86. |
Ah, I meant why not replace this whole function with a call to |
This allows IndexStoreDB to build on Windows.
Oh I see, yes, that makes much more sense in that context. @swift-ci please test |
Not sure where the PR test status went, but it's still running apparently https://ci.swift.org/job/swift-indexstore-db-PR-macOS/24/ https://ci.swift.org/job/swift-indexstore-db-PR-Linux/25/ |
This allows IndexStoreDB to build on Windows.
Once the other PRs go in, this enables compilation on Windows. I have some CMake locally which I've been using to build this, but it should work just as well with SwiftPM when that is ready on Windows.