-
Notifications
You must be signed in to change notification settings - Fork 12.8k
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
fix built-in target detection #33363
Conversation
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
Thanks for the pull request, and welcome! The Rust team is excited to review your changes, and you should hear from @brson (or someone else) soon. If any changes to this PR are deemed necessary, please add them as extra commits. This ensures that the reviewer can see what has changed since they last reviewed the code. Due to the way GitHub handles out-of-date commits, this should also make it reasonably obvious what issues have or haven't been addressed. Large or tricky changes may require several passes of review and changes. Please see the contribution instructions for more information. |
@bors r+ |
📌 Commit 5943507 has been approved by |
@@ -71,10 +71,9 @@ macro_rules! supported_targets { | |||
|
|||
// this would use a match if stringify! were allowed in pattern position |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
is this comment stale now?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
(it wasn't true anyway)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
(it wasn't true anyway)
Actually it would look like this: http://is.gd/ot9Ta2
Now that we are using $triple
instead of $module
we can change this into a match. I'll send a follow up PR because this one already got pulled into the rollup.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
looks like no longer in the rollup
Pushed a commit with the if -> match refactor @bors r=brson |
📌 Commit ec616d5 has been approved by |
⌛ Testing commit ec616d5 with merge c9ef2c4... |
💔 Test failed - auto-win-msvc-64-opt-rustbuild |
I had forgotten about this PR 😅. Hmm, I guess this failed because there is no |
Oh I think that Windows has |
@alexcrichton Does the msvc bot also have grep installed? And does it run the tests under the mingw shell? AFAICT my grep string has no special characters... just alphanum chars and |
They should yeah, currently all those bots run in a MinGW shell |
@bors retry Just retrying to see the error again. |
⌛ Testing commit ec616d5 with merge 7240b18... |
Error was:
|
@japaric Can we just xfail this on windows and push it through? |
@japaric Yep, and that snippet looks ok to me (but I've never ignored a run-make test before). |
I just realized my Makefile is missing the @bors try |
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.
💥 Test timed out |
This was stuck in the queue as failed (because of the previous try). Rebased so I can r+ it again. @bors: r+ |
📌 Commit f438801 has been approved by |
⌛ Testing commit f438801 with merge 5033302... |
@bors: retry force clean
|
@bors: retry force clean |
⌛ Testing commit f438801 with merge 31db8e2... |
💔 Test failed - auto-win-gnu-32-opt |
@bors: retry On Mon, Jul 25, 2016 at 2:45 PM, bors [email protected] wrote:
|
⌛ Testing commit f438801 with merge c1b278a... |
💔 Test failed - auto-win-gnu-32-opt-rustbuild |
@bors: retry On Tue, Jul 26, 2016 at 3:02 AM, bors [email protected] wrote:
|
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.
previously the logic was accepting wrong triples (like
x86_64_unknown-linux-musl
) as valid ones (likex86_64-unknown-linux-musl
) ifthey 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 torustc
for those because they already callrustc --target $HOST
so you get aerror: Option 'target' given more than once.
. The run-make test used here works fine though.