Skip to content

Commit cc2c5f9

Browse files
committed
Fix mcount name for *-windows-gnu targets
mingw exposes the `_mcount` symbol for profiling.
1 parent 84a2d2a commit cc2c5f9

2 files changed

Lines changed: 2 additions & 0 deletions

File tree

compiler/rustc_target/src/spec/base/windows_gnu.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -106,6 +106,7 @@ pub(crate) fn opts() -> TargetOptions {
106106
// FIXME(davidtwco): Support Split DWARF on Windows GNU - may require LLVM changes to
107107
// output DWO, despite using DWARF, doesn't use ELF..
108108
supported_split_debuginfo: Cow::Borrowed(&[SplitDebuginfo::Off]),
109+
mcount: "_mcount".into(),
109110
..Default::default()
110111
}
111112
}

compiler/rustc_target/src/spec/base/windows_gnullvm.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,7 @@ pub(crate) fn opts() -> TargetOptions {
5353
// FIXME(davidtwco): Support Split DWARF on Windows GNU - may require LLVM changes to
5454
// output DWO, despite using DWARF, doesn't use ELF..
5555
supported_split_debuginfo: Cow::Borrowed(&[SplitDebuginfo::Off]),
56+
mcount: "_mcount".into(),
5657
..Default::default()
5758
}
5859
}

0 commit comments

Comments
 (0)