We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent cc2c5f9 commit 87c2552Copy full SHA for 87c2552
1 file changed
compiler/rustc_codegen_ssa/src/back/linker.rs
@@ -737,6 +737,13 @@ impl<'a> Linker for GccLinker<'a> {
737
// This flag is also used when linking to choose target specific
738
// libraries needed to enable profiling.
739
self.cc_arg("-pg");
740
+ // On windows-gnu targets, libgmon also needs to be linked, and this
741
+ // requires readding libraries to satisfy its dependencies.
742
+ if self.sess.target.is_like_windows {
743
+ self.cc_arg("-lgmon");
744
+ self.cc_arg("-lkernel32");
745
+ self.cc_arg("-lmsvcrt");
746
+ }
747
}
748
749
fn control_flow_guard(&mut self) {}
0 commit comments