-
Notifications
You must be signed in to change notification settings - Fork 451
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
Add -mwin32
flag on Windows targets
#19
Conversation
|
||
if cfg!(target_os = "windows") { | ||
flags.push("-mwin32".to_owned()); | ||
} |
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.
This may actually prefer to go in the compile_library
function because otherwise this may get overridden by accident. This should also use the value of the TARGET
environment variable instead of cfg!
due to cross compilations that may be happening.
What value of |
|
@alexcrichton Updated. r? Couple notes:
|
I'd be down with that!
Ah, the wonders of Rust code written a few months ago :)
For now on very large strings, it will be slower. Once rust-lang/rfcs#526 is implemented, however, this will largely no longer be true (the performance won't be the same, but the gap will be of a constant factor, not |
Add `-mwin32` flag on Windows targets
See time-rs/time#45.
I figured adding it to the defaults would be the most controllable way of implementing this fix. That way users can opt-out if it's inducing unwanted behavior. I'll reboot into Windows in a second to test this.
Edit: I can't exactly attest to the fix as Cargo silences the prints from
gcc-rs
, however it does build correctly even after removing the patch I made totime
, so I presume it works.