aboutsummaryrefslogtreecommitdiff
path: root/build.rs
diff options
context:
space:
mode:
authorOmer Cheri <[email protected]>2025-02-12 11:21:48 +0200
committerJack O'Connor <[email protected]>2025-02-13 09:31:14 -0800
commit41b5c02b5718e38d9ac50523f0724a867678b46a (patch)
tree8a512ff8d17f4753db2ba5fdba3a08196c8fd734 /build.rs
parenta12fa7b8a4131d77c35eda5c680b9307a0fc28d3 (diff)
fix build.rs errors on win7 targets
Diffstat (limited to 'build.rs')
-rw-r--r--build.rs6
1 files changed, 4 insertions, 2 deletions
diff --git a/build.rs b/build.rs
index 57f72b7..2557120 100644
--- a/build.rs
+++ b/build.rs
@@ -80,7 +80,8 @@ fn is_big_endian() -> bool {
// disabled by old compilers.)
fn is_windows_msvc() -> bool {
// Some targets are only two components long, so check in steps.
- target_components()[1] == "pc"
+ let second_component = &target_components()[1];
+ (second_component == "pc" || second_component == "win7")
&& target_components()[2] == "windows"
&& target_components()[3] == "msvc"
}
@@ -91,7 +92,8 @@ fn is_windows_msvc() -> bool {
// ends with `-gnullvm`.
fn is_windows_gnu() -> bool {
// Some targets are only two components long, so check in steps.
- target_components()[1] == "pc"
+ let second_component = &target_components()[1];
+ (second_component == "pc" || second_component == "win7")
&& target_components()[2] == "windows"
&& target_components()[3] != "msvc"
}