about summary refs log tree commit diff
path: root/src/bootstrap
diff options
context:
space:
mode:
authorAaron Green <nopsledder@users.noreply.github.com>2020-01-15 15:48:53 -0800
committerAaron Green <nopsledder@users.noreply.github.com>2020-01-22 15:19:36 -0800
commit4210409f443a40c72876e5e8398e8652a47a2ba6 (patch)
tree6baeb5ab72bdf609bb2ee0418a5ca084f07bff61 /src/bootstrap
parentae66171b41b1d05128afd0d666475bc4ba617469 (diff)
downloadrust-4210409f443a40c72876e5e8398e8652a47a2ba6.tar.gz
rust-4210409f443a40c72876e5e8398e8652a47a2ba6.zip
Enable ASan on Fuchsia
This change adds the x86_64-fuchsia and aarch64-fuchsia LLVM targets to
those allowed to invoke -Zsanitizer. Currently, the only overlap between
compiler_rt sanitizers supported by both rustc and Fuchsia is ASan.
Diffstat (limited to 'src/bootstrap')
-rw-r--r--src/bootstrap/native.rs18
1 files changed, 18 insertions, 0 deletions
diff --git a/src/bootstrap/native.rs b/src/bootstrap/native.rs
index 89e1a7319cf..5bbd9f47fc9 100644
--- a/src/bootstrap/native.rs
+++ b/src/bootstrap/native.rs
@@ -659,6 +659,24 @@ fn supported_sanitizers(out_dir: &Path, target: Interned<String>) -> Vec<Sanitiz
                 });
             }
         }
+        "x86_64-fuchsia" => {
+            for s in &["asan"] {
+                result.push(SanitizerRuntime {
+                    cmake_target: format!("clang_rt.{}-x86_64", s),
+                    path: out_dir.join(&format!("build/lib/fuchsia/libclang_rt.{}-x86_64.a", s)),
+                    name: format!("librustc_rt.{}.a", s),
+                });
+            }
+        }
+        "aarch64-fuchsia" => {
+            for s in &["asan"] {
+                result.push(SanitizerRuntime {
+                    cmake_target: format!("clang_rt.{}-aarch64", s),
+                    path: out_dir.join(&format!("build/lib/fuchsia/libclang_rt.{}-aarch64.a", s)),
+                    name: format!("librustc_rt.{}.a", s),
+                });
+            }
+        }
         _ => {}
     }
     result