File ubuntu-use-system-profiler-rt.patch of Package rust

diff --git a/library/profiler_builtins/build.rs b/library/profiler_builtins/build.rs
index 1b1f11798d..36dd3b8a91 100644
--- a/library/profiler_builtins/build.rs
+++ b/library/profiler_builtins/build.rs
@@ -7,6 +7,18 @@ use std::path::Path;
 
 fn main() {
     let target = env::var("TARGET").expect("TARGET was not set");
+    if target == std::env::var("HOST").unwrap() {
+        // use system profiler runtime if possible
+        println!(
+            "cargo:rustc-link-search=/usr/lib/clang/{}/lib/linux/",
+            env::var("DEB_LLVM_VERSION").unwrap()
+        );
+        println!(
+            "cargo:rustc-link-lib=static=clang_rt.profile-{}",
+            env::var("DEB_CLANG_RT_ARCH").unwrap()
+        );
+        return;
+    }
     let cfg = &mut cc::Build::new();
 
     // FIXME: `rerun-if-changed` directives are not currently emitted and the build script
openSUSE Build Service is sponsored by