about summary refs log tree commit diff
path: root/src/bootstrap
diff options
context:
space:
mode:
authorAmanieu d'Antras <amanieu@gmail.com>2022-11-10 10:06:34 +0000
committerAmanieu d'Antras <amanieu@gmail.com>2023-03-28 16:01:13 +0100
commite3968be331aaf7fa48f2365998ed4d076ddc82c8 (patch)
tree78f50787f6df1fb7dbcf3009a3fdd25f8f49dbc6 /src/bootstrap
parentdd19135b044cd21a9c3ae7ae87620bf41a208066 (diff)
downloadrust-e3968be331aaf7fa48f2365998ed4d076ddc82c8.tar.gz
rust-e3968be331aaf7fa48f2365998ed4d076ddc82c8.zip
Add OpenHarmony targets
- `aarch64-unknown-linux-ohos`
- `armv7-unknown-linux-ohos`
Diffstat (limited to 'src/bootstrap')
-rw-r--r--src/bootstrap/lib.rs2
-rw-r--r--src/bootstrap/llvm.rs3
2 files changed, 5 insertions, 0 deletions
diff --git a/src/bootstrap/lib.rs b/src/bootstrap/lib.rs
index 20b92b294fe..f981b5d5da8 100644
--- a/src/bootstrap/lib.rs
+++ b/src/bootstrap/lib.rs
@@ -149,6 +149,8 @@ const EXTRA_CHECK_CFGS: &[(Option<Mode>, &'static str, Option<&[&'static str]>)]
     // Needed to avoid the need to copy windows.lib into the sysroot.
     (Some(Mode::Rustc), "windows_raw_dylib", None),
     (Some(Mode::ToolRustc), "windows_raw_dylib", None),
+    // #[cfg(bootstrap)] ohos
+    (Some(Mode::Std), "target_env", Some(&["ohos"])),
 ];
 
 /// A structure representing a Rust compiler.
diff --git a/src/bootstrap/llvm.rs b/src/bootstrap/llvm.rs
index de06f8ca8c0..a22f0f04b2e 100644
--- a/src/bootstrap/llvm.rs
+++ b/src/bootstrap/llvm.rs
@@ -1008,6 +1008,9 @@ fn supported_sanitizers(
         "aarch64-unknown-linux-gnu" => {
             common_libs("linux", "aarch64", &["asan", "lsan", "msan", "tsan", "hwasan"])
         }
+        "aarch64-unknown-linux-ohos" => {
+            common_libs("linux", "aarch64", &["asan", "lsan", "msan", "tsan", "hwasan"])
+        }
         "x86_64-apple-darwin" => darwin_libs("osx", &["asan", "lsan", "tsan"]),
         "x86_64-unknown-fuchsia" => common_libs("fuchsia", "x86_64", &["asan"]),
         "x86_64-apple-ios" => darwin_libs("iossim", &["asan", "tsan"]),