From 3791646c0211f561fbcc52ac55a4b36ddb6d94e8 Mon Sep 17 00:00:00 2001 From: Antoni Boucher Date: Sat, 1 Oct 2022 13:08:16 -0400 Subject: [PATCH 1/2] Run stdarch tests in the CI --- .github/workflows/release.yml | 5 +++++ src/base.rs | 2 +- src/lib.rs | 3 ++- 3 files changed, 8 insertions(+), 2 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index dd24db5e707..2e81442298c 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -105,3 +105,8 @@ jobs: - name: Run tests run: | ./test.sh --release --clean --release-sysroot --build-sysroot --mini-tests --std-tests # --test-libcore # FIXME(antoyo): libcore tests fail. + + - name: Run stdarch tests + run: | + cd build_sysroot/sysroot_src/library/stdarch/ + CHANNEL=release TARGET=x86_64-unknown-linux-gnu ../../../../cargo.sh test diff --git a/src/base.rs b/src/base.rs index 6e1ad9f5315..ed3daddf43e 100644 --- a/src/base.rs +++ b/src/base.rs @@ -101,7 +101,7 @@ pub fn compile_codegen_unit<'tcx>(tcx: TyCtxt<'tcx>, cgu_name: Symbol, supports_ context.add_command_line_option("-m64"); context.add_command_line_option("-mbmi"); context.add_command_line_option("-mgfni"); - context.add_command_line_option("-mavxvnni"); + //context.add_command_line_option("-mavxvnni"); // The CI doesn't support this option. context.add_command_line_option("-mf16c"); context.add_command_line_option("-maes"); context.add_command_line_option("-mxsavec"); diff --git a/src/lib.rs b/src/lib.rs index e43ee5cf21d..e52ee4818f3 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -316,7 +316,8 @@ pub fn target_features(sess: &Session, allow_unstable: bool) -> Vec { // gcc -march=native -Q --help=target #[cfg(feature="master")] { - (_feature.contains("sse") || _feature.contains("avx")) && !_feature.contains("avx512") + // NOTE: the CPU in the CI doesn't support sse4a, so disable it to make the stdarch tests pass in the CI. + (_feature.contains("sse") || _feature.contains("avx")) && !_feature.contains("avx512") && !_feature.contains("sse4a") } #[cfg(not(feature="master"))] { From 054696e4a3c8e91ed5e880f41a0c42632d8b19b7 Mon Sep 17 00:00:00 2001 From: Antoni Boucher Date: Fri, 25 Nov 2022 11:20:17 -0500 Subject: [PATCH 2/2] Disable stdarch examples which require unwinding --- patches/0001-Disable-examples.patch | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) create mode 100644 patches/0001-Disable-examples.patch diff --git a/patches/0001-Disable-examples.patch b/patches/0001-Disable-examples.patch new file mode 100644 index 00000000000..1b71df1ca8d --- /dev/null +++ b/patches/0001-Disable-examples.patch @@ -0,0 +1,25 @@ +From a2d53a324a02c04b76c0e9d39dc15cd443a3b8b2 Mon Sep 17 00:00:00 2001 +From: Antoni Boucher +Date: Fri, 25 Nov 2022 11:18:11 -0500 +Subject: [PATCH] Disable examples + +--- + library/stdarch/Cargo.toml | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/library/stdarch/Cargo.toml b/library/stdarch/Cargo.toml +index fbe0a95..748d72d 100644 +--- a/library/stdarch/Cargo.toml ++++ b/library/stdarch/Cargo.toml +@@ -3,7 +3,7 @@ members = [ + "crates/core_arch", + "crates/std_detect", + "crates/stdarch-gen", +- "examples/" ++ #"examples/" + ] + exclude = [ + "crates/wasm-assert-instr-tests" +-- +2.26.2.7.g19db9cfb68.dirty +