Skip to content

Commit 7a966b9

Browse files
committed
Update llvm triple for OpenHarmony targets
The `ohos` triple has been supported since LLVM 17, so it's time to update them.
1 parent 3f99982 commit 7a966b9

File tree

4 files changed

+4
-8
lines changed

4 files changed

+4
-8
lines changed

compiler/rustc_target/src/spec/targets/aarch64_unknown_linux_ohos.rs

+1-2
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,7 @@ pub(crate) fn target() -> Target {
55
base.max_atomic_width = Some(128);
66

77
Target {
8-
// LLVM 15 doesn't support OpenHarmony yet, use a linux target instead.
9-
llvm_target: "aarch64-unknown-linux-musl".into(),
8+
llvm_target: "aarch64-unknown-linux-ohos".into(),
109
metadata: crate::spec::TargetMetadata {
1110
description: Some("ARM64 OpenHarmony".into()),
1211
tier: Some(2),

compiler/rustc_target/src/spec/targets/armv7_unknown_linux_ohos.rs

+1-2
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,7 @@ pub(crate) fn target() -> Target {
77
// Most of these settings are copied from the armv7_unknown_linux_musleabi
88
// target.
99
Target {
10-
// LLVM 15 doesn't support OpenHarmony yet, use a linux target instead.
11-
llvm_target: "armv7-unknown-linux-gnueabi".into(),
10+
llvm_target: "armv7-unknown-linux-ohos".into(),
1211
metadata: crate::spec::TargetMetadata {
1312
description: Some("Armv7-A OpenHarmony".into()),
1413
tier: Some(2),

compiler/rustc_target/src/spec/targets/loongarch64_unknown_linux_ohos.rs

+1-2
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,7 @@ use crate::spec::{Target, TargetOptions, base};
22

33
pub(crate) fn target() -> Target {
44
Target {
5-
// LLVM 15 doesn't support OpenHarmony yet, use a linux target instead.
6-
llvm_target: "loongarch64-unknown-linux-musl".into(),
5+
llvm_target: "loongarch64-unknown-linux-ohos".into(),
76
metadata: crate::spec::TargetMetadata {
87
description: Some("LoongArch64 OpenHarmony".into()),
98
tier: Some(3),

compiler/rustc_target/src/spec/targets/x86_64_unknown_linux_ohos.rs

+1-2
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,7 @@ pub(crate) fn target() -> Target {
1515
base.supports_xray = true;
1616

1717
Target {
18-
// LLVM 15 doesn't support OpenHarmony yet, use a linux target instead.
19-
llvm_target: "x86_64-unknown-linux-musl".into(),
18+
llvm_target: "x86_64-unknown-linux-ohos".into(),
2019
metadata: crate::spec::TargetMetadata {
2120
description: Some("x86_64 OpenHarmony".into()),
2221
tier: Some(2),

0 commit comments

Comments
 (0)