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

Revisit work on cvoid #1086

Merged
merged 1 commit into from Oct 5, 2018

Conversation

Projects
None yet
5 participants
@IsaacWoods
Contributor

IsaacWoods commented Oct 1, 2018

At the recommendation of @SimonSapin here, I have revisited the build script to check whether core::ffi::c_void resolves, instead of relying on a particular rustc version. This allows use on 1.30.x builds with core::ffi::c_void.

I also noticed that c_void is defined twice in this crate, once in lib.rs and again in switch.rs. This instead defines c_void for every target except wasm32. As far as I can tell, this shouldn't actually change functionality on any existing targets.

@rust-highfive

This comment has been minimized.

Show comment
Hide comment
@rust-highfive

rust-highfive Oct 1, 2018

r? @alexcrichton

(rust_highfive has picked a reviewer for you, use r? to override)

rust-highfive commented Oct 1, 2018

r? @alexcrichton

(rust_highfive has picked a reviewer for you, use r? to override)

@SimonSapin

This comment has been minimized.

Show comment
Hide comment
@SimonSapin

SimonSapin Oct 1, 2018

Contributor

The use of #![feature] and -Z make this incompatible with release channels other than Nightly. Could they both be replaced by --crate-type lib?

Contributor

SimonSapin commented Oct 1, 2018

The use of #![feature] and -Z make this incompatible with release channels other than Nightly. Could they both be replaced by --crate-type lib?

@alexcrichton

This comment has been minimized.

Show comment
Hide comment
@alexcrichton

alexcrichton Oct 1, 2018

Member

Thanks for the PR! I would not personally recommend this sort of feature detection though, there's precisely one right answer we know ahead of time for "when is c_void included?" based on versions, so I think we can just amend that here.

Executing rustc -V should be much quicker as well than compiling a program which requires involving a lot more rustc infrastructure.

Member

alexcrichton commented Oct 1, 2018

Thanks for the PR! I would not personally recommend this sort of feature detection though, there's precisely one right answer we know ahead of time for "when is c_void included?" based on versions, so I think we can just amend that here.

Executing rustc -V should be much quicker as well than compiling a program which requires involving a lot more rustc infrastructure.

@IsaacWoods

This comment has been minimized.

Show comment
Hide comment
@IsaacWoods

IsaacWoods Oct 4, 2018

Contributor

Okay, I've dropped the first commit with the feature detection. Do you think the de-duplication bit is still worth merging, or should I close this?

Contributor

IsaacWoods commented Oct 4, 2018

Okay, I've dropped the first commit with the feature detection. Do you think the de-duplication bit is still worth merging, or should I close this?

@alexcrichton

This comment has been minimized.

Show comment
Hide comment
@alexcrichton

alexcrichton Oct 4, 2018

Member

@bors: r+

Nah that's fine, looks good to me!

Member

alexcrichton commented Oct 4, 2018

@bors: r+

Nah that's fine, looks good to me!

@bors

This comment has been minimized.

Show comment
Hide comment
@bors

bors Oct 4, 2018

Contributor

📌 Commit 90d8614 has been approved by alexcrichton

Contributor

bors commented Oct 4, 2018

📌 Commit 90d8614 has been approved by alexcrichton

@bors

This comment has been minimized.

Show comment
Hide comment
@bors

bors Oct 4, 2018

Contributor

⌛️ Testing commit 90d8614 with merge bd42d06...

Contributor

bors commented Oct 4, 2018

⌛️ Testing commit 90d8614 with merge bd42d06...

bors added a commit that referenced this pull request Oct 4, 2018

Auto merge of #1086 - IsaacWoods:master, r=alexcrichton
Revisit work on cvoid

At the recommendation of @SimonSapin [here](rust-lang/rust#53856 (comment)), I have revisited the build script to check whether `core::ffi::c_void` resolves, instead of relying on a particular `rustc` version. This allows use on `1.30.x` builds with `core::ffi::c_void`.

I also noticed that `c_void` is defined twice in this crate, once in `lib.rs` and again in `switch.rs`. This instead defines `c_void` for every target except `wasm32`. As far as I can tell, this shouldn't actually change functionality on any existing targets.
@bors

This comment has been minimized.

Show comment
Hide comment
@bors

bors Oct 4, 2018

Contributor

💥 Test timed out

Contributor

bors commented Oct 4, 2018

💥 Test timed out

@alexcrichton

This comment has been minimized.

Show comment
Hide comment
@alexcrichton
Member

alexcrichton commented Oct 5, 2018

@bors: retry

@bors

This comment has been minimized.

Show comment
Hide comment
@bors

bors Oct 5, 2018

Contributor

⌛️ Testing commit 90d8614 with merge 57c4a15...

Contributor

bors commented Oct 5, 2018

⌛️ Testing commit 90d8614 with merge 57c4a15...

bors added a commit that referenced this pull request Oct 5, 2018

Auto merge of #1086 - IsaacWoods:master, r=alexcrichton
Revisit work on cvoid

At the recommendation of @SimonSapin [here](rust-lang/rust#53856 (comment)), I have revisited the build script to check whether `core::ffi::c_void` resolves, instead of relying on a particular `rustc` version. This allows use on `1.30.x` builds with `core::ffi::c_void`.

I also noticed that `c_void` is defined twice in this crate, once in `lib.rs` and again in `switch.rs`. This instead defines `c_void` for every target except `wasm32`. As far as I can tell, this shouldn't actually change functionality on any existing targets.
@bors

This comment has been minimized.

Show comment
Hide comment
@bors

bors Oct 5, 2018

Contributor

☀️ Test successful - status-appveyor, status-travis
Approved by: alexcrichton
Pushing 57c4a15 to master...

Contributor

bors commented Oct 5, 2018

☀️ Test successful - status-appveyor, status-travis
Approved by: alexcrichton
Pushing 57c4a15 to master...

@bors bors merged commit 90d8614 into rust-lang:master Oct 5, 2018

3 checks passed

continuous-integration/appveyor/pr AppVeyor build succeeded
Details
continuous-integration/travis-ci/pr The Travis CI build passed
Details
homu Test successful
Details
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment