Skip to content

Commit f46acea

Browse files
committed
Restore correct version of comment and fix logic bug
1 parent bf2858a commit f46acea

File tree

1 file changed

+5
-5
lines changed
  • compiler/rustc_codegen_ssa/src/back

1 file changed

+5
-5
lines changed

compiler/rustc_codegen_ssa/src/back/link.rs

+5-5
Original file line numberDiff line numberDiff line change
@@ -1213,16 +1213,16 @@ fn add_sanitizer_libraries(
12131213
return;
12141214
}
12151215

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

1220+
// On macOS and Windows using MSVC the runtimes are distributed as dylibs
1221+
// which should be linked to both executables and dynamic libraries.
1222+
// Everywhere else the runtimes are currently distributed as static
1223+
// libraries which should be linked to executables only.
12241224
if matches!(crate_type, CrateType::Dylib | CrateType::Cdylib | CrateType::ProcMacro)
1225-
&& (sess.target.is_like_osx || sess.target.is_like_msvc)
1225+
&& !(sess.target.is_like_osx || sess.target.is_like_msvc)
12261226
{
12271227
return;
12281228
}

0 commit comments

Comments
 (0)