Add -Z external-sanitizer-runtime

This adds the unstable `-Z external-sanitizer-runtime` flag that will
prevent rustc from emitting linker paths for the in-tree LLVM sanitizer
runtime library.
This commit is contained in:
Chris Wailes
2023-10-17 16:18:59 -07:00
parent 3cbb93223f
commit 2a9d1ed538
2 changed files with 3 additions and 0 deletions

View File

@@ -1206,6 +1206,7 @@ fn add_sanitizer_libraries(
// Everywhere else the runtimes are currently distributed as static
// libraries which should be linked to executables only.
let needs_runtime = !sess.target.is_like_android
&& !sess.opts.unstable_opts.external_clangrt
&& match crate_type {
CrateType::Executable => true,
CrateType::Dylib | CrateType::Cdylib | CrateType::ProcMacro => {