-
Notifications
You must be signed in to change notification settings - Fork 356
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
Miri doesn't respect target-feature
in doc tests
#3869
Comments
target-feature
in some environmentstarget-feature
in doc tests
Are you locally using the exact same Miri version as CI?
|
I guess e-mail didn't show you my edit, I found it's actually doc tests that have this problem (on both machines). |
How are you setting Please show the full command you are using. It's hard to guess that and details matter. :) |
Oh, that helped, thanks! |
FWIW that's a cargo thing, RUSTFLAGS is simply not set on doctests. |
Reading rust-lang/rust#67533 I actually don't understand how setting RUSTDOCFLAGS helps... if rustdoc doesn't pass the flags to the rustc it invokes, then it shouldn't help with |
I guess rustdoc must be forwarding |
Not sure which flags rustdoc passes but FTR I set both |
When code under miri reaches a function annotated with
#[target_feature(enable = "...")]
in doc tests miri throws an error saying "calling a function that requires unavailable target features" despite this being in theif
block that checks the features usingis_x86_feature_enabled!
and despite having-C target-feature=...
on the command line. The same issue is not present in non-doc tests and the same code works fine.The text was updated successfully, but these errors were encountered: