summaryrefslogtreecommitdiff
path: root/libc-test/build.rs
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2023-03-04 23:48:45 +0000
committerbors <bors@rust-lang.org>2023-03-04 23:48:45 +0000
commitda4f8f82e367c556f889992c66ec89e84c1cbf52 (patch)
tree06165a9b962e4144b3bee91dd040562ba6f694da /libc-test/build.rs
parent973c3e1fb8acd198f197fa2a25d99184fa1f5f4b (diff)
parent3f5128e77a04257a661335e9582a7f1b1e56d118 (diff)
downloadrust-libc-da4f8f82e367c556f889992c66ec89e84c1cbf52.tar.gz
Auto merge of #3138 - Amanieu:ohos, r=JohnTitor
Add support for OpenHarmony This PR adds support for [OpenHarmony](https://gitee.com/openharmony/docs/) targets: - `aarch64-linux-ohos` - `arm-linux-ohos` Compiler team MCP: https://github.com/rust-lang/compiler-team/issues/568 OpenHarmony uses a fork of musl with minor modifications, so most of the code is shared with other musl targets. Additionally, although OpenHarmony uses musl 1.2, it is still ABI-compatible with musl 1.1 so the existing bindings should continue to work until https://github.com/rust-lang/libc/pull/3068 is merged. A PR to add the targets to rustc will follow after this is merged.
Diffstat (limited to 'libc-test/build.rs')
-rw-r--r--libc-test/build.rs4
1 files changed, 2 insertions, 2 deletions
diff --git a/libc-test/build.rs b/libc-test/build.rs
index 4e67c6eb5d..80b73e911b 100644
--- a/libc-test/build.rs
+++ b/libc-test/build.rs
@@ -3081,7 +3081,7 @@ fn test_linux(target: &str) {
// target_env
let gnu = target.contains("gnu");
- let musl = target.contains("musl");
+ let musl = target.contains("musl") || target.contains("ohos");
let uclibc = target.contains("uclibc");
match (gnu, musl, uclibc) {
@@ -3946,7 +3946,7 @@ fn test_linux(target: &str) {
// are included (e.g. because including both sets of headers clashes)
fn test_linux_like_apis(target: &str) {
let gnu = target.contains("gnu");
- let musl = target.contains("musl");
+ let musl = target.contains("musl") || target.contains("ohos");
let linux = target.contains("linux");
let emscripten = target.contains("emscripten");
let android = target.contains("android");