From b1579e8acf359ab7dce1ca14cb08290e1b26d507 Mon Sep 17 00:00:00 2001 From: WANG Rui Date: Fri, 11 Oct 2024 17:44:44 +0800 Subject: [PATCH] Setting up indirect access to external data for loongarch64-linux-{musl,ohos} In issue #118053, the `loongarch64-unknown-linux-gnu` target needs indirection to access external data, and so do the `loongarch64-unknown-linux-musl` and `loongarch64-unknown-linux-ohos` targets. --- .../src/spec/targets/loongarch64_unknown_linux_musl.rs | 1 + .../src/spec/targets/loongarch64_unknown_linux_ohos.rs | 1 + 2 files changed, 2 insertions(+) diff --git a/compiler/rustc_target/src/spec/targets/loongarch64_unknown_linux_musl.rs b/compiler/rustc_target/src/spec/targets/loongarch64_unknown_linux_musl.rs index 70e8bf633a9a6..398af96127b72 100644 --- a/compiler/rustc_target/src/spec/targets/loongarch64_unknown_linux_musl.rs +++ b/compiler/rustc_target/src/spec/targets/loongarch64_unknown_linux_musl.rs @@ -24,6 +24,7 @@ pub(crate) fn target() -> Target { | SanitizerSet::LEAK | SanitizerSet::MEMORY | SanitizerSet::THREAD, + direct_access_external_data: Some(false), ..base::linux_musl::opts() }, } diff --git a/compiler/rustc_target/src/spec/targets/loongarch64_unknown_linux_ohos.rs b/compiler/rustc_target/src/spec/targets/loongarch64_unknown_linux_ohos.rs index 90bcd9a45cf42..73d7f0ce4d0af 100644 --- a/compiler/rustc_target/src/spec/targets/loongarch64_unknown_linux_ohos.rs +++ b/compiler/rustc_target/src/spec/targets/loongarch64_unknown_linux_ohos.rs @@ -22,6 +22,7 @@ pub(crate) fn target() -> Target { | SanitizerSet::LEAK | SanitizerSet::MEMORY | SanitizerSet::THREAD, + direct_access_external_data: Some(false), ..base::linux_ohos::opts() }, }