Update for rebased gcc

This commit is contained in:
Antoni Boucher 2024-01-25 21:20:12 -04:00
parent 2a36f58475
commit ad8e820139
15 changed files with 25 additions and 62 deletions

View File

@ -49,19 +49,11 @@ jobs:
run: sudo apt-get install ninja-build ripgrep llvm-14-tools run: sudo apt-get install ninja-build ripgrep llvm-14-tools
- name: Download artifact - name: Download artifact
uses: dawidd6/action-download-artifact@v2 run: curl -LO https://github.com/antoyo/gcc/releases/latest/download/gcc-13.deb
with:
workflow: main.yml
name: gcc-13
path: gcc-13
repo: antoyo/gcc
branch: ${{ matrix.libgccjit_version.artifacts_branch }}
event: push
search_artifacts: true # Because, instead, the action only check the last job ran and that won't work since we want multiple artifacts.
- name: Setup path to libgccjit - name: Setup path to libgccjit
run: | run: |
sudo dpkg --force-overwrite -i gcc-13/gcc-13.deb sudo dpkg --force-overwrite -i gcc-13.deb
echo /usr/lib/ > gcc_path echo /usr/lib/ > gcc_path
- name: Set env - name: Set env
@ -95,7 +87,7 @@ jobs:
./y.sh prepare ./y.sh prepare
- name: Add more failing tests because the sysroot is not compiled with LTO - name: Add more failing tests because the sysroot is not compiled with LTO
run: cat failing-non-lto-tests.txt >> failing-ui-tests.txt run: cat tests/failing-non-lto-tests.txt >> tests/failing-ui-tests.txt
- name: Run tests - name: Run tests
run: | run: |

View File

@ -56,20 +56,12 @@ jobs:
- name: Download artifact - name: Download artifact
if: matrix.libgccjit_version.gcc != 'libgccjit12.so' if: matrix.libgccjit_version.gcc != 'libgccjit12.so'
uses: dawidd6/action-download-artifact@v2 run: curl -LO https://github.com/antoyo/gcc/releases/latest/download/gcc-13.deb
with:
workflow: main.yml
name: gcc-13
path: gcc-13
repo: antoyo/gcc
branch: ${{ matrix.libgccjit_version.artifacts_branch }}
event: push
search_artifacts: true # Because, instead, the action only check the last job ran and that won't work since we want multiple artifacts.
- name: Setup path to libgccjit - name: Setup path to libgccjit
if: matrix.libgccjit_version.gcc != 'libgccjit12.so' if: matrix.libgccjit_version.gcc != 'libgccjit12.so'
run: | run: |
sudo dpkg --force-overwrite -i gcc-13/gcc-13.deb sudo dpkg --force-overwrite -i gcc-13.deb
echo /usr/lib/ > gcc_path echo /usr/lib/ > gcc_path
- name: Set env - name: Set env
@ -99,7 +91,7 @@ jobs:
run: ./y.sh prepare run: ./y.sh prepare
- name: Add more failing tests because the sysroot is not compiled with LTO - name: Add more failing tests because the sysroot is not compiled with LTO
run: cat failing-non-lto-tests.txt >> failing-ui-tests.txt run: cat tests/failing-non-lto-tests.txt >> tests/failing-ui-tests.txt
- name: Run tests - name: Run tests
id: tests id: tests

View File

@ -78,10 +78,10 @@ jobs:
./y.sh prepare --libgccjit12-patches ./y.sh prepare --libgccjit12-patches
- name: Add more failing tests for GCC 12 - name: Add more failing tests for GCC 12
run: cat failing-ui-tests12.txt >> failing-ui-tests.txt run: cat tests/failing-ui-tests12.txt >> tests/failing-ui-tests.txt
- name: Add more failing tests because the sysroot is not compiled with LTO - name: Add more failing tests because the sysroot is not compiled with LTO
run: cat failing-non-lto-tests.txt >> failing-ui-tests.txt run: cat tests/failing-non-lto-tests.txt >> tests/failing-ui-tests.txt
- name: Run tests - name: Run tests
run: | run: |

View File

@ -50,14 +50,8 @@ jobs:
sudo apt-get update sudo apt-get update
sudo apt-get install qemu qemu-user-static sudo apt-get install qemu qemu-user-static
- name: Download GCC artifact - name: Download artifact
uses: dawidd6/action-download-artifact@v2 run: curl -LO https://github.com/cross-cg-gcc-tools/cross-gcc/releases/latest/download/gcc-m68k-13.deb
with:
workflow: m68k.yml
name: gcc-m68k-13
repo: cross-cg-gcc-tools/cross-gcc
branch: master
event: push
- name: Download VM artifact - name: Download VM artifact
uses: dawidd6/action-download-artifact@v2 uses: dawidd6/action-download-artifact@v2
@ -110,7 +104,7 @@ jobs:
./y.sh prepare --cross ./y.sh prepare --cross
- name: Add more failing tests because the sysroot is not compiled with LTO - name: Add more failing tests because the sysroot is not compiled with LTO
run: cat failing-non-lto-tests.txt >> failing-ui-tests.txt run: cat tests/failing-non-lto-tests.txt >> tests/failing-ui-tests.txt
- name: Run tests - name: Run tests
run: | run: |

View File

@ -37,19 +37,11 @@ jobs:
run: sudo apt-get install ninja-build ripgrep run: sudo apt-get install ninja-build ripgrep
- name: Download artifact - name: Download artifact
uses: dawidd6/action-download-artifact@v2 run: curl -LO https://github.com/antoyo/gcc/releases/latest/download/gcc-13.deb
with:
workflow: main.yml
name: gcc-13
path: gcc-13
repo: antoyo/gcc
branch: "master"
event: push
search_artifacts: true # Because, instead, the action only check the last job ran and that won't work since we want multiple artifacts.
- name: Setup path to libgccjit - name: Setup path to libgccjit
run: | run: |
sudo dpkg --force-overwrite -i gcc-13/gcc-13.deb sudo dpkg --force-overwrite -i gcc-13.deb
echo /usr/lib/ > gcc_path echo /usr/lib/ > gcc_path
- name: Set env - name: Set env
@ -76,7 +68,7 @@ jobs:
echo -n 'lto = "fat"' >> build_sysroot/Cargo.toml echo -n 'lto = "fat"' >> build_sysroot/Cargo.toml
- name: Add more failing tests because of undefined symbol errors (FIXME) - name: Add more failing tests because of undefined symbol errors (FIXME)
run: cat failing-lto-tests.txt >> failing-ui-tests.txt run: cat tests/failing-lto-tests.txt >> tests/failing-ui-tests.txt
- name: Run tests - name: Run tests
run: | run: |

View File

@ -51,19 +51,11 @@ jobs:
sudo ln -s /usr/share/intel-sde/sde64 /usr/bin/sde64 sudo ln -s /usr/share/intel-sde/sde64 /usr/bin/sde64
- name: Download artifact - name: Download artifact
uses: dawidd6/action-download-artifact@v2 run: curl -LO https://github.com/antoyo/gcc/releases/latest/download/gcc-13.deb
with:
workflow: main.yml
name: gcc-13
path: gcc-13
repo: antoyo/gcc
branch: "master"
event: push
search_artifacts: true # Because, instead, the action only check the last job ran and that won't work since we want multiple artifacts.
- name: Setup path to libgccjit - name: Setup path to libgccjit
run: | run: |
sudo dpkg --force-overwrite -i gcc-13/gcc-13.deb sudo dpkg --force-overwrite -i gcc-13.deb
echo /usr/lib/ > gcc_path echo /usr/lib/ > gcc_path
- name: Set env - name: Set env

2
.gitignore vendored
View File

@ -19,6 +19,8 @@ gimple*
res res
test-backend test-backend
gcc_path gcc_path
cross_gcc_path
projects
benchmarks benchmarks
tools/llvm-project tools/llvm-project
tools/llvmint tools/llvmint

4
Cargo.lock generated
View File

@ -74,7 +74,7 @@ dependencies = [
[[package]] [[package]]
name = "gccjit" name = "gccjit"
version = "1.0.0" version = "1.0.0"
source = "git+https://github.com/antoyo/gccjit.rs#6e290f25b1d1edab5ae9ace486fd2dc8c08d6421" source = "git+https://github.com/antoyo/gccjit.rs#e6109eb8b7ced60b5191e65b34954d04d4abeaec"
dependencies = [ dependencies = [
"gccjit_sys", "gccjit_sys",
] ]
@ -82,7 +82,7 @@ dependencies = [
[[package]] [[package]]
name = "gccjit_sys" name = "gccjit_sys"
version = "0.0.1" version = "0.0.1"
source = "git+https://github.com/antoyo/gccjit.rs#6e290f25b1d1edab5ae9ace486fd2dc8c08d6421" source = "git+https://github.com/antoyo/gccjit.rs#e6109eb8b7ced60b5191e65b34954d04d4abeaec"
dependencies = [ dependencies = [
"libc", "libc",
] ]

View File

@ -988,7 +988,6 @@ fn file_handling(file_path: &Path) -> Result<(), String> {
// one test. // one test.
let count = files.len() / nb_parts + 1; let count = files.len() / nb_parts + 1;
let start = current_part * count; let start = current_part * count;
let end = current_part * count + count;
// We remove the files we don't want to test. // We remove the files we don't want to test.
for path in files.iter().skip(start).take(count) { for path in files.iter().skip(start).take(count) {
remove_file(&rust_path.join(path))?; remove_file(&rust_path.join(path))?;
@ -1047,7 +1046,7 @@ fn test_failing_rustc(env: &Env, args: &TestArg) -> Result<(), String> {
Some(Path::new("rust")), Some(Path::new("rust")),
)?; )?;
// Putting back only the failing ones. // Putting back only the failing ones.
let path = "failing-ui-tests.txt"; let path = "tests/failing-ui-tests.txt";
if let Ok(files) = std::fs::read_to_string(path) { if let Ok(files) = std::fs::read_to_string(path) {
for file in files for file in files
.split('\n') .split('\n')
@ -1072,7 +1071,7 @@ fn test_failing_rustc(env: &Env, args: &TestArg) -> Result<(), String> {
fn test_successful_rustc(env: &Env, args: &TestArg) -> Result<(), String> { fn test_successful_rustc(env: &Env, args: &TestArg) -> Result<(), String> {
test_rustc_inner(env, args, || { test_rustc_inner(env, args, || {
// Removing the failing tests. // Removing the failing tests.
let path = "failing-ui-tests.txt"; let path = "tests/failing-ui-tests.txt";
if let Ok(files) = std::fs::read_to_string(path) { if let Ok(files) = std::fs::read_to_string(path) {
for file in files for file in files
.split('\n') .split('\n')

View File

@ -235,7 +235,7 @@ pub fn get_static(&self, def_id: DefId) -> LValue<'gcc> {
if !self.tcx.is_reachable_non_generic(def_id) { if !self.tcx.is_reachable_non_generic(def_id) {
#[cfg(feature = "master")] #[cfg(feature = "master")]
global.add_attribute(VarAttribute::Visibility(Visibility::Hidden)); global.add_string_attribute(VarAttribute::Visibility(Visibility::Hidden));
} }
global global

View File

@ -23,7 +23,7 @@ fn predefine_static(&self, def_id: DefId, _linkage: Linkage, visibility: Visibil
let is_tls = attrs.flags.contains(CodegenFnAttrFlags::THREAD_LOCAL); let is_tls = attrs.flags.contains(CodegenFnAttrFlags::THREAD_LOCAL);
let global = self.define_global(symbol_name, gcc_type, is_tls, attrs.link_section); let global = self.define_global(symbol_name, gcc_type, is_tls, attrs.link_section);
#[cfg(feature="master")] #[cfg(feature="master")]
global.add_attribute(VarAttribute::Visibility(base::visibility_to_gcc(visibility))); global.add_string_attribute(VarAttribute::Visibility(base::visibility_to_gcc(visibility)));
// TODO(antoyo): set linkage. // TODO(antoyo): set linkage.
self.instances.borrow_mut().insert(instance, global); self.instances.borrow_mut().insert(instance, global);

View File

@ -70,3 +70,4 @@ tests/ui/async-await/deep-futures-are-freeze.rs
tests/ui/closures/capture-unsized-by-ref.rs tests/ui/closures/capture-unsized-by-ref.rs
tests/ui/coroutine/resume-after-return.rs tests/ui/coroutine/resume-after-return.rs
tests/ui/macros/rfc-2011-nicer-assert-messages/all-expr-kinds.rs tests/ui/macros/rfc-2011-nicer-assert-messages/all-expr-kinds.rs
tests/ui/intrinsics/intrinsics-integer.rs

View File

@ -38,6 +38,5 @@ tests/ui/rust-2018/proc-macro-crate-in-paths.rs
tests/ui/target-feature/missing-plusminus.rs tests/ui/target-feature/missing-plusminus.rs
tests/ui/sse2.rs tests/ui/sse2.rs
tests/ui/codegen/issue-79865-llvm-miscompile.rs tests/ui/codegen/issue-79865-llvm-miscompile.rs
tests/ui/intrinsics/intrinsics-integer.rs
tests/ui/std-backtrace.rs tests/ui/std-backtrace.rs
tests/ui/mir/alignment/packed.rs tests/ui/mir/alignment/packed.rs