]> git.lizzy.rs Git - rust.git/blobdiff - src/libprofiler_builtins/build.rs
Rollup merge of #67527 - GuillaumeGomez:results-show-too-much, r=kinnison
[rust.git] / src / libprofiler_builtins / build.rs
index 775f84535fbf25b9e17a7561a1f0ec3358703d0b..04cd2efe00093d80a859bf56b64a553abdcd9be4 100644 (file)
@@ -9,21 +9,23 @@ fn main() {
     let target = env::var("TARGET").expect("TARGET was not set");
     let cfg = &mut cc::Build::new();
 
-    let mut profile_sources = vec!["GCDAProfiling.c",
-                                   "InstrProfiling.c",
-                                   "InstrProfilingBuffer.c",
-                                   "InstrProfilingFile.c",
-                                   "InstrProfilingMerge.c",
-                                   "InstrProfilingMergeFile.c",
-                                   "InstrProfilingNameVar.c",
-                                   "InstrProfilingPlatformDarwin.c",
-                                   "InstrProfilingPlatformLinux.c",
-                                   "InstrProfilingPlatformOther.c",
-                                   "InstrProfilingPlatformWindows.c",
-                                   "InstrProfilingRuntime.cc",
-                                   "InstrProfilingUtil.c",
-                                   "InstrProfilingValue.c",
-                                   "InstrProfilingWriter.c"];
+    let mut profile_sources = vec![
+        "GCDAProfiling.c",
+        "InstrProfiling.c",
+        "InstrProfilingBuffer.c",
+        "InstrProfilingFile.c",
+        "InstrProfilingMerge.c",
+        "InstrProfilingMergeFile.c",
+        "InstrProfilingNameVar.c",
+        "InstrProfilingPlatformDarwin.c",
+        "InstrProfilingPlatformLinux.c",
+        "InstrProfilingPlatformOther.c",
+        "InstrProfilingPlatformWindows.c",
+        "InstrProfilingRuntime.cc",
+        "InstrProfilingUtil.c",
+        "InstrProfilingValue.c",
+        "InstrProfilingWriter.c",
+    ];
 
     if target.contains("msvc") {
         // Don't pull in extra libraries on MSVC
@@ -56,9 +58,10 @@ fn main() {
 
     // This should be a pretty good heuristic for when to set
     // COMPILER_RT_HAS_ATOMICS
-    if env::var_os("CARGO_CFG_TARGET_HAS_ATOMIC").map(|features| {
-        features.to_string_lossy().to_lowercase().contains("cas")
-    }).unwrap_or(false) {
+    if env::var_os("CARGO_CFG_TARGET_HAS_ATOMIC")
+        .map(|features| features.to_string_lossy().to_lowercase().contains("cas"))
+        .unwrap_or(false)
+    {
         cfg.define("COMPILER_RT_HAS_ATOMICS", Some("1"));
     }