Closed tsoutsman closed 2 years ago
I don't think that is valid Rust? You might be confusing it with the cfg!
macro. =)
I don't think that is valid Rust? You might be confusing it with the cfg! macro. =)
Sorry for the bad example, the code is from the cfg_if!
macro here. I think the issue is still valid.
You can probably workaround it by guarding it with bootstrap
cfg.
@tsoutsman Sorry, for the trouble you had. The reason why you have the error is because the stage0
compiler is based on the beta compiler who doesn't (yet) know about your (new) target. The way to fix it is by adding an exception for your target to the EXTRA_CHECK_CFGS
list: https://github.com/rust-lang/rust/blob/2f847b81a0d8633f200f2c2269c1c43fe9e7def3/src/bootstrap/lib.rs#L205-L209
I would suggest doing something like this:
- Some(&["asmjs", "spirv", "nvptx", "nvptx64", "le32", "xtensa"]),
+ // #[cfg(bootstrap)] theseus -- This is just to make just that new exception is removed when the stage0 compiler is bumped
+ Some(&["asmjs", "spirv", "nvptx", "nvptx64", "le32", "xtensa", "theseus"]),
Hi, I've forked the Rust compiler to add a new target operating system. However, I ran into issues with the work being done for #82450.
My builds were failing with the following error:
even when using a custom target spec with
os: "theseus"
. To circumvent the issue I removed the checks, but this isn't an ideal fix. I'm not sure what the best solution is, but it should be mentioned on the Adding a new target page in the rustc dev guide.