Add 'windows_legacy' feature to allow build for older windows versions

This commit is contained in:
Roy Ivy III 2019-12-07 19:01:41 -06:00
parent 55209c6490
commit 95809ae98e
2 changed files with 10 additions and 1 deletions

View file

@ -39,6 +39,15 @@ unix = [
"generic"
]
windows = ["generic"]
windows_legacy = [
"arch",
"nproc",
"sync",
"touch",
"whoami",
"redox_generic"
]
# Feature "fuchsia" contains the exclusive list of utilities
# that can be compiled and run on Fuchsia. Should be built
# with --no-default-features when selecting this feature.

View file

@ -16,7 +16,7 @@ pub fn main() {
if val == "1" && key.starts_with(feature_prefix) {
let krate = key[feature_prefix.len()..].to_lowercase();
match krate.as_ref() {
"default" | "unix" | "redox" | "redox_generic" | "fuchsia" | "generic" | "windows"
"default" | "unix" | "redox" | "redox_generic" | "fuchsia" | "generic" | "windows" | "windows_legacy"
| "nightly" | "test_unimplemented" => continue,
_ => {}
}