aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-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"
}