Skip to content

Commit

Permalink
Restore correct version of comment and fix logic bug
Browse files Browse the repository at this point in the history
  • Loading branch information
chriswailes committed Mar 14, 2024
1 parent bf2858a commit f46acea
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions compiler/rustc_codegen_ssa/src/back/link.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1213,16 +1213,16 @@ fn add_sanitizer_libraries(
return;
}

// On macOS the runtimes are distributed as dylibs which should be linked to
// both executables and dynamic shared objects. On most other platforms the
// runtimes are currently distributed as static libraries which should be
// linked to executables only.
if matches!(crate_type, CrateType::Rlib | CrateType::Staticlib) {
return;
}

// On macOS and Windows using MSVC the runtimes are distributed as dylibs
// which should be linked to both executables and dynamic libraries.
// Everywhere else the runtimes are currently distributed as static
// libraries which should be linked to executables only.
if matches!(crate_type, CrateType::Dylib | CrateType::Cdylib | CrateType::ProcMacro)
&& (sess.target.is_like_osx || sess.target.is_like_msvc)
&& !(sess.target.is_like_osx || sess.target.is_like_msvc)
{
return;
}
Expand Down

0 comments on commit f46acea

Please sign in to comment.