-
Notifications
You must be signed in to change notification settings - Fork 746
A better fix for the calling convention madness. #1403
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
Conversation
I just realized that we don't really check for this but that clang does.
Seems like a better fix, which allows us to preserve typedefs properly, and also to find the calling convention. Fixes rust-lang#1402.
r? @fitzgen |
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.
LGTM! One question / suggestion below.
if opt.starts_with("--target=") { | ||
let mut split = opt.split('='); | ||
split.next(); | ||
return (split.next().unwrap().to_owned(), true); | ||
} | ||
|
||
if opt == "-target" { |
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.
should this also handle two -
?
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.
$ clang --target foo
clang-6.0: error: unsupported option '--target'
So i think not.
@bors-servo r=fitzgen |
📌 Commit c75b62d has been approved by |
A better fix for the calling convention madness. See the commit message for details.
☀️ Test successful - status-travis |
See the commit message for details.