2727 - defconfig
2828 - defconfig+debug
2929
30+ backend :
31+ - gcc
32+ - llvm
33+
3034 output :
3135 - src
3236 # subdir
@@ -108,7 +112,8 @@ jobs:
108112 echo "$HOME/.cargo/bin" >> $GITHUB_PATH
109113
110114 # Setup: `rustc_codegen_gcc`.
111- - run : |
115+ - if : matrix.backend == 'gcc'
116+ run : |
112117 sudo apt-get -y --no-install-recommends purge cpp gcc
113118 curl --proto '=https' --tlsv1.2 -sSfLO https://github.com/rust-lang/gcc/releases/latest/download/gcc-15.deb
114119 sudo dpkg -i gcc-15.deb
@@ -123,7 +128,6 @@ jobs:
123128
124129 echo "MAKE_KRUSTFLAGS=KRUSTFLAGS=-Zcodegen-backend=$(pwd)/rustc_codegen_gcc/target/release/librustc_codegen_gcc.so" >> $GITHUB_ENV
125130
126-
127131 cd rustc_codegen_gcc
128132 echo 'gcc-path = "/usr/lib"' > config.toml
129133 #sed -i '/channel/d' rust-toolchain
@@ -181,13 +185,20 @@ jobs:
181185 ${{ env.OUTPUT_DIR }}vmlinux
182186
183187 # Check `.comment` section.
184- - run : |
188+ - if : matrix.backend == 'gcc'
189+ run : |
185190 readelf --string-dump .comment ${{ env.OUTPUT_DIR }}rust/core.o
186191 objcopy --dump-section .comment=comment ${{ env.OUTPUT_DIR }}rust/core.o
187192 grep --text "^.rustc version .* with libgccjit" comment
188193 grep --text 'libgccjit' comment
189194 grep --text 'GCC: ' comment
190195
196+ - if : matrix.backend == 'llvm'
197+ run : |
198+ readelf --string-dump .comment ${{ env.OUTPUT_DIR }}rust/core.o
199+ objcopy --dump-section .comment=comment ${{ env.OUTPUT_DIR }}rust/core.o
200+ grep --text "^.rustc version" comment
201+
191202 # Prepare image.
192203 - run : ${{ env.OUTPUT_DIR }}usr/gen_init_cpio ci/qemu-initramfs.desc > qemu-initramfs.img
193204
0 commit comments