-
-
Notifications
You must be signed in to change notification settings - Fork 115
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
rustc throws an error when compiling with target-feature=-sse #262
Comments
I am closing because this doesn't seem like something where a fix in proc-macro2 would be appropriate. Possibly a fix in llvm or rustc; but you would need to provide a minimal repro of your use case to one of those projects. rust-lang/rust#66644 (comment) seems applicable:
|
my bad on the test case, it was overriding RUSTFLAGS in .cargo/config, removing |
the kicker here is I'd love to compile it with SSE. I really don't need to disable it for the proc macro I'm writing, as it runs on the host. but the project I'm using the macro in is a target I'd like to disable SSE on. there just doesn't seem to be a way to compile the proc macro crate with SSE, but the main crate as -SSE. the use case is fully position independent code. the compiler is generating movaps instructions, which must have 16-byte aligned memory or an exception is thrown. i want it to not generate those instructions! but again, the proc macro crate runs on the host so should not be subject to the restriction :/ |
It seems passing --target makes this issue go away: Very interesting. Resolved, but good to document. |
Having
proc-macro2
as a dependency in a project with the above.cargo/config
throws an error when compiling.I can get the behavior to go away if I explicitly set
-Z allow-features
in RUSTFLAGS only to the features I need.It does not work if I set
allow-features
in the cargo config, which is weird. Because of this I thought it was something to do withproc_macro_span
sincefeature_allowed
in build.rs only checks RUSTFLAGS and is only used to see whether to enableproc_macro_span
:I have tried cloning the repo and manually commenting out things in
build.rs
but it still throws the error, so I am stumped at this point.With nightly rust versions:
It compiles fine on stable.
The text was updated successfully, but these errors were encountered: