Skip to content

Commit c15c970

Browse files
committed
run-make-support: add is_windows_gnu helper
1 parent 17e0fc6 commit c15c970

File tree

2 files changed

+10
-1
lines changed

2 files changed

+10
-1
lines changed

src/tools/run-make-support/src/lib.rs

+4-1
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,10 @@ pub use env::{env_var, env_var_os, set_current_dir};
8181
pub use run::{cmd, run, run_fail, run_with_args};
8282

8383
/// Helpers for checking target information.
84-
pub use targets::{is_aix, is_darwin, is_msvc, is_windows, llvm_components_contain, target, uname, apple_os};
84+
pub use targets::{
85+
apple_os, is_aix, is_darwin, is_msvc, is_windows, is_windows_gnu, llvm_components_contain,
86+
target, uname,
87+
};
8588

8689
/// Helpers for building names of output artifacts that are potentially target-specific.
8790
pub use artifact_names::{

src/tools/run-make-support/src/targets.rs

+6
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,12 @@ pub fn is_msvc() -> bool {
2222
target().contains("msvc")
2323
}
2424

25+
/// Check if target is windows-gnu.
26+
#[must_use]
27+
pub fn is_windows_gnu() -> bool {
28+
target().ends_with("windows-gnu")
29+
}
30+
2531
/// Check if target uses macOS.
2632
#[must_use]
2733
pub fn is_darwin() -> bool {

0 commit comments

Comments
 (0)