diff options
| author | Chris Wailes <chriswailes@google.com> | 2022-09-08 16:33:44 -0700 |
|---|---|---|
| committer | Chris Wailes <chriswailes@google.com> | 2022-09-20 14:16:57 -0700 |
| commit | 3d5a41724bd72c228a9e26a44a55337672c7dee3 (patch) | |
| tree | f27f1f9339109e62b56e54622bde0540a503b5d3 /compiler/rustc_codegen_ssa/src | |
| parent | 11bb80a92b4f46fa7dfa9148d0bdfc185a7621bd (diff) | |
| download | rust-3d5a41724bd72c228a9e26a44a55337672c7dee3.tar.gz rust-3d5a41724bd72c228a9e26a44a55337672c7dee3.zip | |
Update rustc's information on Android's sanitizers
This patch updates sanitizier 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')
| -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; |
