Skip to content

Sourcekit-Windows: Look for stdlib correctly #23809

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
Apr 5, 2019

Conversation

gmittert
Copy link
Contributor

@gmittert gmittert commented Apr 5, 2019

On Windows, sourcekitdinproc is placed in the lib directory, not the bin
directory.

This fixes a bunch of sourcekit tests on Windows.

@jrose-apple jrose-apple requested review from nkcsgexi and akyrtzi April 5, 2019 02:32
MAX_PATH))
llvm_unreachable("call to GetModuleFileNameA failed");
return llvm::sys::path::parent_path(path);
path = llvm::sys::path::parent_path(llvm::sys::path::parent_path(path));
Copy link
Contributor

Choose a reason for hiding this comment

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

You may be getting into undefined behavior here, initializing path from its own memory.
Could you follow similar method to how libclang does this here: https://github.com/apple/swift-clang/blob/078517eab71c45f8a3fc066c02b642bda9c87422/tools/libclang/CIndexer.cpp#L49

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yeah probably.. fixed now!

On Windows, sourcekitdinproc is placed in the lib directory, not the bin
directory.
@gmittert gmittert force-pushed the SourceLibNotSourceBin branch from 2acb15f to 4cf30b8 Compare April 5, 2019 17:19
@akyrtzi
Copy link
Contributor

akyrtzi commented Apr 5, 2019

@swift-ci smoke test and merge

@swift-ci swift-ci merged commit bda802c into swiftlang:master Apr 5, 2019
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