diff options
| author | bors <bors@rust-lang.org> | 2025-05-18 23:53:04 +0000 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2025-05-18 23:53:04 +0000 |
| commit | e42bbfe1f7c26f8760a99c4b1f27d33aba1040bb (patch) | |
| tree | 3e9d6f4114ec672813957a308594b32a3bdd152a /src/bootstrap | |
| parent | 4d051fb306e661654d088892e02e69b8c0c39d43 (diff) | |
| parent | 12c8fb857c97f97a0351eecc94e97e71b04cda70 (diff) | |
| download | rust-e42bbfe1f7c26f8760a99c4b1f27d33aba1040bb.tar.gz rust-e42bbfe1f7c26f8760a99c4b1f27d33aba1040bb.zip | |
Auto merge of #140154 - Berrysoft:cygwin-host, r=jieyouxu
Cygwin support in rustc This PR builds host rustc targeting cygwin. - [x] https://github.com/rust-lang/stacker/pull/122 - [x] https://github.com/nagisa/rust_libloading/pull/173 - [x] https://github.com/Detegr/rust-ctrlc/pull/131 - [x] https://github.com/rust-random/getrandom/pull/654 - [x] https://github.com/msys2/MSYS2-packages/issues/5350 - [x] https://github.com/rust-lang/rust/pull/140886 - [x] https://github.com/rust-lang/rust/pull/140921 - [x] https://github.com/rust-lang/rust/pull/140973 Currently supported: * rustc * rustdoc * rustfmt * clippy Blocking: * cargo: blocked by https://github.com/rust-lang/socket2/pull/568 * rust-analyzer: needs `cargo update`, fixed upstream ``` $ rustc --version --verbose rustc 1.88.0-dev binary: rustc commit-hash: unknown commit-date: unknown host: x86_64-pc-cygwin release: 1.88.0-dev LLVM version: 20.1.4 ```
Diffstat (limited to 'src/bootstrap')
| -rw-r--r-- | src/bootstrap/src/core/builder/mod.rs | 2 | ||||
| -rw-r--r-- | src/bootstrap/src/utils/helpers.rs | 2 | ||||
| -rw-r--r-- | src/bootstrap/src/utils/shared_helpers.rs | 2 |
3 files changed, 3 insertions, 3 deletions
diff --git a/src/bootstrap/src/core/builder/mod.rs b/src/bootstrap/src/core/builder/mod.rs index cc4fa953ddc..af3e3cc37b9 100644 --- a/src/bootstrap/src/core/builder/mod.rs +++ b/src/bootstrap/src/core/builder/mod.rs @@ -1388,7 +1388,7 @@ impl<'a> Builder<'a> { // Windows doesn't need dylib path munging because the dlls for the // compiler live next to the compiler and the system will find them // automatically. - if cfg!(windows) { + if cfg!(any(windows, target_os = "cygwin")) { return; } diff --git a/src/bootstrap/src/utils/helpers.rs b/src/bootstrap/src/utils/helpers.rs index b29c1fb3889..f2c3e8c0df4 100644 --- a/src/bootstrap/src/utils/helpers.rs +++ b/src/bootstrap/src/utils/helpers.rs @@ -130,7 +130,7 @@ pub fn is_debug_info(name: &str) -> bool { /// Returns the corresponding relative library directory that the compiler's /// dylibs will be found in. pub fn libdir(target: TargetSelection) -> &'static str { - if target.is_windows() { "bin" } else { "lib" } + if target.is_windows() || target.contains("cygwin") { "bin" } else { "lib" } } /// Adds a list of lookup paths to `cmd`'s dynamic library lookup path. diff --git a/src/bootstrap/src/utils/shared_helpers.rs b/src/bootstrap/src/utils/shared_helpers.rs index 1297a53d488..08e1c21e58e 100644 --- a/src/bootstrap/src/utils/shared_helpers.rs +++ b/src/bootstrap/src/utils/shared_helpers.rs @@ -20,7 +20,7 @@ use std::str::FromStr; /// Returns the environment variable which the dynamic library lookup path /// resides in for this platform. pub fn dylib_path_var() -> &'static str { - if cfg!(target_os = "windows") { + if cfg!(any(target_os = "windows", target_os = "cygwin")) { "PATH" } else if cfg!(target_vendor = "apple") { "DYLD_LIBRARY_PATH" |
