-
Notifications
You must be signed in to change notification settings - Fork 2.5k
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
proc-macro + -Zsanitizer=address
= Linking error
#10666
Comments
Thanks for the report! The issue is that RUSTFLAGS is passed to proc-macros without the I'm going to close as a duplicate of rust-lang/rust#63986, rust-lang/rust#48199, #3739 and others. If you have further issues with using sanitizers, I would recommend filing issues at https://github.com/rust-lang/rust/issues as Cargo doesn't really have any interaction with them. |
I added this note, because if you forget the `--target` flags, you get a really ugly error message. rust-lang/cargo#10666
Added note in documentation I added this note, because if you forget the `--target` flags, you get a really ugly error message. rust-lang/cargo#10666
They are probably not terribly useful for us but let's see what happens. Unfortunately cargo does not properly forward the combination of "RUSTFLAGS" and "--target" that is currently required to build with ASan [1]. Hence doctests will fail to link on ASan builds. Let's disable doctests when ASan is active. [1]: rust-lang/cargo#10666 et al
Problem
If you give
-Zsanitizer=address
and use a proc-macro crate, you get an ugly linking error. It should either compile, or give a nicer error message.Steps
Take this example crate
cargo build
works fine, butPossible Solution(s)
No response
Notes
Version
The text was updated successfully, but these errors were encountered: