From 3bb70eb8b61de2cd5b0f0a746616434bd64c31f2 Mon Sep 17 00:00:00 2001 From: Antoni Boucher Date: Wed, 22 Oct 2025 08:44:14 -0400 Subject: [PATCH 1/2] Also run the CI with cg_llvm --- .github/workflows/ci.yaml | 17 ++++++++++++++--- 1 file changed, 14 insertions(+), 3 deletions(-) diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index fc8000c..3aed727 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -27,6 +27,10 @@ jobs: - defconfig - defconfig+debug + backend: + - gcc + - llvm + output: - src # subdir @@ -108,7 +112,8 @@ jobs: echo "$HOME/.cargo/bin" >> $GITHUB_PATH # Setup: `rustc_codegen_gcc`. - - run: | + - if: matrix.backend == 'gcc' + run: | sudo apt-get -y --no-install-recommends purge cpp gcc curl --proto '=https' --tlsv1.2 -sSfLO https://github.com/rust-lang/gcc/releases/latest/download/gcc-15.deb sudo dpkg -i gcc-15.deb @@ -123,7 +128,6 @@ jobs: echo "MAKE_KRUSTFLAGS=KRUSTFLAGS=-Zcodegen-backend=$(pwd)/rustc_codegen_gcc/target/release/librustc_codegen_gcc.so" >> $GITHUB_ENV - cd rustc_codegen_gcc echo 'gcc-path = "/usr/lib"' > config.toml #sed -i '/channel/d' rust-toolchain @@ -181,13 +185,20 @@ jobs: ${{ env.OUTPUT_DIR }}vmlinux # Check `.comment` section. - - run: | + - if: matrix.backend == 'gcc' + run: | readelf --string-dump .comment ${{ env.OUTPUT_DIR }}rust/core.o objcopy --dump-section .comment=comment ${{ env.OUTPUT_DIR }}rust/core.o grep --text "^.rustc version .* with libgccjit" comment grep --text 'libgccjit' comment grep --text 'GCC: ' comment + - if: matrix.backend == 'llvm' + run: | + readelf --string-dump .comment ${{ env.OUTPUT_DIR }}rust/core.o + objcopy --dump-section .comment=comment ${{ env.OUTPUT_DIR }}rust/core.o + grep --text "^.rustc version" comment + # Prepare image. - run: ${{ env.OUTPUT_DIR }}usr/gen_init_cpio ci/qemu-initramfs.desc > qemu-initramfs.img From cf304b95c220a0d2368cdc338f891ed506d8b4d8 Mon Sep 17 00:00:00 2001 From: Antoni Boucher Date: Wed, 22 Oct 2025 09:41:13 -0400 Subject: [PATCH 2/2] Fix tests --- .github/workflows/ci.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index 3aed727..271d9ee 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -243,7 +243,7 @@ jobs: grep '] rust_print: Info message (level 6) with args$' qemu-stdout grep '] rust_print: A line that is continued with args$' qemu-stdout - - run: grep '] ok 4 rust_doctests_kernel$' qemu-stdout + - run: grep '] ok 7 rust_doctests_kernel$' qemu-stdout - run: python ci/check_panics.py qemu-stdout