-
Notifications
You must be signed in to change notification settings - Fork 13.6k
Open
Labels
A-diagnosticsArea: Messages for errors, warnings, and lintsArea: Messages for errors, warnings, and lintsA-driverArea: rustc_driver that ties everything together into the `rustc` compilerArea: rustc_driver that ties everything together into the `rustc` compilerA-sanitizersArea: Sanitizers for correctness and code qualityArea: Sanitizers for correctness and code qualityC-enhancementCategory: An issue proposing an enhancement or a PR with one.Category: An issue proposing an enhancement or a PR with one.T-compilerRelevant to the compiler team, which will review and decide on the PR/issue.Relevant to the compiler team, which will review and decide on the PR/issue.requires-nightlyThis issue requires a nightly compiler in some way.This issue requires a nightly compiler in some way.
Description
I'm trying to build some code with the address sanitiser on; and I run into this error:
Compiling failure_derive v0.1.5
error: Only executables, staticlibs, cdylibs, dylibs and rlibs can be compiled with `-Z sanitizer`
error: aborting due to previous error
error: Could not compile `failure_derive`.
error: build failed
After some googling the solution appears to be(from #48199) to use --target=...
. I was wondering if the message could be improved to something like:
Compiling failure_derive v0.1.5
error: Only executables, staticlibs, cdylibs, dylibs and rlibs can be compiled with `-Z sanitizer`
hint: Try running the command again, and specifying a target triple; e.g. `--target=x86_64-unknown-linux-gnu`
error: aborting due to previous error
error: Could not compile `failure_derive`.
error: build failed
Metadata
Metadata
Assignees
Labels
A-diagnosticsArea: Messages for errors, warnings, and lintsArea: Messages for errors, warnings, and lintsA-driverArea: rustc_driver that ties everything together into the `rustc` compilerArea: rustc_driver that ties everything together into the `rustc` compilerA-sanitizersArea: Sanitizers for correctness and code qualityArea: Sanitizers for correctness and code qualityC-enhancementCategory: An issue proposing an enhancement or a PR with one.Category: An issue proposing an enhancement or a PR with one.T-compilerRelevant to the compiler team, which will review and decide on the PR/issue.Relevant to the compiler team, which will review and decide on the PR/issue.requires-nightlyThis issue requires a nightly compiler in some way.This issue requires a nightly compiler in some way.
Type
Projects
Milestone
Relationships
Development
Select code repository
Activity
-Zsanitizer=address
= Linking error rust-lang/cargo#10666