File tree Expand file tree Collapse file tree 5 files changed +37
-0
lines changed
compiler/rustc_target/src/spec Expand file tree Collapse file tree 5 files changed +37
-0
lines changed Original file line number Diff line number Diff line change @@ -1886,6 +1886,7 @@ supported_targets! {
18861886
18871887 ( "aarch64-unknown-linux-ohos" , aarch64_unknown_linux_ohos) ,
18881888 ( "armv7-unknown-linux-ohos" , armv7_unknown_linux_ohos) ,
1889+ ( "loongarch64-unknown-linux-ohos" , loongarch64_unknown_linux_ohos) ,
18891890 ( "x86_64-unknown-linux-ohos" , x86_64_unknown_linux_ohos) ,
18901891
18911892 ( "x86_64-unknown-linux-none" , x86_64_unknown_linux_none) ,
Original file line number Diff line number Diff line change 1+ use crate :: spec:: { Target , TargetOptions , base} ;
2+
3+ pub ( crate ) fn target ( ) -> Target {
4+ Target {
5+ // LLVM 15 doesn't support OpenHarmony yet, use a linux target instead.
6+ llvm_target : "loongarch64-unknown-linux-musl" . into ( ) ,
7+ metadata : crate :: spec:: TargetMetadata {
8+ description : Some ( "LoongArch64 OpenHarmony" . into ( ) ) ,
9+ tier : Some ( 3 ) ,
10+ host_tools : Some ( false ) ,
11+ std : Some ( true ) ,
12+ } ,
13+ pointer_width : 64 ,
14+ data_layout : "e-m:e-p:64:64-i64:64-i128:128-n32:64-S128" . into ( ) ,
15+ arch : "loongarch64" . into ( ) ,
16+ options : TargetOptions {
17+ cpu : "generic" . into ( ) ,
18+ features : "+f,+d" . into ( ) ,
19+ llvm_abiname : "lp64d" . into ( ) ,
20+ max_atomic_width : Some ( 64 ) ,
21+ ..base:: linux_ohos:: opts ( )
22+ } ,
23+ }
24+ }
Original file line number Diff line number Diff line change @@ -315,6 +315,7 @@ target | std | host | notes
315315` i686-uwp-windows-msvc ` | ✓ | | [ ^ x86_32-floats-return-ABI ]
316316[ ` i686-win7-windows-msvc ` ] ( platform-support/win7-windows-msvc.md ) | ✓ | | 32-bit Windows 7 support [ ^ x86_32-floats-return-ABI ]
317317[ ` i686-wrs-vxworks ` ] ( platform-support/vxworks.md ) | ✓ | | [ ^ x86_32-floats-return-ABI ]
318+ [ ` loongarch64-unknown-linux-ohos ` ] ( platform-support/openharmony.md ) | ✓ | LoongArch64 OpenHarmony
318319[ ` m68k-unknown-linux-gnu ` ] ( platform-support/m68k-unknown-linux-gnu.md ) | ? | | Motorola 680x0 Linux
319320` mips-unknown-linux-gnu ` | ✓ | ✓ | MIPS Linux (kernel 4.4, glibc 2.23)
320321` mips-unknown-linux-musl ` | ✓ | | MIPS Linux with musl 1.2.3
Original file line number Diff line number Diff line change 22
33** Tier: 2**
44
5+ * aarch64-unknown-linux-ohos
6+ * armv7-unknown-linux-ohos
7+ * x86_64-unknown-linux-ohos
8+
9+ ** Tier: 3**
10+
11+ * loongarch64-unknown-linux-ohos
12+
513Targets for the [ OpenHarmony] ( https://gitee.com/openharmony/docs/ ) operating
614system.
715
Original file line number Diff line number Diff line change 252252//@ revisions: loongarch64_unknown_linux_musl
253253//@ [loongarch64_unknown_linux_musl] compile-flags: --target loongarch64-unknown-linux-musl
254254//@ [loongarch64_unknown_linux_musl] needs-llvm-components: loongarch
255+ //@ revisions: loongarch64_unknown_linux_ohos
256+ //@ [loongarch64_unknown_linux_ohos] compile-flags: --target loongarch64-unknown-linux-ohos
257+ //@ [loongarch64_unknown_linux_ohos] needs-llvm-components: loongarch64
255258//@ revisions: loongarch64_unknown_none
256259//@ [loongarch64_unknown_none] compile-flags: --target loongarch64-unknown-none
257260//@ [loongarch64_unknown_none] needs-llvm-components: loongarch
You can’t perform that action at this time.
0 commit comments