Enable address sanitizer for MSVC targets using INFERASANLIBS linker flag
This commit is contained in:
parent
2e79c8deb0
commit
bc3b7c9930
14 changed files with 80 additions and 25 deletions
|
@ -1274,7 +1274,10 @@ fn validate_commandline_args_with_session_available(sess: &Session) {
|
|||
}
|
||||
|
||||
// Cannot enable crt-static with sanitizers on Linux
|
||||
if sess.crt_static(None) && !sess.opts.unstable_opts.sanitizer.is_empty() {
|
||||
if sess.crt_static(None)
|
||||
&& !sess.opts.unstable_opts.sanitizer.is_empty()
|
||||
&& !sess.target.is_like_msvc
|
||||
{
|
||||
sess.dcx().emit_err(errors::CannotEnableCrtStaticLinux);
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue