Skip to content

Commit

Permalink
Always include WindowsMMap.c in the list of source files
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
Zalathar committed Aug 27, 2024
1 parent 91d2ecf commit 5defa79
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions profiler_builtins/build.rs
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ fn main() {

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

if target_env == "msvc" {
// Don't pull in extra libraries on MSVC
cfg.flag("/Zl");
profile_sources.push("WindowsMMap.c");
cfg.define("strdup", Some("_strdup"));
cfg.define("open", Some("_open"));
cfg.define("fdopen", Some("_fdopen"));
Expand All @@ -61,8 +61,6 @@ fn main() {
if target_os != "windows" {
cfg.flag("-fvisibility=hidden");
cfg.define("COMPILER_RT_HAS_UNAME", Some("1"));
} else {
profile_sources.push("WindowsMMap.c");
}
}

Expand Down

0 comments on commit 5defa79

Please sign in to comment.