-
Notifications
You must be signed in to change notification settings - Fork 13k
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
validate target triples before resolving crates #33329
Comments
So, I checked this and
we are already doing this. See:
i.e. validate the target before looking for crates. The issue here is that The fix seems simple because that function is defined in a macro and it also has access to the target names (the ones with dashes). So we have to tweak it to use that instead of the module names (the ones without dashes). I'll look into it. |
previously the logic was accepting wrong triples (like `x86_64_unknown-linux-musl`) as valid ones (like `x86_64-unknown-linux-musl`) if they contained an underscore instead of a dash. fixes rust-lang#33329
fix built-in target detection previously the logic was accepting wrong triples (like `x86_64_unknown-linux-musl`) as valid ones (like `x86_64-unknown-linux-musl`) if they contained an underscore instead of a dash. fixes #33329 --- r? @brson I wanted to use a compile-fail test at first. But, you can't pass an extra `--target` flag to `rustc` for those because they already call `rustc --target $HOST` so you get a `error: Option 'target' given more than once.`. The run-make test used here works fine though.
fix built-in target detection previously the logic was accepting wrong triples (like `x86_64_unknown-linux-musl`) as valid ones (like `x86_64-unknown-linux-musl`) if they contained an underscore instead of a dash. fixes #33329 --- r? @brson I wanted to use a compile-fail test at first. But, you can't pass an extra `--target` flag to `rustc` for those because they already call `rustc --target $HOST` so you get a `error: Option 'target' given more than once.`. The run-make test used here works fine though.
I stared at this for a while
before realizing I had typod the target triple. If the target had been validated earlier the error would be more obvious.
The text was updated successfully, but these errors were encountered: