diff options
| author | Dylan DPC <99973273+Dylan-DPC@users.noreply.github.com> | 2022-09-22 18:25:51 +0530 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2022-09-22 18:25:51 +0530 |
| commit | b36a10af7e31333f907b70237336ae4e690c4c1e (patch) | |
| tree | 4f60b9c379bd3cd9275e8ca3ba9ebf72e079ec43 /compiler/rustc_codegen_ssa/src/back | |
| parent | c10f7d73953a02982bbac3a504b0d22a7bda32b1 (diff) | |
| parent | 3d5a41724bd72c228a9e26a44a55337672c7dee3 (diff) | |
| download | rust-b36a10af7e31333f907b70237336ae4e690c4c1e.tar.gz rust-b36a10af7e31333f907b70237336ae4e690c4c1e.zip | |
Rollup merge of #101598 - chriswailes:sanitizers, r=nagisa,eholk
Update rustc's information on Android's sanitizers This patch updates sanitizer support definitions for Android inside the compiler. It also adjusts the logic to make sure no pre-built sanitizer runtime libraries are emitted as these are instead provided dynamically on Android targets.
Diffstat (limited to 'compiler/rustc_codegen_ssa/src/back')
| -rw-r--r-- | compiler/rustc_codegen_ssa/src/back/link.rs | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/compiler/rustc_codegen_ssa/src/back/link.rs b/compiler/rustc_codegen_ssa/src/back/link.rs index c5e18c7fae8..bb57fca74a2 100644 --- a/compiler/rustc_codegen_ssa/src/back/link.rs +++ b/compiler/rustc_codegen_ssa/src/back/link.rs @@ -1090,11 +1090,12 @@ fn add_sanitizer_libraries(sess: &Session, crate_type: CrateType, linker: &mut d // both executables and dynamic shared objects. Everywhere else the runtimes // are currently distributed as static libraries which should be linked to // executables only. - let needs_runtime = match crate_type { - CrateType::Executable => true, - CrateType::Dylib | CrateType::Cdylib | CrateType::ProcMacro => sess.target.is_like_osx, - CrateType::Rlib | CrateType::Staticlib => false, - }; + let needs_runtime = !sess.target.is_like_android + && match crate_type { + CrateType::Executable => true, + CrateType::Dylib | CrateType::Cdylib | CrateType::ProcMacro => sess.target.is_like_osx, + CrateType::Rlib | CrateType::Staticlib => false, + }; if !needs_runtime { return; |
