diff options
| author | Omer Cheri <[email protected]> | 2025-02-12 11:21:48 +0200 |
|---|---|---|
| committer | Jack O'Connor <[email protected]> | 2025-02-13 09:31:14 -0800 |
| commit | 41b5c02b5718e38d9ac50523f0724a867678b46a (patch) | |
| tree | 8a512ff8d17f4753db2ba5fdba3a08196c8fd734 | |
| parent | a12fa7b8a4131d77c35eda5c680b9307a0fc28d3 (diff) | |
fix build.rs errors on win7 targets
| -rw-r--r-- | build.rs | 6 |
1 files changed, 4 insertions, 2 deletions
@@ -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" } |
