We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
TargetSelection::is_cygwin
1 parent ae3703c commit c4d7f1dCopy full SHA for c4d7f1d
src/bootstrap/src/core/config/config.rs
@@ -565,6 +565,12 @@ impl TargetSelection {
565
self.ends_with("windows-gnu")
566
}
567
568
+ pub fn is_cygwin(&self) -> bool {
569
+ self.is_windows() &&
570
+ // ref. https://cygwin.com/pipermail/cygwin/2022-February/250802.html
571
+ env::var("OSTYPE").is_ok_and(|v| v.to_lowercase().contains("cygwin"))
572
+ }
573
+
574
/// Path to the file defining the custom target, if any.
575
pub fn filepath(&self) -> Option<&Path> {
576
self.file.as_ref().map(Path::new)
0 commit comments