Skip to content

Commit 5defa79

Browse files
committed
Always include WindowsMMap.c in the list of source files
The whole file is surrounded by `#if defined(_WIN32)`, so there's no need to have separate logic to exclue it from non-Windows builds.
1 parent 91d2ecf commit 5defa79

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

Diff for: profiler_builtins/build.rs

+2-4
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ fn main() {
1919

2020
// FIXME: `rerun-if-changed` directives are not currently emitted and the build script
2121
// will not rerun on changes in these source files or headers included into them.
22-
let mut profile_sources = vec![
22+
let profile_sources = vec![
2323
// tidy-alphabetical-start
2424
"GCDAProfiling.c",
2525
"InstrProfiling.c",
@@ -40,13 +40,13 @@ fn main() {
4040
"InstrProfilingValue.c",
4141
"InstrProfilingVersionVar.c",
4242
"InstrProfilingWriter.c",
43+
"WindowsMMap.c",
4344
// tidy-alphabetical-end
4445
];
4546

4647
if target_env == "msvc" {
4748
// Don't pull in extra libraries on MSVC
4849
cfg.flag("/Zl");
49-
profile_sources.push("WindowsMMap.c");
5050
cfg.define("strdup", Some("_strdup"));
5151
cfg.define("open", Some("_open"));
5252
cfg.define("fdopen", Some("_fdopen"));
@@ -61,8 +61,6 @@ fn main() {
6161
if target_os != "windows" {
6262
cfg.flag("-fvisibility=hidden");
6363
cfg.define("COMPILER_RT_HAS_UNAME", Some("1"));
64-
} else {
65-
profile_sources.push("WindowsMMap.c");
6664
}
6765
}
6866

0 commit comments

Comments
 (0)