You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
validate target triples before resolving crates #33329
If the target had been validated earlier the error would be more obvious.
we are already doing this. See:
$ rustc --target foo bar.rs
error: Error loading target specification: Could not find specification for target "foo"
i.e. validate the target before looking for crates.
The issue here is that x86_64_unknown-linux-musl (with underscore) is accepted as a valid target (as x86_64-unknown-linux-musl) because of this function -- it s/-/_/g the target name so it can compare it to the module name, which can't have dashes in it.
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.
Activity
japaric commentedon May 2, 2016
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
x86_64_unknown-linux-musl(with underscore) is accepted as a valid target (asx86_64-unknown-linux-musl) because of this function -- its/-/_/gthe target name so it can compare it to the module name, which can't have dashes in it.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.
Auto merge of #33363 - japaric:target, r=<try>
Auto merge of #33363 - japaric:target, r=japaric