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

Add support for non-unix and non-windows platforms #13

Merged
merged 7 commits into from
May 17, 2019
Merged

Add support for non-unix and non-windows platforms #13

merged 7 commits into from
May 17, 2019

Conversation

bjorn3
Copy link
Member

@bjorn3 bjorn3 commented May 11, 2019

Cross process jobserver and thread cancellation is not supported

This is part of an experiment to port rustc to wasi. (cc rust-lang/miri#722)

cc @RReverser

Cross process jobserver and thread cancellation is not supported
src/lib.rs Outdated Show resolved Hide resolved
Copy link
Member

@alexcrichton alexcrichton left a comment

Choose a reason for hiding this comment

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

Thanks!

src/lib.rs Outdated Show resolved Hide resolved
src/lib.rs Outdated
@@ -254,13 +254,16 @@ impl Client {
/// On Unix and Windows this will clobber the `CARGO_MAKEFLAGS` environment
/// variables for the child process, and on Unix this will also allow the
/// two file descriptors for this client to be inherited to the child.
///
/// On platforms other than Unix and Windows this does nothing.
Copy link
Member

Choose a reason for hiding this comment

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

It seems like it may be more appropriate to panic on other platforms? It's not supported there so only in-process usage is expected to work

Choose a reason for hiding this comment

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

That would make impossible to use same code compiled to both native and WASI, without extra #[cfg(...)].

Copy link
Member Author

@bjorn3 bjorn3 May 14, 2019

Choose a reason for hiding this comment

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

@RReverser it would be possible, as WASI doesn't support spawning processes, so if you were to call configure you would likely panic shortly afterwards for spawning a thread anyway. Also because the function keeps existing no #[cfg(...)] is required to keep it compiling.

Edit: on other previously unsupported platforms, there would need to be a #[cfg(...)] in the client code, but at least that prevents them from accidentally overloading the processor due to missing cross-process jobserver support.

src/lib.rs Outdated Show resolved Hide resolved
src/lib.rs Outdated Show resolved Hide resolved
@alexcrichton alexcrichton merged commit 15b93a7 into rust-lang:master May 17, 2019
@alexcrichton
Copy link
Member

Thanks!

@bjorn3 bjorn3 deleted the misc_arch_support branch May 17, 2019 15:43
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.

3 participants