From: Jonathan Schwender <jonathan.schwen...@huawei.com> Add support for [OpenHarmony] targets. The `ohos` targets are available [in `LLVM`] and documented in the [Rust target documentation].
Known targets in Rust: - aarch64-unknown-linux-ohos - armv7-unknown-linux-ohos - x86_64-unknown-linux-ohos Known targets in Clang: - arm-linux-ohos - aarch64-linux-ohos - x86_64-linux-ohos There are also some additional targets available in clang, e.g. `liteos-ohos`, but I don't know much about those targets, so I'm leaving `liteos-ohos` out of scope for this patch. [OpenHarmony]: https://gitee.com/openharmony/docs/ [in `LLVM`]: https://github.com/llvm/llvm-project/blob/main/clang/lib/Driver/ToolChains/OHOS.cpp [Rust target documentation]: https://doc.rust-lang.org/rustc/platform-support/openharmony.html Signed-off-by: Jonathan Schwender <jonathan.schwen...@huawei.com> --- config.sub | 4 ++-- testsuite/config-sub.data | 1 + 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/config.sub b/config.sub index 2c6a07a..4ab8c1d 100755 --- a/config.sub +++ b/config.sub @@ -1768,7 +1768,7 @@ case $os in | onefs* | tirtos* | phoenix* | fuchsia* | redox* | bme* \ | midnightbsd* | amdhsa* | unleashed* | emscripten* | wasi* \ | nsk* | powerunix* | genode* | zvmoe* | qnx* | emx* | zephyr* \ - | fiwix* | mlibc* | cos* | mbr* | ironclad* ) + | fiwix* | mlibc* | cos* | mbr* | ironclad* | ohos* ) ;; # This one is extra strict with allowed versions sco3.2v2 | sco3.2v[4-9]* | sco5v6*) @@ -1829,7 +1829,7 @@ esac case $kernel-$os-$obj in linux-gnu*- | linux-android*- | linux-dietlibc*- | linux-llvm*- \ | linux-mlibc*- | linux-musl*- | linux-newlib*- \ - | linux-relibc*- | linux-uclibc*- ) + | linux-relibc*- | linux-uclibc*- | linux-ohos*- ) ;; uclinux-uclibc*- ) ;; diff --git a/testsuite/config-sub.data b/testsuite/config-sub.data index a46bdfe..46201e8 100644 --- a/testsuite/config-sub.data +++ b/testsuite/config-sub.data @@ -17,6 +17,7 @@ aarch64-elf aarch64-unknown-elf aarch64-genode aarch64-unknown-genode aarch64-linux aarch64-unknown-linux-gnu aarch64-linux-mlibc aarch64-unknown-linux-mlibc +aarch64-linux-ohos aarch64-unknown-linux-ohos aarch64-managarm aarch64-unknown-managarm-mlibc aarch64-managarm-kernel aarch64-unknown-managarm-kernel aarch64-managarm-mlibc aarch64-unknown-managarm-mlibc -- 2.43.2