Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Diagnose use sanitizers with crt-static #85559

Merged
merged 1 commit into from
May 31, 2021

Conversation

12101111
Copy link
Contributor

Fix: #85459

@rust-highfive
Copy link
Collaborator

r? @lcnr

(rust-highfive has picked a reviewer for you, use r? to override)

@rust-highfive rust-highfive added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label May 21, 2021
@lcnr
Copy link
Contributor

lcnr commented May 24, 2021

I am not able to review any PRs in the near future.

r? @nagisa

@rust-highfive rust-highfive assigned nagisa and unassigned lcnr May 24, 2021
@@ -1512,6 +1512,17 @@ fn validate_commandline_args_with_session_available(sess: &Session) {
if let (Some(first), Some(second)) = (sanitizer_iter.next(), sanitizer_iter.next()) {
sess.err(&format!("`-Zsanitizer={}` is incompatible with `-Zsanitizer={}`", first, second));
}

// Cannot enable crt-static with sanitizers on Linux
for sanitizer in sess.opts.debugging_opts.sanitizer.into_iter() {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Instead of emitting an error message for each of the enabled sanitizers, could we emit a single message that covered all of the enabled sanitizers in a single diagnostic?

@nagisa
Copy link
Member

nagisa commented May 30, 2021

@bors r+

@bors
Copy link
Contributor

bors commented May 30, 2021

📌 Commit 4376484 has been approved by nagisa

@bors bors added S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels May 30, 2021
@bors
Copy link
Contributor

bors commented May 30, 2021

⌛ Testing commit 4376484 with merge aab93ca...

@bors
Copy link
Contributor

bors commented May 31, 2021

☀️ Test successful - checks-actions
Approved by: nagisa
Pushing aab93ca to master...

@bors bors added the merged-by-bors This PR was explicitly merged by bors. label May 31, 2021
@bors bors merged commit aab93ca into rust-lang:master May 31, 2021
@rustbot rustbot added this to the 1.54.0 milestone May 31, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
merged-by-bors This PR was explicitly merged by bors. S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

rustc should give compile error when try to enable sanitizer while statically link to libc like gcc does
6 participants