-
Notifications
You must be signed in to change notification settings - Fork 10.5k
Port stdlib/public/stubs/GlobalObjects to Windows #6239
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
Conversation
Can we change this to use C++11's |
@jckarter and @jrose-apple, I think you guys should chime in here as well. |
Something like this could work, and we could get rid of all the platform specific code:
|
Seems reasonable to me, but this bit of code is very much in service of the stdlib (to change hashing behavior between runs). @dabrahams? |
We'd also be fine with using external libraries on Windows if we had to, as long as they're installed on systems by default. We link to Foundation on Apple platforms! |
Thanks @hughbe, this looks much better! |
@swift-ci please test and merge |
Um, I'd definitely still like Dave to take a look. This happens as part of a static constructor. |
@jrose-apple, yeah, I was thinking about that after wards. I think that we should also benchmark this to make sure it doesn't giant the startup too much. |
@swift-ci please test |
Build failed |
Build failed |
CC: @dabrahams mind taking a look? this is one of the few pieces that prevents building on Windows. |
I'm going to pass this over to @airspeedswift because I know he's interested in creating a public random number facility around this basic ideas. |
@airspeedswift think you can get to this soon? This is the last piece needed to repair the windows builds! |
@airspeedswift friendly ping! |
LGTM; merging |
This avoids an assertion/crash compiling swift code once the stdlib and compiler has been built.