-
-
Notifications
You must be signed in to change notification settings - Fork 70
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
Regression: Trybuild doesn't pass on --target
, even when needed
#122
Comments
--target
in LPC8xx HAL build--target
, even when needed
Thanks -- sorry about the breakage. I've yanked 1.0.44 until someone can send a fix. |
No worries! Thank you for addressing this so quickly! |
Sorry for the breakage! It seems the heuristic using RUSTFLAGS was not enough. On lpc-rs/lpc8xx-hal, If rustflags is not set, it will succeed.
If rustflags is set, it will fail.
Therefore, it seems that my understanding here was incorrect (not only CARGO_ENCODED_RUSTFLAGS, but also RUSTFLAGS seems to have the same nature): Lines 28 to 31 in 0b33c0b
|
The best way for this seems to be rust-lang/cargo#9532, but it may take quite a while before it is merged. |
We're using Trybuild in LPC8xx HAL. We have a
.cargo/config.toml
there that sets the target tothumbv6m-none-eabi
.We override the target to run the Trybuild tests using
--target
in our build script (specifically these lines). This works perfectly with Trybuild 1.0.43 (and earlier), but fails with Trybuild 1.0.44:This error indicates that
--target
didn't take, and that the target from.cargo/config.toml
is used.#121 seems to be the culprit here. I think the code it added wrongly assumes that Trybuild doesn't need to pass
--target
, if the--target
it receives is the same as the host. This is not true, if--target
is used to override a target set in.cargo/config.toml
/.cargo/config
.cc @taiki-e, @dtolnay
The text was updated successfully, but these errors were encountered: