From e19e801c9093770a179f234045669181444a5875 Mon Sep 17 00:00:00 2001 From: WANG Rui Date: Thu, 19 Oct 2023 21:12:19 +0800 Subject: [PATCH 1/7] compiler: Add target features for LoongArch (cherry picked from commit cb618162b138be0e0472d0f5540e6fc0d5a11210) Signed-off-by: WANG Rui --- compiler/rustc_codegen_ssa/src/target_features.rs | 15 +++++++++++++++ compiler/rustc_feature/src/active.rs | 1 + compiler/rustc_span/src/symbol.rs | 1 + 3 files changed, 17 insertions(+) diff --git a/compiler/rustc_codegen_ssa/src/target_features.rs b/compiler/rustc_codegen_ssa/src/target_features.rs index 9e06fec550d..979ff7880af 100644 --- a/compiler/rustc_codegen_ssa/src/target_features.rs +++ b/compiler/rustc_codegen_ssa/src/target_features.rs @@ -297,6 +297,18 @@ const BPF_ALLOWED_FEATURES: &[(&str, Option)] = &[("alu32", Some(sym::bpf_target_feature))]; +const LOONGARCH_ALLOWED_FEATURES: &[(&str, Option)] = &[ + // tidy-alphabetical-start + ("d", Some(sym::loongarch_target_feature)), + ("f", Some(sym::loongarch_target_feature)), + ("lasx", Some(sym::loongarch_target_feature)), + ("lbt", Some(sym::loongarch_target_feature)), + ("lsx", Some(sym::loongarch_target_feature)), + ("lvz", Some(sym::loongarch_target_feature)), + ("ual", Some(sym::loongarch_target_feature)), + // tidy-alphabetical-end +]; + /// When rustdoc is running, provide a list of all known features so that all their respective /// primitives may be documented. /// @@ -312,6 +324,7 @@ pub fn all_known_features() -> impl Iterator &'static [(&'static str, Opt "riscv32" | "riscv64" => RISCV_ALLOWED_FEATURES, "wasm32" | "wasm64" => WASM_ALLOWED_FEATURES, "bpf" => BPF_ALLOWED_FEATURES, + "loongarch64" => LOONGARCH_ALLOWED_FEATURES, _ => &[], } } @@ -401,6 +415,7 @@ pub fn from_target_feature( Some(sym::ermsb_target_feature) => rust_features.ermsb_target_feature, Some(sym::bpf_target_feature) => rust_features.bpf_target_feature, Some(sym::aarch64_ver_target_feature) => rust_features.aarch64_ver_target_feature, + Some(sym::loongarch_target_feature) => rust_features.loongarch_target_feature, Some(name) => bug!("unknown target feature gate {}", name), None => true, }; diff --git a/compiler/rustc_feature/src/active.rs b/compiler/rustc_feature/src/active.rs index 56a2c5eff3d..5d6b81d4429 100644 --- a/compiler/rustc_feature/src/active.rs +++ b/compiler/rustc_feature/src/active.rs @@ -260,6 +260,7 @@ pub fn set(&self, features: &mut Features, span: Span) { (active, bpf_target_feature, "1.54.0", Some(44839), None), (active, ermsb_target_feature, "1.49.0", Some(44839), None), (active, hexagon_target_feature, "1.27.0", Some(44839), None), + (active, loongarch_target_feature, "1.72.0", Some(44839), None), (active, mips_target_feature, "1.27.0", Some(44839), None), (active, powerpc_target_feature, "1.27.0", Some(44839), None), (active, riscv_target_feature, "1.45.0", Some(44839), None), diff --git a/compiler/rustc_span/src/symbol.rs b/compiler/rustc_span/src/symbol.rs index 5c6d43e50ea..2eba8603b36 100644 --- a/compiler/rustc_span/src/symbol.rs +++ b/compiler/rustc_span/src/symbol.rs @@ -906,6 +906,7 @@ log_syntax, logf32, logf64, + loongarch_target_feature, loop_break_value, lt, macro_at_most_once_rep, -- Gitee From 89bed1ec2927366e266f33f4e8413c8c4af58c4c Mon Sep 17 00:00:00 2001 From: WANG Rui Date: Mon, 5 Jun 2023 19:51:24 +0800 Subject: [PATCH 2/7] Add new Tier-3 target: `loongarch64-unknown-linux-musl` MCP: https://github.com/rust-lang/compiler-team/issues/518 (cherry picked from commit d756375234fadad5471660fd24ae2d1758611a27) Signed-off-by: WANG Rui --- .../src/spec/loongarch64_unknown_linux_musl.rs | 18 ++++++++++++++++++ compiler/rustc_target/src/spec/mod.rs | 1 + src/doc/rustc/src/platform-support.md | 1 + 3 files changed, 20 insertions(+) create mode 100644 compiler/rustc_target/src/spec/loongarch64_unknown_linux_musl.rs diff --git a/compiler/rustc_target/src/spec/loongarch64_unknown_linux_musl.rs b/compiler/rustc_target/src/spec/loongarch64_unknown_linux_musl.rs new file mode 100644 index 00000000000..12817b22941 --- /dev/null +++ b/compiler/rustc_target/src/spec/loongarch64_unknown_linux_musl.rs @@ -0,0 +1,18 @@ +use crate::spec::{Target, TargetOptions}; + +pub fn target() -> Target { + Target { + llvm_target: "loongarch64-unknown-linux-musl".into(), + pointer_width: 64, + data_layout: "e-m:e-p:64:64-i64:64-i128:128-n64-S128".into(), + arch: "loongarch64".into(), + options: TargetOptions { + cpu: "generic".into(), + features: "+f,+d".into(), + llvm_abiname: "lp64d".into(), + max_atomic_width: Some(64), + crt_static_default: false, + ..super::linux_musl_base::opts() + }, + } +} diff --git a/compiler/rustc_target/src/spec/mod.rs b/compiler/rustc_target/src/spec/mod.rs index 689150b89f4..15d46f5a14e 100644 --- a/compiler/rustc_target/src/spec/mod.rs +++ b/compiler/rustc_target/src/spec/mod.rs @@ -1242,6 +1242,7 @@ fn $module() { ("i686-unknown-linux-gnu", i686_unknown_linux_gnu), ("i586-unknown-linux-gnu", i586_unknown_linux_gnu), ("loongarch64-unknown-linux-gnu", loongarch64_unknown_linux_gnu), + ("loongarch64-unknown-linux-musl", loongarch64_unknown_linux_musl), ("m68k-unknown-linux-gnu", m68k_unknown_linux_gnu), ("mips-unknown-linux-gnu", mips_unknown_linux_gnu), ("mips64-unknown-linux-gnuabi64", mips64_unknown_linux_gnuabi64), diff --git a/src/doc/rustc/src/platform-support.md b/src/doc/rustc/src/platform-support.md index 682186a159e..ed1602713d6 100644 --- a/src/doc/rustc/src/platform-support.md +++ b/src/doc/rustc/src/platform-support.md @@ -155,6 +155,7 @@ target | std | notes `i686-unknown-freebsd` | ✓ | 32-bit FreeBSD `i686-unknown-linux-musl` | ✓ | 32-bit Linux with MUSL [`i686-unknown-uefi`](platform-support/unknown-uefi.md) | * | 32-bit UEFI +[`loongarch64-unknown-linux-musl`](platform-support/loongarch-linux.md) | ? | | LoongArch64 Linux (LP64D ABI) `mips-unknown-linux-musl` | ✓ | MIPS Linux with MUSL `mips64-unknown-linux-muslabi64` | ✓ | MIPS64 Linux, n64 ABI, MUSL `mips64el-unknown-linux-muslabi64` | ✓ | MIPS64 (LE) Linux, n64 ABI, MUSL -- Gitee From e03df2b8508caad5c12b4dd7b338faef0790454e Mon Sep 17 00:00:00 2001 From: WANG Rui Date: Sun, 10 Mar 2024 14:00:58 +0800 Subject: [PATCH 3/7] doc/rustc: Move loongarch64-unknown-linux-musl to Tier 3 Fixes #122266 (cherry picked from commit 1bad698b27e729ee9ecb7319629645b6b19a1b79) Signed-off-by: WANG Rui --- src/doc/rustc/src/platform-support.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/doc/rustc/src/platform-support.md b/src/doc/rustc/src/platform-support.md index ed1602713d6..c8714dc17ce 100644 --- a/src/doc/rustc/src/platform-support.md +++ b/src/doc/rustc/src/platform-support.md @@ -155,7 +155,6 @@ target | std | notes `i686-unknown-freebsd` | ✓ | 32-bit FreeBSD `i686-unknown-linux-musl` | ✓ | 32-bit Linux with MUSL [`i686-unknown-uefi`](platform-support/unknown-uefi.md) | * | 32-bit UEFI -[`loongarch64-unknown-linux-musl`](platform-support/loongarch-linux.md) | ? | | LoongArch64 Linux (LP64D ABI) `mips-unknown-linux-musl` | ✓ | MIPS Linux with MUSL `mips64-unknown-linux-muslabi64` | ✓ | MIPS64 Linux, n64 ABI, MUSL `mips64el-unknown-linux-muslabi64` | ✓ | MIPS64 (LE) Linux, n64 ABI, MUSL @@ -269,6 +268,7 @@ target | std | host | notes `i686-uwp-windows-gnu` | ? | | `i686-uwp-windows-msvc` | ? | | `i686-wrs-vxworks` | ? | | +[`loongarch64-unknown-linux-musl`](platform-support/loongarch-linux.md) | ? | | LoongArch64 Linux (LP64D ABI) [`loongarch64-unknown-none`](platform-support/loongarch-none.md) | * | LoongArch64 Bare-metal (LP64D ABI) [`loongarch64-unknown-none-softfloat`](platform-support/loongarch-none.md) | * | LoongArch64 Bare-metal (LP64S ABI) [`m68k-unknown-linux-gnu`](platform-support/m68k-unknown-linux-gnu.md) | ? | | Motorola 680x0 Linux -- Gitee From 89bf44399e973e568839071d1ad2fda8bc653a18 Mon Sep 17 00:00:00 2001 From: WANG Rui Date: Mon, 11 Mar 2024 11:28:34 +0800 Subject: [PATCH 4/7] configure.py: add flag for loongarch64 musl-root (cherry picked from commit 2f84c7610f41fd6f1b448b947e9643ca7b513649) Signed-off-by: WANG Rui --- src/bootstrap/configure.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/bootstrap/configure.py b/src/bootstrap/configure.py index e8eebdfb5a5..b5628e378f1 100755 --- a/src/bootstrap/configure.py +++ b/src/bootstrap/configure.py @@ -142,6 +142,8 @@ v("musl-root-riscv32gc", "target.riscv32gc-unknown-linux-musl.musl-root", "riscv32gc-unknown-linux-musl install directory") v("musl-root-riscv64gc", "target.riscv64gc-unknown-linux-musl.musl-root", "riscv64gc-unknown-linux-musl install directory") +v("musl-root-loongarch64", "target.loongarch64-unknown-linux-musl.musl-root", + "loongarch64-unknown-linux-musl install directory") v("qemu-armhf-rootfs", "target.arm-unknown-linux-gnueabihf.qemu-rootfs", "rootfs in qemu testing, you probably don't want to use this") v("qemu-aarch64-rootfs", "target.aarch64-unknown-linux-gnu.qemu-rootfs", -- Gitee From 4897d83adb44d6ba710e9fae60ecb4e9636d9501 Mon Sep 17 00:00:00 2001 From: WANG Rui Date: Mon, 13 Nov 2023 19:45:27 +0800 Subject: [PATCH 5/7] Promote loongarch64-unknown-linux-musl to Tier 2 with host tools MCP: https://github.com/rust-lang/compiler-team/issues/753 (cherry picked from commit 16fef408968f341a78dae37b20e33ceee267ada5) Signed-off-by: WANG Rui --- src/bootstrap/llvm.rs | 1 + src/doc/rustc/src/platform-support.md | 2 +- src/tools/build-manifest/src/main.rs | 2 ++ 3 files changed, 4 insertions(+), 1 deletion(-) diff --git a/src/bootstrap/llvm.rs b/src/bootstrap/llvm.rs index 2dea078ba2e..a5de77e46e0 100644 --- a/src/bootstrap/llvm.rs +++ b/src/bootstrap/llvm.rs @@ -186,6 +186,7 @@ pub(crate) fn is_ci_llvm_available(config: &Config, asserts: bool) -> bool { ("arm-unknown-linux-gnueabihf", false), ("armv7-unknown-linux-gnueabihf", false), ("loongarch64-unknown-linux-gnu", false), + ("loongarch64-unknown-linux-musl", false), ("mips-unknown-linux-gnu", false), ("mips64-unknown-linux-gnuabi64", false), ("mips64el-unknown-linux-gnuabi64", false), diff --git a/src/doc/rustc/src/platform-support.md b/src/doc/rustc/src/platform-support.md index c8714dc17ce..9a053e5cd98 100644 --- a/src/doc/rustc/src/platform-support.md +++ b/src/doc/rustc/src/platform-support.md @@ -89,6 +89,7 @@ target | notes `arm-unknown-linux-gnueabihf` | ARMv6 Linux, hardfloat (kernel 3.2, glibc 2.17) `armv7-unknown-linux-gnueabihf` | ARMv7-A Linux, hardfloat (kernel 3.2, glibc 2.17) [`loongarch64-unknown-linux-gnu`](platform-support/loongarch-linux.md) | LoongArch64 Linux, LP64D ABI (kernel 5.19, glibc 2.36) +[`loongarch64-unknown-linux-musl`](platform-support/loongarch-linux.md) | LoongArch64 Linux, LP64D ABI (kernel 5.19, musl 1.2.5) `mips-unknown-linux-gnu` | MIPS Linux (kernel 4.4, glibc 2.23) `mips64-unknown-linux-gnuabi64` | MIPS64 Linux, n64 ABI (kernel 4.4, glibc 2.23) `mips64el-unknown-linux-gnuabi64` | MIPS64 (LE) Linux, n64 ABI (kernel 4.4, glibc 2.23) @@ -268,7 +269,6 @@ target | std | host | notes `i686-uwp-windows-gnu` | ? | | `i686-uwp-windows-msvc` | ? | | `i686-wrs-vxworks` | ? | | -[`loongarch64-unknown-linux-musl`](platform-support/loongarch-linux.md) | ? | | LoongArch64 Linux (LP64D ABI) [`loongarch64-unknown-none`](platform-support/loongarch-none.md) | * | LoongArch64 Bare-metal (LP64D ABI) [`loongarch64-unknown-none-softfloat`](platform-support/loongarch-none.md) | * | LoongArch64 Bare-metal (LP64S ABI) [`m68k-unknown-linux-gnu`](platform-support/m68k-unknown-linux-gnu.md) | ? | | Motorola 680x0 Linux diff --git a/src/tools/build-manifest/src/main.rs b/src/tools/build-manifest/src/main.rs index 8b28c68e04f..bcd0fd678cd 100644 --- a/src/tools/build-manifest/src/main.rs +++ b/src/tools/build-manifest/src/main.rs @@ -25,6 +25,7 @@ "i686-pc-windows-msvc", "i686-unknown-linux-gnu", "loongarch64-unknown-linux-gnu", + "loongarch64-unknown-linux-musl", "mips-unknown-linux-gnu", "mips64-unknown-linux-gnuabi64", "mips64el-unknown-linux-gnuabi64", @@ -99,6 +100,7 @@ "i686-unknown-linux-musl", "i686-unknown-uefi", "loongarch64-unknown-linux-gnu", + "loongarch64-unknown-linux-musl", "m68k-unknown-linux-gnu", "mips-unknown-linux-gnu", "mips-unknown-linux-musl", -- Gitee From c8096df28167b14e4b46ddbe234d0dd49a51d77b Mon Sep 17 00:00:00 2001 From: Wu Xiaotian Date: Mon, 3 Jun 2024 15:10:50 +0800 Subject: [PATCH 6/7] Add new target: `loongarch64-unknown-linux-ohos` Signed-off-by: Wu Xiaotian --- .../spec/loongarch64_unknown_linux_ohos.rs | 31 +++++++++++++++++++ compiler/rustc_target/src/spec/mod.rs | 1 + src/tools/build-manifest/src/main.rs | 1 + 3 files changed, 33 insertions(+) create mode 100644 compiler/rustc_target/src/spec/loongarch64_unknown_linux_ohos.rs diff --git a/compiler/rustc_target/src/spec/loongarch64_unknown_linux_ohos.rs b/compiler/rustc_target/src/spec/loongarch64_unknown_linux_ohos.rs new file mode 100644 index 00000000000..a238f69be8a --- /dev/null +++ b/compiler/rustc_target/src/spec/loongarch64_unknown_linux_ohos.rs @@ -0,0 +1,31 @@ +use crate::spec::{Target, TargetOptions}; + +use super::SanitizerSet; + +pub fn target() -> Target { + // LLVM 15 doesn't support OpenHarmony yet, use a linux target instead. + let mut base = super::linux_musl_base::opts(); + base.env = "ohos".into(); + base.crt_static_default = false; + base.max_atomic_width = Some(64); + + Target { + llvm_target: "loongarch64-unknown-linux-musl".into(), + pointer_width: 64, + data_layout: "e-m:e-p:64:64-i64:64-i128:128-n64-S128".into(), + arch: "loongarch64".into(), + options: TargetOptions { + cpu: "generic".into(), + features: "+f,+d".into(), + llvm_abiname: "lp64d".into(), + force_emulated_tls: true, + has_thread_local: false, + supported_sanitizers: SanitizerSet::ADDRESS + | SanitizerSet::CFI + | SanitizerSet::LEAK + | SanitizerSet::MEMORY + | SanitizerSet::THREAD, + ..base + }, + } +} diff --git a/compiler/rustc_target/src/spec/mod.rs b/compiler/rustc_target/src/spec/mod.rs index 15d46f5a14e..c9f9c692480 100644 --- a/compiler/rustc_target/src/spec/mod.rs +++ b/compiler/rustc_target/src/spec/mod.rs @@ -1436,6 +1436,7 @@ fn $module() { ("loongarch64-unknown-none", loongarch64_unknown_none), ("loongarch64-unknown-none-softfloat", loongarch64_unknown_none_softfloat), + ("loongarch64-unknown-linux-ohos", loongarch64_unknown_linux_ohos), ("aarch64-unknown-none", aarch64_unknown_none), ("aarch64-unknown-none-softfloat", aarch64_unknown_none_softfloat), diff --git a/src/tools/build-manifest/src/main.rs b/src/tools/build-manifest/src/main.rs index bcd0fd678cd..443ed23411f 100644 --- a/src/tools/build-manifest/src/main.rs +++ b/src/tools/build-manifest/src/main.rs @@ -101,6 +101,7 @@ "i686-unknown-uefi", "loongarch64-unknown-linux-gnu", "loongarch64-unknown-linux-musl", + "loongarch64-unknown-linux-ohos", "m68k-unknown-linux-gnu", "mips-unknown-linux-gnu", "mips-unknown-linux-musl", -- Gitee From f8b20e1e999bd98b7e8cf90a2843f8e21bbd588a Mon Sep 17 00:00:00 2001 From: WANG Rui Date: Mon, 17 Feb 2025 16:39:13 +0800 Subject: [PATCH 7/7] Add rust build config for loongarch64 Signed-off-by: WANG Rui --- rust-build/README.md | 1 + rust-build/config.toml | 10 ++++++++-- rust-build/function.sh | 2 ++ rust-build/ohos_ci_build.sh | 1 + rust-build/tools/loongarch64-unknown-linux-ohos-clang | 3 +++ .../tools/loongarch64-unknown-linux-ohos-clang++ | 3 +++ 6 files changed, 18 insertions(+), 2 deletions(-) create mode 100644 rust-build/tools/loongarch64-unknown-linux-ohos-clang create mode 100644 rust-build/tools/loongarch64-unknown-linux-ohos-clang++ diff --git a/rust-build/README.md b/rust-build/README.md index 1029977f474..8370c2f358f 100644 --- a/rust-build/README.md +++ b/rust-build/README.md @@ -69,6 +69,7 @@ rust-std-nightly-x86_64-pc-windows-gnullvm.tar.gz rust-std-nightly-aarch64-unknown-linux-ohos.tar.gz rust-std-nightly-armv7-unknown-linux-ohos.tar.gz rust-std-nightly-x86_64-unknown-linux-ohos.tar.gz +rust-std-nightly-loongarch64-unknown-linux-ohos.tar.gz ``` - Mac arm64 system diff --git a/rust-build/config.toml b/rust-build/config.toml index d0f386596d4..bd2e4c21592 100644 --- a/rust-build/config.toml +++ b/rust-build/config.toml @@ -8,7 +8,7 @@ cflags = "-fstack-protector-all" cxxflags = "-fstack-protector-all" [build] -target = ["x86_64-unknown-linux-gnu", "x86_64-pc-windows-gnullvm", "armv7-unknown-linux-ohos", "x86_64-unknown-linux-ohos", "aarch64-unknown-linux-ohos"] +target = ["x86_64-unknown-linux-gnu", "x86_64-pc-windows-gnullvm", "armv7-unknown-linux-ohos", "x86_64-unknown-linux-ohos", "aarch64-unknown-linux-ohos", "loongarch64-unknown-linux-ohos"] submodules = false compiler-docs = false extended = true @@ -66,5 +66,11 @@ cxx = "x86_64-w64-mingw32-clang++" linker = "x86_64-w64-mingw32-clang" ar = "x86_64-w64-mingw32-ar" +[target.loongarch64-unknown-linux-ohos] +cc = "loongarch64-unknown-linux-ohos-clang" +cxx = "loongarch64-unknown-linux-ohos-clang++" +linker = "loongarch64-unknown-linux-ohos-clang" +ar = "llvm-ar" + [dist] -compression-formats = ["gz"] \ No newline at end of file +compression-formats = ["gz"] diff --git a/rust-build/function.sh b/rust-build/function.sh index 321395607a2..a3ce50ca321 100644 --- a/rust-build/function.sh +++ b/rust-build/function.sh @@ -67,10 +67,12 @@ update_config_clang() { update_config_clang_path ${1} aarch64-unknown-linux-ohos-clang llvm-ar update_config_clang_path ${1} armv7-unknown-linux-ohos-clang llvm-ar update_config_clang_path ${1} x86_64-unknown-linux-ohos-clang llvm-ar + update_config_clang_path ${1} loongarch64-unknown-linux-ohos-clang llvm-ar update_config_clang_path ${2} x86_64-w64-mingw32-clang x86_64-w64-mingw32-ar update_musl_head_file_path ${3} aarch64-unknown-linux-ohos-clang update_musl_head_file_path ${3} armv7-unknown-linux-ohos-clang update_musl_head_file_path ${3} x86_64-unknown-linux-ohos-clang + update_musl_head_file_path ${3} loongarch64-unknown-linux-ohos-clang fi } diff --git a/rust-build/ohos_ci_build.sh b/rust-build/ohos_ci_build.sh index 364bbf75e42..a877de1f16b 100755 --- a/rust-build/ohos_ci_build.sh +++ b/rust-build/ohos_ci_build.sh @@ -33,6 +33,7 @@ collect_build_result() { cp ${install_path}/rust-std-nightly-aarch64-unknown-linux-ohos.tar.gz ${output_install}/ cp ${install_path}/rust-std-nightly-armv7-unknown-linux-ohos.tar.gz ${output_install}/ cp ${install_path}/rust-std-nightly-x86_64-unknown-linux-ohos.tar.gz ${output_install}/ + cp ${install_path}/rust-std-nightly-loongarch64-unknown-linux-ohos.tar.gz ${output_install}/ elif [ "${host_platform}" = "darwin" ] && [ ${host_cpu} = "x86_64" ]; then cp ${install_path}/rust-nightly-x86_64-apple-darwin.tar.gz ${output_install}/ elif [ "${host_platform}" = "darwin" ] && [ ${host_cpu} = "arm64" ]; then diff --git a/rust-build/tools/loongarch64-unknown-linux-ohos-clang b/rust-build/tools/loongarch64-unknown-linux-ohos-clang new file mode 100644 index 00000000000..a628b38ac99 --- /dev/null +++ b/rust-build/tools/loongarch64-unknown-linux-ohos-clang @@ -0,0 +1,3 @@ +#!/bin/bash + +exec loongarch64-unknown-linux-ohos-clang -fstack-protector-all "$@" diff --git a/rust-build/tools/loongarch64-unknown-linux-ohos-clang++ b/rust-build/tools/loongarch64-unknown-linux-ohos-clang++ new file mode 100644 index 00000000000..8151ff10d70 --- /dev/null +++ b/rust-build/tools/loongarch64-unknown-linux-ohos-clang++ @@ -0,0 +1,3 @@ +#!/bin/bash + +exec loongarch64-unknown-linux-ohos-clang++ -fstack-protector-all "$@" -- Gitee