about summary refs log tree commit diff
path: root/src
diff options
context:
space:
mode:
authorWANG Rui <wangrui@loongson.cn>2024-09-13 14:30:22 +0800
committerWANG Rui <wangrui@loongson.cn>2024-10-06 11:57:06 +0800
commit8a5e03bf438ddc990ab311bc63d7c15b2f21f5a8 (patch)
treebe8c12141aa7ccad7178a558b1dc513cadac53e5 /src
parent85e2f55d8291e643b5b4c98ee09db301379d63a6 (diff)
downloadrust-8a5e03bf438ddc990ab311bc63d7c15b2f21f5a8.tar.gz
rust-8a5e03bf438ddc990ab311bc63d7c15b2f21f5a8.zip
Enable sanitizers for loongarch64-unknown-*
Diffstat (limited to 'src')
-rw-r--r--src/bootstrap/src/core/build_steps/llvm.rs3
-rw-r--r--src/ci/docker/host-x86_64/dist-loongarch64-linux/Dockerfile1
-rw-r--r--src/ci/docker/host-x86_64/dist-loongarch64-musl/Dockerfile1
3 files changed, 5 insertions, 0 deletions
diff --git a/src/bootstrap/src/core/build_steps/llvm.rs b/src/bootstrap/src/core/build_steps/llvm.rs
index 30213584157..c64ca730698 100644
--- a/src/bootstrap/src/core/build_steps/llvm.rs
+++ b/src/bootstrap/src/core/build_steps/llvm.rs
@@ -1215,6 +1215,9 @@ fn supported_sanitizers(
         "aarch64-unknown-linux-ohos" => {
             common_libs("linux", "aarch64", &["asan", "lsan", "msan", "tsan", "hwasan"])
         }
+        "loongarch64-unknown-linux-gnu" | "loongarch64-unknown-linux-musl" => {
+            common_libs("linux", "loongarch64", &["asan", "lsan", "msan", "tsan"])
+        }
         "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"]),
diff --git a/src/ci/docker/host-x86_64/dist-loongarch64-linux/Dockerfile b/src/ci/docker/host-x86_64/dist-loongarch64-linux/Dockerfile
index 865a9e32fa9..71eb72686b0 100644
--- a/src/ci/docker/host-x86_64/dist-loongarch64-linux/Dockerfile
+++ b/src/ci/docker/host-x86_64/dist-loongarch64-linux/Dockerfile
@@ -47,6 +47,7 @@ ENV RUST_CONFIGURE_ARGS \
       --enable-extended \
       --enable-full-tools \
       --enable-profiler \
+      --enable-sanitizers \
       --disable-docs
 
 ENV SCRIPT python3 ../x.py dist --host $HOSTS --target $TARGETS
diff --git a/src/ci/docker/host-x86_64/dist-loongarch64-musl/Dockerfile b/src/ci/docker/host-x86_64/dist-loongarch64-musl/Dockerfile
index 62dbfaaa673..5081f25e567 100644
--- a/src/ci/docker/host-x86_64/dist-loongarch64-musl/Dockerfile
+++ b/src/ci/docker/host-x86_64/dist-loongarch64-musl/Dockerfile
@@ -29,6 +29,7 @@ ENV RUST_CONFIGURE_ARGS \
       --enable-extended \
       --enable-full-tools \
       --enable-profiler \
+      --enable-sanitizers \
       --disable-docs \
       --set target.loongarch64-unknown-linux-musl.crt-static=false \
       --musl-root-loongarch64=/x-tools/loongarch64-unknown-linux-musl/loongarch64-unknown-linux-musl/sysroot/usr