@@ -278,17 +278,29 @@ impl LinkSelfContained {
278
278
}
279
279
280
280
/// Returns whether the self-contained linker component was enabled on the CLI, using the
281
- /// `-C link-self-contained=+linker` syntax, or one of the `true` shorcuts .
281
+ /// `-C link-self-contained=+linker` syntax, or one of the `true` shortcuts .
282
282
pub fn is_linker_enabled ( & self ) -> bool {
283
283
self . enabled_components . contains ( LinkSelfContainedComponents :: LINKER )
284
284
}
285
285
286
286
/// Returns whether the self-contained linker component was disabled on the CLI, using the
287
- /// `-C link-self-contained=-linker` syntax, or one of the `false` shorcuts .
287
+ /// `-C link-self-contained=-linker` syntax, or one of the `false` shortcuts .
288
288
pub fn is_linker_disabled ( & self ) -> bool {
289
289
self . disabled_components . contains ( LinkSelfContainedComponents :: LINKER )
290
290
}
291
291
292
+ // Returns whether the self-contained sanitizer component was enabled on the CLI, using the
293
+ // `-C link-self-contained=+sanitizers` syntax, or one of the `true` shortcuts.
294
+ pub fn is_sanitizers_enabled ( & self ) -> bool {
295
+ self . enabled_components . contains ( LinkSelfContainedComponents :: SANITIZERS )
296
+ }
297
+
298
+ /// Returns whether the self-contained linker component was disabled on the CLI, using the
299
+ /// `-C link-self-contained=-sanitizers` syntax, or one of the `false` shortcuts.
300
+ pub fn is_sanitizers_disabled ( & self ) -> bool {
301
+ self . disabled_components . contains ( LinkSelfContainedComponents :: SANITIZERS )
302
+ }
303
+
292
304
/// Returns CLI inconsistencies to emit errors: individual components were both enabled and
293
305
/// disabled.
294
306
fn check_consistency ( & self ) -> Option < LinkSelfContainedComponents > {
0 commit comments