-
Notifications
You must be signed in to change notification settings - Fork 13.2k
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: Don't link std (and run-make) against advapi32, except on win7 #138233
Conversation
The run-make-support library was changed cc @jieyouxu |
@rustbot label +O-windows |
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.
If jieyouxu is fine with the run-make changes then this looks good to me. I do have one issue though
@@ -232,7 +232,6 @@ fn make_win_dist( | |||
"libpthread.a", | |||
//Windows import libs | |||
//This should contain only the set of libraries necessary to link the standard library. | |||
"libadvapi32.a", |
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.
While we should only distribute the libraries windows-gnu needs for std, we've had problems with people accidentally relying on them being there so I'm reluctant to clean up this list too much. But cc @mati865 as target maintainer
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 was wondering if there were potential backcompat hazards lurking inside this change. I was just going off the comment here though. Maybe it should be reworded if we decide to keep this list longer.
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.
Yes, rewording this comment would make sense to me. Or at least adding a comment that notes the hazard.
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.
Done
run-make changes are fine with me. |
Thanks! @bors r+ rollup |
Windows: Don't link std (and run-make) against advapi32, except on win7 Std no longer depends on any functionality provided by advapi32, so we can remove it from the list of external libraries we link against. Except, the win7 targets do still rely on advapi32-provided functionality. This PR therefore moves linking against it to only occur on win7 targets, so that no new uses of it slip in without being noticed.
Rollup of 16 pull requests Successful merges: - rust-lang#122790 (Apply dllimport in ThinLTO) - rust-lang#136127 (Allow `*const W<dyn A> -> *const dyn A` ptr cast) - rust-lang#136968 (Turn order dependent trait objects future incompat warning into a hard error) - rust-lang#137147 (Add exclude to config.toml) - rust-lang#137319 (Stabilize `const_vec_string_slice`) - rust-lang#137885 (tidy: add triagebot checks) - rust-lang#138040 (compiler: Use `size_of` from the prelude instead of imported) - rust-lang#138052 (strip `-Wlinker-messages` wrappers from `rust-lld` rmake test) - rust-lang#138084 (Use workspace lints for crates in `compiler/`) - rust-lang#138158 (Move more layouting logic to `rustc_abi`) - rust-lang#138160 (depend more on attr_data_structures and move find_attr! there) - rust-lang#138192 (crashes: couple more tests) - rust-lang#138216 (bootstrap: Fix stack printing when a step cycle is detected) - rust-lang#138232 (Reduce verbosity of GCC build log) - rust-lang#138233 (Windows: Don't link std (and run-make) against advapi32, except on win7) - rust-lang#138242 (Revert "Don't test new error messages with the stage 0 compiler") r? `@ghost` `@rustbot` modify labels: rollup
…iaskrgr Rollup of 7 pull requests Successful merges: - rust-lang#122790 (Apply dllimport in ThinLTO) - rust-lang#137650 (Move `fs` into `sys`) - rust-lang#138228 (Use `disjoint_bitor` inside `borrowing_sub`) - rust-lang#138233 (Windows: Don't link std (and run-make) against advapi32, except on win7) - rust-lang#138253 (Continue to check attr if meet empty repr for adt) - rust-lang#138263 (Fix `repr128-dwarf` test) - rust-lang#138276 (Lazy load NtOpenFile for UWP) r? `@ghost` `@rustbot` modify labels: rollup
Rollup merge of rust-lang#138233 - smmalis37:no-advapi32, r=ChrisDenton Windows: Don't link std (and run-make) against advapi32, except on win7 Std no longer depends on any functionality provided by advapi32, so we can remove it from the list of external libraries we link against. Except, the win7 targets do still rely on advapi32-provided functionality. This PR therefore moves linking against it to only occur on win7 targets, so that no new uses of it slip in without being noticed.
Std no longer depends on any functionality provided by advapi32, so we can remove it from the list of external libraries we link against. Except, the win7 targets do still rely on advapi32-provided functionality. This PR therefore moves linking against it to only occur on win7 targets, so that no new uses of it slip in without being noticed.