mirror of
https://github.com/rust-lang/rust.git
synced 2026-05-15 20:45:45 +03:00
Merge commit 'f682d09eefc6700b9e5851ef193847959acf4fac' into subtree-update_cg_gcc_2025-07-18
This commit is contained in:
+27
-13
@@ -14,8 +14,6 @@ permissions:
|
||||
env:
|
||||
# Enable backtraces for easier debugging
|
||||
RUST_BACKTRACE: 1
|
||||
# TODO: remove when confish.sh is removed.
|
||||
OVERWRITE_TARGET_TRIPLE: m68k-unknown-linux-gnu
|
||||
|
||||
jobs:
|
||||
build:
|
||||
@@ -59,14 +57,12 @@ jobs:
|
||||
|
||||
- name: Setup path to libgccjit
|
||||
run: |
|
||||
sudo dpkg -i gcc-m68k-15.deb
|
||||
sudo dpkg --force-overwrite -i gcc-m68k-15.deb
|
||||
echo 'gcc-path = "/usr/lib/"' > config.toml
|
||||
|
||||
- name: Set env
|
||||
run: |
|
||||
echo "workspace="$GITHUB_WORKSPACE >> $GITHUB_ENV
|
||||
|
||||
|
||||
|
||||
#- name: Cache rust repository
|
||||
## We only clone the rust repository for rustc tests
|
||||
@@ -86,16 +82,20 @@ jobs:
|
||||
- name: Build sample project with target defined as JSON spec
|
||||
run: |
|
||||
./y.sh prepare --only-libcore --cross
|
||||
./y.sh build --sysroot --features compiler_builtins/no-f16-f128 --target-triple m68k-unknown-linux-gnu --target ${{ github.workspace }}/target_specs/m68k-unknown-linux-gnu.json
|
||||
./y.sh cargo build --manifest-path=./tests/hello-world/Cargo.toml --target ${{ github.workspace }}/target_specs/m68k-unknown-linux-gnu.json
|
||||
./y.sh build --sysroot --features compiler-builtins-no-f16-f128 --target-triple m68k-unknown-linux-gnu --target ${{ github.workspace }}/target_specs/m68k-unknown-linux-gnu.json
|
||||
CG_RUSTFLAGS="-Clinker=m68k-unknown-linux-gnu-gcc" ./y.sh cargo build --manifest-path=./tests/hello-world/Cargo.toml --target ${{ github.workspace }}/target_specs/m68k-unknown-linux-gnu.json
|
||||
./y.sh clean all
|
||||
|
||||
- name: Build
|
||||
run: |
|
||||
./y.sh prepare --only-libcore --cross
|
||||
./y.sh build --sysroot --features compiler_builtins/no-f16-f128 --target-triple m68k-unknown-linux-gnu
|
||||
./y.sh test --mini-tests
|
||||
CG_GCC_TEST_TARGET=m68k-unknown-linux-gnu ./y.sh test --cargo-tests
|
||||
./y.sh build --sysroot --features compiler-builtins-no-f16-f128 --target-triple m68k-unknown-linux-gnu
|
||||
./y.sh test --mini-tests --target-triple m68k-unknown-linux-gnu
|
||||
# FIXME: since https://github.com/rust-lang/rust/pull/140809, we cannot run programs for architectures not
|
||||
# supported by the object crate, since this adds a dependency on symbols.o for the panic runtime.
|
||||
# And as such, a wrong order of the object files in the linker command now fails with an undefined reference
|
||||
# to some symbols like __rustc::rust_panic.
|
||||
#CG_GCC_TEST_TARGET=m68k-unknown-linux-gnu ./y.sh test --cargo-tests --target-triple m68k-unknown-linux-gnu
|
||||
./y.sh clean all
|
||||
|
||||
- name: Prepare dependencies
|
||||
@@ -104,9 +104,23 @@ jobs:
|
||||
git config --global user.name "User"
|
||||
./y.sh prepare --cross
|
||||
|
||||
- name: Run tests
|
||||
run: |
|
||||
./y.sh test --release --clean --build-sysroot --sysroot-features compiler_builtins/no-f16-f128 ${{ matrix.commands }}
|
||||
# FIXME: We cannot run programs for architectures not supported by the object crate. See comment above.
|
||||
#- name: Run tests
|
||||
#run: |
|
||||
#./y.sh test --target-triple m68k-unknown-linux-gnu --release --clean --build-sysroot --sysroot-features compiler-builtins-no-f16-f128 ${{ matrix.commands }}
|
||||
|
||||
# FIXME: We cannot run programs for architectures not supported by the object crate. See comment above.
|
||||
#- name: Run Hello World!
|
||||
#run: |
|
||||
#./y.sh build --target-triple m68k-unknown-linux-gnu
|
||||
|
||||
#vm_dir=$(pwd)/vm
|
||||
#cd tests/hello-world
|
||||
#CG_RUSTFLAGS="-Clinker=m68k-unknown-linux-gnu-gcc" ../../y.sh cargo build --target m68k-unknown-linux-gnu
|
||||
#sudo cp target/m68k-unknown-linux-gnu/debug/hello_world $vm_dir/home/
|
||||
#sudo chroot $vm_dir qemu-m68k-static /home/hello_world > hello_world_stdout
|
||||
#expected_output="40"
|
||||
#test $(cat hello_world_stdout) == $expected_output || (echo "Output differs. Actual output: $(cat hello_world_stdout)"; exit 1)
|
||||
|
||||
# Summary job for the merge queue.
|
||||
# ALL THE PREVIOUS JOBS NEED TO BE ADDED TO THE `needs` SECTION OF THIS JOB!
|
||||
|
||||
@@ -78,7 +78,8 @@ jobs:
|
||||
- name: Run tests
|
||||
run: |
|
||||
# FIXME(antoyo): we cannot enable LTO for stdarch tests currently because of some failing LTO tests using proc-macros.
|
||||
echo -n 'lto = "fat"' >> build_system/build_sysroot/Cargo.toml
|
||||
# FIXME(antoyo): this should probably not be needed since we embed the LTO bitcode.
|
||||
printf '[profile.release]\nlto = "fat"\n' >> build/build_sysroot/sysroot_src/library/Cargo.toml
|
||||
EMBED_LTO_BITCODE=1 ./y.sh test --release --clean --release-sysroot --build-sysroot --keep-lto-tests ${{ matrix.commands }}
|
||||
|
||||
- name: Run y.sh cargo build
|
||||
|
||||
Reference in New Issue
Block a user