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

Fix calling convention propagation for function pointers. #549

Merged
merged 3 commits into from
Mar 1, 2017

Conversation

emilio
Copy link
Contributor

@emilio emilio commented Mar 1, 2017

This sucks, but works.

The full solution is a refactoring that needs more thought than the time I'm
able to dedicate to bindgen right now, see the comment for details.

r? @fitzgen

This sucks, but works.

The full solution is a refactoring that needs more thought than the time I'm
able to dedicate to bindgen right now, see the comment for details.

Signed-off-by: Emilio Cobos Álvarez <[email protected]>
@highfive
Copy link

highfive commented Mar 1, 2017

warning Warning warning

  • These commits modify unsafe code. Please review it carefully!

@emilio
Copy link
Contributor Author

emilio commented Mar 1, 2017

I need to figure out a way for this to be green in CI given we're "cross-compiling" the test.

Copy link
Member

@fitzgen fitzgen left a comment

Choose a reason for hiding this comment

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

So the CI issue is that we don't have support for something like

// bindgen-windows-only

in our test runner, right?

Since we generate different bindings with MSVC mangling anyways, it would make sense to have different expectations dirs for different targets. Then we could add appveyor CI.

typedef void (*my_fun_t)(int, int, int, int,
int, int, int, int,
int, int, int, int,
int, int, int, int);
Copy link
Member

Choose a reason for hiding this comment

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

Nice :-|

// and https://github.com/rust-lang/rust/issues/40158
//
// Note that copy is always derived, so we don't need to implement it.
impl CanDeriveDebug for FunctionSig {
Copy link
Member

Choose a reason for hiding this comment

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

At least extending these checks is obvious and straight forward.

@emilio
Copy link
Contributor Author

emilio commented Mar 1, 2017

Since we generate different bindings with MSVC mangling anyways, it would make sense to have different expectations dirs for different targets. Then we could add appveyor CI.

Yeah, but then we need to add an easy way of updating test expectations across different targets. It seems just giving clang the right -target arg might just do it.

And I don't want nor have the time to debug it right now.
@emilio
Copy link
Contributor Author

emilio commented Mar 1, 2017

@bors-servo r=fitzgen

@bors-servo
Copy link

📌 Commit 4c07a72 has been approved by fitzgen

@bors-servo
Copy link

⌛ Testing commit 4c07a72 with merge d57616c...

bors-servo pushed a commit that referenced this pull request Mar 1, 2017
Fix calling convention propagation for function pointers.

This sucks, but works.

The full solution is a refactoring that needs more thought than the time I'm
able to dedicate to bindgen right now, see the comment for details.

r? @fitzgen
@bors-servo
Copy link

☀️ Test successful - status-travis
Approved by: fitzgen
Pushing d57616c to master...

@bors-servo bors-servo merged commit 4c07a72 into rust-lang:master Mar 1, 2017
@bors-servo bors-servo mentioned this pull request Mar 1, 2017
4 tasks
@emilio emilio deleted the call-conv-lost branch March 1, 2017 18:15
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.

4 participants