mirror of
https://github.com/rust-lang/rust
synced 2024-09-05 08:37:14 +00:00
parent
6db96de66c
commit
5674f0662f
3
.github/workflows/ci.yml
vendored
3
.github/workflows/ci.yml
vendored
|
@ -235,6 +235,9 @@ jobs:
|
|||
- name: dist-loongarch64-linux
|
||||
os: ubuntu-20.04-8core-32gb
|
||||
env: {}
|
||||
- name: dist-ohos
|
||||
os: ubuntu-20.04-8core-32gb
|
||||
env: {}
|
||||
- name: dist-powerpc-linux
|
||||
os: ubuntu-20.04-8core-32gb
|
||||
env: {}
|
||||
|
|
57
src/ci/docker/host-x86_64/dist-ohos/Dockerfile
Normal file
57
src/ci/docker/host-x86_64/dist-ohos/Dockerfile
Normal file
|
@ -0,0 +1,57 @@
|
|||
FROM ubuntu:23.04
|
||||
|
||||
ARG DEBIAN_FRONTEND=noninteractive
|
||||
RUN apt-get update && apt-get install -y --no-install-recommends \
|
||||
g++ \
|
||||
make \
|
||||
ninja-build \
|
||||
file \
|
||||
curl \
|
||||
ca-certificates \
|
||||
python3 \
|
||||
git \
|
||||
cmake \
|
||||
sudo \
|
||||
gdb \
|
||||
libssl-dev \
|
||||
pkg-config \
|
||||
xz-utils \
|
||||
unzip \
|
||||
&& rm -rf /var/lib/apt/lists/*
|
||||
|
||||
COPY scripts/ohos-sdk.sh /scripts/
|
||||
RUN sh /scripts/ohos-sdk.sh
|
||||
|
||||
COPY scripts/ohos/aarch64-unknown-linux-ohos-clang.sh /usr/local/bin/
|
||||
COPY scripts/ohos/aarch64-unknown-linux-ohos-clang++.sh /usr/local/bin/
|
||||
COPY scripts/ohos/armv7-unknown-linux-ohos-clang.sh /usr/local/bin/
|
||||
COPY scripts/ohos/armv7-unknown-linux-ohos-clang++.sh /usr/local/bin/
|
||||
COPY scripts/ohos/x86_64-unknown-linux-ohos-clang.sh /usr/local/bin/
|
||||
COPY scripts/ohos/x86_64-unknown-linux-ohos-clang++.sh /usr/local/bin/
|
||||
|
||||
# env
|
||||
ENV TARGETS=aarch64-unknown-linux-ohos
|
||||
ENV TARGETS=$TARGETS,armv7-unknown-linux-ohos
|
||||
ENV TARGETS=$TARGETS,x86_64-unknown-linux-ohos
|
||||
|
||||
ENV \
|
||||
CC_aarch64_unknown_linux_ohos=/usr/local/bin/aarch64-unknown-linux-ohos-clang.sh \
|
||||
AR_aarch64_unknown_linux_ohos=/opt/ohos-sdk/native/llvm/bin/llvm-ar \
|
||||
CXX_aarch64_unknown_linux_ohos=/usr/local/bin/aarch64-unknown-linux-ohos-clang++.sh
|
||||
ENV \
|
||||
CC_armv7_unknown_linux_ohos=/usr/local/bin/armv7-unknown-linux-ohos-clang.sh \
|
||||
AR_armv7_unknown_linux_ohos=/opt/ohos-sdk/native/llvm/bin/llvm-ar \
|
||||
CXX_armv7_unknown_linux_ohos=/usr/local/bin/armv7-unknown-linux-ohos-clang++.sh
|
||||
ENV \
|
||||
CC_x86_64_unknown_linux_ohos=/usr/local/bin/x86_64-unknown-linux-ohos-clang.sh \
|
||||
AR_x86_64_unknown_linux_ohos=/opt/ohos-sdk/native/llvm/bin/llvm-ar \
|
||||
CXX_x86_64_unknown_linux_ohos=/usr/local/bin/x86_64-unknown-linux-ohos-clang++.sh
|
||||
|
||||
ENV RUST_CONFIGURE_ARGS \
|
||||
--enable-profiler \
|
||||
--disable-docs
|
||||
|
||||
ENV SCRIPT python3 ../x.py dist --host='' --target $TARGETS
|
||||
|
||||
COPY scripts/sccache.sh /scripts/
|
||||
RUN sh /scripts/sccache.sh
|
9
src/ci/docker/scripts/ohos-sdk.sh
Executable file
9
src/ci/docker/scripts/ohos-sdk.sh
Executable file
|
@ -0,0 +1,9 @@
|
|||
#!/bin/sh
|
||||
set -ex
|
||||
|
||||
URL=https://repo.huaweicloud.com/openharmony/os/4.0-Release/ohos-sdk-windows_linux-public.tar.gz
|
||||
|
||||
curl $URL | tar xz -C /tmp ohos-sdk/linux/native-linux-x64-4.0.10.13-Release.zip
|
||||
mkdir /opt/ohos-sdk
|
||||
cd /opt/ohos-sdk
|
||||
unzip -qq /tmp/ohos-sdk/linux/native-linux-x64-4.0.10.13-Release.zip
|
6
src/ci/docker/scripts/ohos/aarch64-unknown-linux-ohos-clang++.sh
Executable file
6
src/ci/docker/scripts/ohos/aarch64-unknown-linux-ohos-clang++.sh
Executable file
|
@ -0,0 +1,6 @@
|
|||
#!/bin/sh
|
||||
exec /opt/ohos-sdk/native/llvm/bin/clang++ \
|
||||
-target aarch64-linux-ohos \
|
||||
--sysroot=/opt/ohos-sdk/native/sysroot \
|
||||
-D__MUSL__ \
|
||||
"$@"
|
6
src/ci/docker/scripts/ohos/aarch64-unknown-linux-ohos-clang.sh
Executable file
6
src/ci/docker/scripts/ohos/aarch64-unknown-linux-ohos-clang.sh
Executable file
|
@ -0,0 +1,6 @@
|
|||
#!/bin/sh
|
||||
exec /opt/ohos-sdk/native/llvm/bin/clang \
|
||||
-target aarch64-linux-ohos \
|
||||
--sysroot=/opt/ohos-sdk/native/sysroot \
|
||||
-D__MUSL__ \
|
||||
"$@"
|
10
src/ci/docker/scripts/ohos/armv7-unknown-linux-ohos-clang++.sh
Executable file
10
src/ci/docker/scripts/ohos/armv7-unknown-linux-ohos-clang++.sh
Executable file
|
@ -0,0 +1,10 @@
|
|||
#!/bin/sh
|
||||
exec /opt/ohos-sdk/native/llvm/bin/clang++ \
|
||||
-target arm-linux-ohos \
|
||||
--sysroot=/opt/ohos-sdk/native/sysroot \
|
||||
-D__MUSL__ \
|
||||
-march=armv7-a \
|
||||
-mfloat-abi=softfp \
|
||||
-mtune=generic-armv7-a \
|
||||
-mthumb \
|
||||
"$@"
|
10
src/ci/docker/scripts/ohos/armv7-unknown-linux-ohos-clang.sh
Executable file
10
src/ci/docker/scripts/ohos/armv7-unknown-linux-ohos-clang.sh
Executable file
|
@ -0,0 +1,10 @@
|
|||
#!/bin/sh
|
||||
exec /opt/ohos-sdk/native/llvm/bin/clang \
|
||||
-target arm-linux-ohos \
|
||||
--sysroot=/opt/ohos-sdk/native/sysroot \
|
||||
-D__MUSL__ \
|
||||
-march=armv7-a \
|
||||
-mfloat-abi=softfp \
|
||||
-mtune=generic-armv7-a \
|
||||
-mthumb \
|
||||
"$@"
|
6
src/ci/docker/scripts/ohos/x86_64-unknown-linux-ohos-clang++.sh
Executable file
6
src/ci/docker/scripts/ohos/x86_64-unknown-linux-ohos-clang++.sh
Executable file
|
@ -0,0 +1,6 @@
|
|||
#!/bin/sh
|
||||
exec /opt/ohos-sdk/native/llvm/bin/clang++ \
|
||||
-target x86_64-linux-ohos \
|
||||
--sysroot=/opt/ohos-sdk/native/sysroot \
|
||||
-D__MUSL__ \
|
||||
"$@"
|
6
src/ci/docker/scripts/ohos/x86_64-unknown-linux-ohos-clang.sh
Executable file
6
src/ci/docker/scripts/ohos/x86_64-unknown-linux-ohos-clang.sh
Executable file
|
@ -0,0 +1,6 @@
|
|||
#!/bin/sh
|
||||
exec /opt/ohos-sdk/native/llvm/bin/clang \
|
||||
-target x86_64-linux-ohos \
|
||||
--sysroot=/opt/ohos-sdk/native/sysroot \
|
||||
-D__MUSL__ \
|
||||
"$@"
|
|
@ -413,6 +413,9 @@ jobs:
|
|||
- name: dist-loongarch64-linux
|
||||
<<: *job-linux-8c
|
||||
|
||||
- name: dist-ohos
|
||||
<<: *job-linux-8c
|
||||
|
||||
- name: dist-powerpc-linux
|
||||
<<: *job-linux-8c
|
||||
|
||||
|
|
|
@ -143,6 +143,7 @@ target | std | notes
|
|||
`aarch64-fuchsia` | ✓ | Alias for `aarch64-unknown-fuchsia`
|
||||
[`aarch64-unknown-fuchsia`](platform-support/fuchsia.md) | ✓ | ARM64 Fuchsia
|
||||
[`aarch64-linux-android`](platform-support/android.md) | ✓ | ARM64 Android
|
||||
[`aarch64-unknown-linux-ohos`](platform-support/openharmony.md) | ✓ | ARM64 OpenHarmony
|
||||
`aarch64-unknown-none-softfloat` | * | Bare ARM64, softfloat
|
||||
`aarch64-unknown-none` | * | Bare ARM64, hardfloat
|
||||
[`aarch64-unknown-uefi`](platform-support/unknown-uefi.md) | * | ARM64 UEFI
|
||||
|
@ -157,6 +158,7 @@ target | std | notes
|
|||
`armv7-unknown-linux-gnueabi` | ✓ | ARMv7-A Linux (kernel 4.15, glibc 2.27)
|
||||
`armv7-unknown-linux-musleabi` | ✓ | ARMv7-A Linux with MUSL
|
||||
`armv7-unknown-linux-musleabihf` | ✓ | ARMv7-A Linux with MUSL, hardfloat
|
||||
[`armv7-unknown-linux-ohos`](platform-support/openharmony.md) | ✓ | ARMv7-A OpenHarmony
|
||||
[`armv7a-none-eabi`](platform-support/arm-none-eabi.md) | * | Bare ARMv7-A
|
||||
[`armv7r-none-eabi`](platform-support/armv7r-none-eabi.md) | * | Bare ARMv7-R
|
||||
[`armv7r-none-eabihf`](platform-support/armv7r-none-eabi.md) | * | Bare ARMv7-R, hardfloat
|
||||
|
@ -199,6 +201,7 @@ target | std | notes
|
|||
[`x86_64-linux-android`](platform-support/android.md) | ✓ | 64-bit x86 Android
|
||||
`x86_64-pc-solaris` | ✓ | 64-bit Solaris 11, illumos
|
||||
`x86_64-unknown-linux-gnux32` | ✓ | 64-bit Linux (x32 ABI) (kernel 4.15, glibc 2.27)
|
||||
[`x86_64-unknown-linux-ohos`](platform-support/openharmony.md) | ✓ | x86_64 OpenHarmony
|
||||
[`x86_64-unknown-none`](platform-support/x86_64-unknown-none.md) | * | Freestanding/bare-metal x86_64, softfloat
|
||||
`x86_64-unknown-redox` | ✓ | Redox OS
|
||||
[`x86_64-unknown-uefi`](platform-support/unknown-uefi.md) | * | 64-bit UEFI
|
||||
|
@ -244,7 +247,6 @@ target | std | host | notes
|
|||
[`aarch64-kmc-solid_asp3`](platform-support/kmc-solid.md) | ✓ | | ARM64 SOLID with TOPPERS/ASP3
|
||||
[`aarch64-nintendo-switch-freestanding`](platform-support/aarch64-nintendo-switch-freestanding.md) | * | | ARM64 Nintendo Switch, Horizon
|
||||
[`aarch64-pc-windows-gnullvm`](platform-support/pc-windows-gnullvm.md) | ✓ | ✓ |
|
||||
[`aarch64-unknown-linux-ohos`](platform-support/openharmony.md) | ✓ | | ARM64 OpenHarmony |
|
||||
[`aarch64-unknown-teeos`](platform-support/aarch64-unknown-teeos.md) | ? | | ARM64 TEEOS |
|
||||
[`aarch64-unknown-nto-qnx710`](platform-support/nto-qnx.md) | ✓ | | ARM64 QNX Neutrino 7.1 RTOS |
|
||||
`aarch64-unknown-freebsd` | ✓ | ✓ | ARM64 FreeBSD
|
||||
|
@ -269,7 +271,6 @@ target | std | host | notes
|
|||
[`armv6-unknown-netbsd-eabihf`](platform-support/netbsd.md) | ✓ | ✓ | ARMv6 NetBSD w/hard-float
|
||||
[`armv6k-nintendo-3ds`](platform-support/armv6k-nintendo-3ds.md) | ? | | ARMv6K Nintendo 3DS, Horizon (Requires devkitARM toolchain)
|
||||
[`armv7-sony-vita-newlibeabihf`](platform-support/armv7-sony-vita-newlibeabihf.md) | ✓ | | ARMv7-A Cortex-A9 Sony PlayStation Vita (requires VITASDK toolchain)
|
||||
[`armv7-unknown-linux-ohos`](platform-support/openharmony.md) | ✓ | | ARMv7-A OpenHarmony |
|
||||
[`armv7-unknown-linux-uclibceabi`](platform-support/armv7-unknown-linux-uclibceabi.md) | ✓ | ✓ | ARMv7-A Linux with uClibc, softfloat
|
||||
[`armv7-unknown-linux-uclibceabihf`](platform-support/armv7-unknown-linux-uclibceabihf.md) | ✓ | ? | ARMv7-A Linux with uClibc, hardfloat
|
||||
`armv7-unknown-freebsd` | ✓ | ✓ | ARMv7-A FreeBSD
|
||||
|
@ -374,7 +375,6 @@ target | std | host | notes
|
|||
`x86_64-unknown-haiku` | ✓ | ✓ | 64-bit Haiku
|
||||
[`x86_64-unknown-hermit`](platform-support/hermit.md) | ✓ | | x86_64 Hermit
|
||||
`x86_64-unknown-l4re-uclibc` | ? | |
|
||||
[`x86_64-unknown-linux-ohos`](platform-support/openharmony.md) | ✓ | | x86_64 OpenHarmony |
|
||||
[`x86_64-unknown-openbsd`](platform-support/openbsd.md) | ✓ | ✓ | 64-bit OpenBSD
|
||||
`x86_64-uwp-windows-gnu` | ✓ | |
|
||||
`x86_64-uwp-windows-msvc` | ✓ | |
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
# `*-unknown-linux-ohos`
|
||||
|
||||
**Tier: 3**
|
||||
**Tier: 2**
|
||||
|
||||
Targets for the [OpenHarmony](https://gitee.com/openharmony/docs/) operating
|
||||
system.
|
||||
|
@ -8,6 +8,7 @@ system.
|
|||
## Target maintainers
|
||||
|
||||
- Amanieu d'Antras ([@Amanieu](https://github.com/Amanieu))
|
||||
- Lu Binglun ([@lubinglun](https://github.com/lubinglun))
|
||||
|
||||
## Setup
|
||||
|
||||
|
|
|
@ -60,6 +60,7 @@
|
|||
"aarch64-unknown-hermit",
|
||||
"aarch64-unknown-linux-gnu",
|
||||
"aarch64-unknown-linux-musl",
|
||||
"aarch64-unknown-linux-ohos",
|
||||
"aarch64-unknown-none",
|
||||
"aarch64-unknown-none-softfloat",
|
||||
"aarch64-unknown-redox",
|
||||
|
@ -79,6 +80,7 @@
|
|||
"thumbv7neon-unknown-linux-gnueabihf",
|
||||
"armv7-unknown-linux-musleabi",
|
||||
"armv7-unknown-linux-musleabihf",
|
||||
"armv7-unknown-linux-ohos",
|
||||
"armebv7r-none-eabi",
|
||||
"armebv7r-none-eabihf",
|
||||
"armv7r-none-eabi",
|
||||
|
@ -161,6 +163,7 @@
|
|||
"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-redox",
|
||||
|
|
Loading…
Reference in a new issue