diff --git a/src/targets.rs b/src/targets.rs index f764b34..9506984 100644 --- a/src/targets.rs +++ b/src/targets.rs @@ -649,6 +649,7 @@ pub enum OperatingSystem { Netbsd, None_, Openbsd, + OpenHarmony, Psp, Redox, Solaris, @@ -697,6 +698,7 @@ impl OperatingSystem { Netbsd => Cow::Borrowed("netbsd"), None_ => Cow::Borrowed("none"), Openbsd => Cow::Borrowed("openbsd"), + OpenHarmony => Cow::Borrowed("ohos"), Psp => Cow::Borrowed("psp"), Redox => Cow::Borrowed("redox"), Solaris => Cow::Borrowed("solaris"), @@ -744,6 +746,7 @@ pub enum Environment { Msvc, Newlib, Kernel, + OpenHarmony, Uclibc, Uclibceabi, Uclibceabihf, @@ -784,6 +787,7 @@ impl Environment { Msvc => Cow::Borrowed("msvc"), Newlib => Cow::Borrowed("newlib"), Kernel => Cow::Borrowed("kernel"), + OpenHarmony => Cow::Borrowed("ohos"), Uclibc => Cow::Borrowed("uclibc"), Uclibceabi => Cow::Borrowed("uclibceabi"), Uclibceabihf => Cow::Borrowed("uclibceabihf"), @@ -1415,6 +1419,7 @@ impl FromStr for OperatingSystem { "netbsd" => Netbsd, "none" => None_, "openbsd" => Openbsd, + "ohos" => OpenHarmony, "psp" => Psp, "redox" => Redox, "solaris" => Solaris, @@ -1468,6 +1473,7 @@ impl FromStr for Environment { "musleabihf" => Musleabihf, "muslabi64" => Muslabi64, "msvc" => Msvc, + "ohos" => OpenHarmony, "newlib" => Newlib, "kernel" => Kernel, "uclibc" => Uclibc, @@ -1540,6 +1546,7 @@ mod tests { "aarch64-unknown-linux-gnu", "aarch64-unknown-linux-gnu_ilp32", "aarch64-unknown-linux-musl", + "aarch64-unknown-linux-ohos", "aarch64-unknown-netbsd", "aarch64-unknown-none", "aarch64-unknown-none-softfloat", @@ -1584,6 +1591,7 @@ mod tests { "armv7-unknown-linux-gnueabihf", "armv7-unknown-linux-musleabi", "armv7-unknown-linux-musleabihf", + "armv7-unknown-linux-ohos", "armv7-unknown-linux-uclibceabi", "armv7-unknown-linux-uclibceabihf", "armv7-unknown-netbsd-eabihf", @@ -1728,6 +1736,7 @@ mod tests { "x86_64-unknown-linux-gnu", "x86_64-unknown-linux-gnux32", "x86_64-unknown-linux-musl", + "x86_64-unknown-linux-ohos", "x86_64-unknown-netbsd", "x86_64-unknown-none", "x86_64-unknown-none-hermitkernel",