Skip to content
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

Make MSVC detection ludicrously robust #34492

Merged
merged 1 commit into from
Jul 2, 2016

Conversation

retep998
Copy link
Member

Resurrection of #31158

r? @alexcrichton

}
} else { None }
} else { vec![] }
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Perhaps this could just be:

match (arch, host_arch()) {
    // ... 
}

Can you also add docs as to what's being returned here? It's not clear to me at least what these are vectors of nor what each element of the pair is.

@retep998
Copy link
Member Author

Updated bin_subdir and the comments for it.

Also added a commit with one function converted to use otry!. Can you tell me what you think and whether I should apply that style to the rest of the functions?

@alexcrichton
Copy link
Member

Yeah the logic has gotten complicated enough in a few places that I'd be fine using that macro for most of the functions, other than that looks good to me!

@retep998
Copy link
Member Author

I've converted what I could to using the macro.

Some(val) => val,
None => return None,
})
}
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This macro has been written at least twice in librustc under different names 😆

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Clearly this just indicates the need for this sort of macro in libstd. Sure would be nice if the new ? stuff supported Option.

@alexcrichton
Copy link
Member

Tidy looks like it's failing on travis, but otherwise r=me

Should fix a few more edge cases

Fixes rust-lang#31151
Fixes rust-lang#32159
Fixes rust-lang#34484
Improves rust-lang-deprecated/rust-packaging#50

Signed-off-by: Peter Atashian <retep998@gmail.com>
@retep998
Copy link
Member Author

Travis appears to have passed.

@sfackler
Copy link
Member

@bors r=alexcrichton

@bors
Copy link
Contributor

bors commented Jun 29, 2016

📌 Commit a1b33b4 has been approved by alexcrichton

@bors
Copy link
Contributor

bors commented Jul 1, 2016

⌛ Testing commit a1b33b4 with merge ed33659...

@bors
Copy link
Contributor

bors commented Jul 1, 2016

💔 Test failed - auto-win-msvc-64-opt-rustbuild

@alexcrichton
Copy link
Member

@alexcrichton
Copy link
Member

@bors: retry

  • v

On Fri, Jul 1, 2016 at 5:38 AM, bors notifications@github.com wrote:

💔 Test failed - auto-win-msvc-64-opt-rustbuild
https://buildbot.rust-lang.org/builders/auto-win-msvc-64-opt-rustbuild/builds/1626


You are receiving this because you were assigned.
Reply to this email directly, view it on GitHub
#34492 (comment), or mute
the thread
https://github.com/notifications/unsubscribe/AAD95Laha4Rqk-EAzk9d8w8-n1iLQqWrks5qRQoogaJpZM4I-q8o
.

@bors
Copy link
Contributor

bors commented Jul 1, 2016

⌛ Testing commit a1b33b4 with merge 23095ae...

@bors
Copy link
Contributor

bors commented Jul 1, 2016

💔 Test failed - auto-win-msvc-64-opt-rustbuild

@alexcrichton
Copy link
Member

@bors
Copy link
Contributor

bors commented Jul 2, 2016

⌛ Testing commit a1b33b4 with merge 7e07e31...

bors added a commit that referenced this pull request Jul 2, 2016
Make MSVC detection ludicrously robust

Resurrection of #31158

r? @alexcrichton
@bors bors merged commit a1b33b4 into rust-lang:master Jul 2, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants