]> git.lizzy.rs Git - rust.git/blobdiff - src/libprofiler_builtins/build.rs
Rollup merge of #63034 - tmandry:reduce-generator-size-regressions, r=cramertj
[rust.git] / src / libprofiler_builtins / build.rs
index 491986480deba1082cce16d4b955915c2bce3121..775f84535fbf25b9e17a7561a1f0ec3358703d0b 100644 (file)
@@ -19,6 +19,7 @@ fn main() {
                                    "InstrProfilingPlatformDarwin.c",
                                    "InstrProfilingPlatformLinux.c",
                                    "InstrProfilingPlatformOther.c",
+                                   "InstrProfilingPlatformWindows.c",
                                    "InstrProfilingRuntime.cc",
                                    "InstrProfilingUtil.c",
                                    "InstrProfilingValue.c",
@@ -41,7 +42,11 @@ fn main() {
         cfg.flag("-fomit-frame-pointer");
         cfg.flag("-ffreestanding");
         cfg.define("VISIBILITY_HIDDEN", None);
-        cfg.define("COMPILER_RT_HAS_UNAME", Some("1"));
+        if !target.contains("windows") {
+            cfg.define("COMPILER_RT_HAS_UNAME", Some("1"));
+        } else {
+            profile_sources.push("WindowsMMap.c");
+        }
     }
 
     // Assume that the Unixes we are building this for have fnctl() available