From a4b737643e1c46c859c1b216059b7ce392136de4 Mon Sep 17 00:00:00 2001 From: Jubilee Young Date: Tue, 28 May 2024 23:26:20 -0700 Subject: [PATCH 1/3] give tidy the good news about C-SKY --- src/tools/tidy/src/target_specific_tests.rs | 1 + 1 file changed, 1 insertion(+) diff --git a/src/tools/tidy/src/target_specific_tests.rs b/src/tools/tidy/src/target_specific_tests.rs index 5a402f3cc60..6fd2148ef67 100644 --- a/src/tools/tidy/src/target_specific_tests.rs +++ b/src/tools/tidy/src/target_specific_tests.rs @@ -15,6 +15,7 @@ const KNOWN_LLVM_COMPONENTS: &[&str] = &[ "arm", "avr", "bpf", + "csky", "hexagon", "loongarch", "m68k", From ce092d46e3d5538608b681cc7867d03a3551c6c9 Mon Sep 17 00:00:00 2001 From: Jubilee Young Date: Wed, 29 May 2024 00:22:35 -0700 Subject: [PATCH 2/3] tests: reenable ABI compatibility test for csky --- tests/ui/abi/compatibility.rs | 13 +++++-------- 1 file changed, 5 insertions(+), 8 deletions(-) diff --git a/tests/ui/abi/compatibility.rs b/tests/ui/abi/compatibility.rs index 784c6d488ea..c27a107a639 100644 --- a/tests/ui/abi/compatibility.rs +++ b/tests/ui/abi/compatibility.rs @@ -52,18 +52,16 @@ //@ revisions: m68k //@[m68k] compile-flags: --target m68k-unknown-linux-gnu //@[m68k] needs-llvm-components: m68k +//@ revisions: csky +//@[csky] compile-flags: --target csky-unknown-linux-gnuabiv2 +//@[csky] needs-llvm-components: csky + // FIXME: disabled on nvptx64 since the target ABI fails the sanity check // see https://github.com/rust-lang/rust/issues/117480 /* revisions: nvptx64 [nvptx64] compile-flags: --target nvptx64-nvidia-cuda [nvptx64] needs-llvm-components: nvptx */ -// FIXME: disabled since it fails on CI saying the csky component is missing -// see https://github.com/rust-lang/rust/issues/125697 -/* revisions: csky - [csky] compile-flags: --target csky-unknown-linux-gnuabiv2 - [csky] needs-llvm-components: csky -*/ #![feature(rustc_attrs, unsized_fn_params, transparent_unions)] #![cfg_attr(not(host), feature(no_core, lang_items), no_std, no_core)] #![allow(unused, improper_ctypes_definitions, internal_features)] @@ -75,8 +73,7 @@ #[cfg(host)] use std::{ - any::Any, marker::PhantomData, mem::ManuallyDrop, num::NonZero, ptr::NonNull, rc::Rc, - sync::Arc, + any::Any, marker::PhantomData, mem::ManuallyDrop, num::NonZero, ptr::NonNull, rc::Rc, sync::Arc, }; /// To work cross-target this test must be no_core. From 60c30f57c1c4937f73416bf06295295076aa0c15 Mon Sep 17 00:00:00 2001 From: Jubilee Young Date: Wed, 29 May 2024 10:32:41 -0700 Subject: [PATCH 3/3] ci: Consolidate $IS_NOT_LATEST_LLVM into $EXTERNAL_LLVM We want to only demand that we check for all components we expect if we actually built the components we expect, which means we built the LLVM. Otherwise, it isn't worth checking. --- src/ci/docker/host-x86_64/x86_64-gnu-llvm-17/Dockerfile | 4 ---- src/ci/run.sh | 8 ++------ 2 files changed, 2 insertions(+), 10 deletions(-) diff --git a/src/ci/docker/host-x86_64/x86_64-gnu-llvm-17/Dockerfile b/src/ci/docker/host-x86_64/x86_64-gnu-llvm-17/Dockerfile index 538962802c9..275acb47c33 100644 --- a/src/ci/docker/host-x86_64/x86_64-gnu-llvm-17/Dockerfile +++ b/src/ci/docker/host-x86_64/x86_64-gnu-llvm-17/Dockerfile @@ -45,10 +45,6 @@ RUN sh /scripts/sccache.sh ENV NO_DOWNLOAD_CI_LLVM 1 ENV EXTERNAL_LLVM 1 -# This is not the latest LLVM version, so some components required by tests may -# be missing. -ENV IS_NOT_LATEST_LLVM 1 - # Using llvm-link-shared due to libffi issues -- see #34486 ENV RUST_CONFIGURE_ARGS \ --build=x86_64-unknown-linux-gnu \ diff --git a/src/ci/run.sh b/src/ci/run.sh index 3ad04c73d3d..2e36b7e5962 100755 --- a/src/ci/run.sh +++ b/src/ci/run.sh @@ -89,6 +89,8 @@ RUST_CONFIGURE_ARGS="$RUST_CONFIGURE_ARGS --dist-compression-formats=xz" # (to avoid spending a lot of time cloning llvm) if [ "$EXTERNAL_LLVM" = "" ]; then RUST_CONFIGURE_ARGS="$RUST_CONFIGURE_ARGS --set build.optimized-compiler-builtins" + # Likewise, only demand we test all LLVM components if we know we built LLVM with them + export COMPILETEST_NEEDS_ALL_LLVM_COMPONENTS=1 elif [ "$DEPLOY$DEPLOY_ALT" = "1" ]; then echo "error: dist builds should always use optimized compiler-rt!" >&2 exit 1 @@ -169,12 +171,6 @@ else fi fi -# Unless we're using an older version of LLVM, check that all LLVM components -# used by tests are available. -if [ "$IS_NOT_LATEST_LLVM" = "" ]; then - export COMPILETEST_NEEDS_ALL_LLVM_COMPONENTS=1 -fi - if [ "$ENABLE_GCC_CODEGEN" = "1" ]; then # If `ENABLE_GCC_CODEGEN` is set and not empty, we add the `--enable-new-symbol-mangling` # argument to `RUST_CONFIGURE_ARGS` and set the `GCC_EXEC_PREFIX` environment variable.