-
Notifications
You must be signed in to change notification settings - Fork 13.2k
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
Add cygwin target. #134999
Add cygwin target. #134999
Conversation
Failed to set assignee to
|
These commits modify compiler targets. Some changes occurred in src/doc/rustc/src/platform-support cc @Noratrieb |
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
r? compiler |
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This should be |
I'm not sure if two separate triples are necessary given msys2/MSYS2-packages#3012, but I think there is no solution for having to distinguish between Cygwin and MSYS2 DLL yet. |
I will answer these two questions here. Ookiineko chose
Therefore, I would suggest that just treat Cygwin as an Unix OS. |
Well... To be honest MSYS2 is just a fork of Cygwin, with some user-friendly changes. From the compiler's view, the differences are only
However, the cygwin dll and msys2 dll should not be mixed. They all maintain their own services and layers. It might cause some misc errors when a cygwin exe linked to a msys2 dll trying to call I add the P.S. I test the cygwin target on MSYS2, actually. I just symlinked the linker and |
@Berrysoft could you file an MCP for adding these two targets? Usually we wouldn't ask for MCPs for adding Tier 3 targets, but in this case I think it's warranted to allow compiler team members to discuss how to sort out the For instance, say if I have something that is conditioned on |
Well, I would say that Cygwin is Unix enough in most times, and also Windows enough all the time (because it is really running on Windows). However, from the development view, I don't think
Yes, treating Cygwin as Unix has some drawbacks:
Therefore I would say that treating @jieyouxu Do you still think that I need to file an MCP? It's not hard for me to just opening an issue, but I'm afraid of a large debate, only focusing on whether cygwin is Unix or Windows.
I am going to change it. |
That's exactly why I am requesting an MCP when usually Tier 3 targets don't need to, because this aspect is controversial. I intend to give the MCP some time, but if we fail to reach consensus, I'll re-nominate the MCP for compiler triage meeting to decide how to proceed.
That's completely fair. I'd like other compiler team members to vibe-check how this change is made. |
hmm. I mean, I can run Windows programs on Linux, but
|
Rollup of 6 pull requests Successful merges: - rust-lang#134999 (Add cygwin target.) - rust-lang#135677 (Small `rustc_resolve` cleanups) - rust-lang#136699 (std: replace the `FromInner` implementation for addresses with private conversion functions) - rust-lang#136758 (tests: `-Copt-level=3` instead of `-O` in assembly tests) - rust-lang#136761 (tests: `-Copt-level=3` instead of `-O` in codegen tests) - rust-lang#136833 (compiler: die immediately instead of handling unknown target codegen) Failed merges: - rust-lang#136808 (Try to recover from path sep error in type parsing) r? `@ghost` `@rustbot` modify labels: rollup
…=chenyukang,workingjubilee Add cygwin target. This PR simply adds cygwin target together with msys2 target, based on ``@ookiineko`` 's (the account has been deleted) [work](https://github.com/ookiineko-cygport/rust) on cygwin target. My full work is here: rust-lang/rust@master...Berrysoft:rust:dev/cygwin I have succeeded in building a new rustc for cygwin target, and eventually distributed a new version of [fish-shell](https://github.com/Berrysoft/fish-shell/releases) (rewritten by Rust) for MSYS2. I will open a new PR to fix std if this PR is accepted.
Rollup of 7 pull requests Successful merges: - rust-lang#134090 (Stabilize target_feature_11) - rust-lang#134999 (Add cygwin target.) - rust-lang#135025 (Cast allocas to default address space) - rust-lang#135408 (x86: make SSE2 required for i686 hardfloat targets and use it to pass SIMD types) - rust-lang#135549 (Document some safety constraints and use more safe wrappers) - rust-lang#136193 (Implement pattern type ffi checks) - rust-lang#136699 (std: replace the `FromInner` implementation for addresses with private conversion functions) Failed merges: - rust-lang#136758 (tests: `-Copt-level=3` instead of `-O` in assembly tests) r? `@ghost` `@rustbot` modify labels: rollup
…=chenyukang,workingjubilee Add cygwin target. This PR simply adds cygwin target together with msys2 target, based on ```@ookiineko``` 's (the account has been deleted) [work](https://github.com/ookiineko-cygport/rust) on cygwin target. My full work is here: rust-lang/rust@master...Berrysoft:rust:dev/cygwin I have succeeded in building a new rustc for cygwin target, and eventually distributed a new version of [fish-shell](https://github.com/Berrysoft/fish-shell/releases) (rewritten by Rust) for MSYS2. I will open a new PR to fix std if this PR is accepted.
Rollup of 9 pull requests Successful merges: - rust-lang#134999 (Add cygwin target.) - rust-lang#136324 (Implement `f{16,32,64,128}::{erf,erfc}` (`#![feature(float_erf)]`)) - rust-lang#136559 (Resolve named regions when reporting type test failures in NLL) - rust-lang#136660 (Use a trait to enforce field validity for union fields + `unsafe` fields + `unsafe<>` binder types) - rust-lang#136858 (Parallel-compiler-related cleanup) - rust-lang#136881 (cg_llvm: Reduce visibility of all functions in the llvm module) - rust-lang#136888 (Always perform discr read for never pattern in EUV) - rust-lang#136948 (Split out the `extern_system_varargs` feature) - rust-lang#136949 (Fix import in bench for wasm) r? `@ghost` `@rustbot` modify labels: rollup
Rollup of 8 pull requests Successful merges: - rust-lang#134999 (Add cygwin target.) - rust-lang#136559 (Resolve named regions when reporting type test failures in NLL) - rust-lang#136660 (Use a trait to enforce field validity for union fields + `unsafe` fields + `unsafe<>` binder types) - rust-lang#136858 (Parallel-compiler-related cleanup) - rust-lang#136881 (cg_llvm: Reduce visibility of all functions in the llvm module) - rust-lang#136888 (Always perform discr read for never pattern in EUV) - rust-lang#136948 (Split out the `extern_system_varargs` feature) - rust-lang#136949 (Fix import in bench for wasm) r? `@ghost` `@rustbot` modify labels: rollup
Rollup merge of rust-lang#134999 - Berrysoft:dev/new-cygwin-target, r=chenyukang,workingjubilee Add cygwin target. This PR simply adds cygwin target together with msys2 target, based on ````@ookiineko```` 's (the account has been deleted) [work](https://github.com/ookiineko-cygport/rust) on cygwin target. My full work is here: rust-lang/rust@master...Berrysoft:rust:dev/cygwin I have succeeded in building a new rustc for cygwin target, and eventually distributed a new version of [fish-shell](https://github.com/Berrysoft/fish-shell/releases) (rewritten by Rust) for MSYS2. I will open a new PR to fix std if this PR is accepted.
oh wow amazing... now let us wait till mrustc supports it |
@Kreijstal I'm not sure why you mean with this. you can bootstrap rustc with mrustc on a different supported platform like Linux and then cross compile that to cygwin and continue from there. |
yes but doing that requires crosscompiling |
sure, cross compilation is a thing that exists and that you should be able to use |
but mrustc would avoid crosscompilation, so that we can bootrstap rust from cygwin without it. |
sure, but I don't get why anyone would need to wait for that |
so that I can bootstrap rust from cygwin from gcc :) |
Not now. The std for cygwin is not merged: #137621 , and you also need to patch LLVM to build for cygwin. |
@Berrysoft
I can see that you made a fork of |
Oh, yes. Thank you for your reminder. It is necessary for cygwin support. |
Oh, so I wasn't wrong with my approach then ;) In that case, I think cc-rs is also necessary. Is it possible to share the setup that you compiled fish-shell for Cygwin? Even after patching the |
You also need to patch nix, and fish-shell itself. See here. |
Ah, I understand it now, thank you so much! |
This PR simply adds cygwin target together with msys2 target, based on @ookiineko 's (the account has been deleted) work on cygwin target. My full work is here: master...Berrysoft:rust:dev/cygwin
I have succeeded in building a new rustc for cygwin target, and eventually distributed a new version of fish-shell (rewritten by Rust) for MSYS2.
I will open a new PR to fix std if this PR is accepted.