forked from python/mypy
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
This adds support for compiling on and for windows using MSVC. There were two interesting things that needed to be done, and a handful of uninteresting ones: 1. As far as I could tell, Windows does not have the equivalents to rpath/$ORIGIN/@loader_path that we would need to have the dynamic loader automatically load our shared library. So instead we do it manually, computing a library location and using `LoadLibrary`/`GetProcAddress` to call our init functions. 2. The Windows dynamic loader is less powerful than the Linux/OS X loaders, and does not allow you to initialize globals with values taken from other libraries. This means that we need to manually initialize such globals instead. I didn't want to fight with running gtest even a little bit, so I skipped the runtime tests on windows. This passes the full test suite. I haven't tried mypy yet. I haven't set up CI for windows yet, but it is important to do soon, since it will be pretty easy to forget about the dynamic loader limitations.
- Loading branch information
Showing
11 changed files
with
205 additions
and
48 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.