diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index d063f392939..0d84926fddf 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -49,19 +49,11 @@ jobs: run: sudo apt-get install ninja-build ripgrep llvm-14-tools - name: Download artifact - uses: dawidd6/action-download-artifact@v2 - 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. + run: curl -LO https://github.com/antoyo/gcc/releases/latest/download/gcc-13.deb - name: Setup path to libgccjit run: | - sudo dpkg --force-overwrite -i gcc-13/gcc-13.deb + sudo dpkg --force-overwrite -i gcc-13.deb echo /usr/lib/ > gcc_path - name: Set env @@ -95,7 +87,7 @@ jobs: ./y.sh prepare - 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 run: | diff --git a/.github/workflows/failures.yml b/.github/workflows/failures.yml index b768918a014..7aaf47facd8 100644 --- a/.github/workflows/failures.yml +++ b/.github/workflows/failures.yml @@ -56,20 +56,12 @@ jobs: - name: Download artifact if: matrix.libgccjit_version.gcc != 'libgccjit12.so' - uses: dawidd6/action-download-artifact@v2 - 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. + run: curl -LO https://github.com/antoyo/gcc/releases/latest/download/gcc-13.deb - name: Setup path to libgccjit if: matrix.libgccjit_version.gcc != 'libgccjit12.so' run: | - sudo dpkg --force-overwrite -i gcc-13/gcc-13.deb + sudo dpkg --force-overwrite -i gcc-13.deb echo /usr/lib/ > gcc_path - name: Set env @@ -99,7 +91,7 @@ jobs: run: ./y.sh prepare - 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 id: tests diff --git a/.github/workflows/gcc12.yml b/.github/workflows/gcc12.yml index a522423f36c..8d4f88ea7b1 100644 --- a/.github/workflows/gcc12.yml +++ b/.github/workflows/gcc12.yml @@ -78,10 +78,10 @@ jobs: ./y.sh prepare --libgccjit12-patches - 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 - 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 run: | diff --git a/.github/workflows/m68k.yml b/.github/workflows/m68k.yml index af466502198..b0866bafb8e 100644 --- a/.github/workflows/m68k.yml +++ b/.github/workflows/m68k.yml @@ -50,14 +50,8 @@ jobs: sudo apt-get update sudo apt-get install qemu qemu-user-static - - name: Download GCC artifact - uses: dawidd6/action-download-artifact@v2 - with: - workflow: m68k.yml - name: gcc-m68k-13 - repo: cross-cg-gcc-tools/cross-gcc - branch: master - event: push + - name: Download artifact + run: curl -LO https://github.com/cross-cg-gcc-tools/cross-gcc/releases/latest/download/gcc-m68k-13.deb - name: Download VM artifact uses: dawidd6/action-download-artifact@v2 @@ -110,7 +104,7 @@ jobs: ./y.sh prepare --cross - 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 run: | diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 071c21d5f7b..7628fd65571 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -37,19 +37,11 @@ jobs: run: sudo apt-get install ninja-build ripgrep - name: Download artifact - uses: dawidd6/action-download-artifact@v2 - 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. + run: curl -LO https://github.com/antoyo/gcc/releases/latest/download/gcc-13.deb - name: Setup path to libgccjit run: | - sudo dpkg --force-overwrite -i gcc-13/gcc-13.deb + sudo dpkg --force-overwrite -i gcc-13.deb echo /usr/lib/ > gcc_path - name: Set env @@ -76,7 +68,7 @@ jobs: echo -n 'lto = "fat"' >> build_sysroot/Cargo.toml - 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 run: | diff --git a/.github/workflows/stdarch.yml b/.github/workflows/stdarch.yml index 8ffb82518ef..a5c3a5456bd 100644 --- a/.github/workflows/stdarch.yml +++ b/.github/workflows/stdarch.yml @@ -51,19 +51,11 @@ jobs: sudo ln -s /usr/share/intel-sde/sde64 /usr/bin/sde64 - name: Download artifact - uses: dawidd6/action-download-artifact@v2 - 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. + run: curl -LO https://github.com/antoyo/gcc/releases/latest/download/gcc-13.deb - name: Setup path to libgccjit run: | - sudo dpkg --force-overwrite -i gcc-13/gcc-13.deb + sudo dpkg --force-overwrite -i gcc-13.deb echo /usr/lib/ > gcc_path - name: Set env diff --git a/.gitignore b/.gitignore index b44d1aa78c2..c865386dad3 100644 --- a/.gitignore +++ b/.gitignore @@ -19,6 +19,8 @@ gimple* res test-backend gcc_path +cross_gcc_path +projects benchmarks tools/llvm-project tools/llvmint diff --git a/Cargo.lock b/Cargo.lock index 7c186336927..26dc7c535f8 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -74,7 +74,7 @@ dependencies = [ [[package]] name = "gccjit" version = "1.0.0" -source = "git+https://github.com/antoyo/gccjit.rs#6e290f25b1d1edab5ae9ace486fd2dc8c08d6421" +source = "git+https://github.com/antoyo/gccjit.rs#e6109eb8b7ced60b5191e65b34954d04d4abeaec" dependencies = [ "gccjit_sys", ] @@ -82,7 +82,7 @@ dependencies = [ [[package]] name = "gccjit_sys" version = "0.0.1" -source = "git+https://github.com/antoyo/gccjit.rs#6e290f25b1d1edab5ae9ace486fd2dc8c08d6421" +source = "git+https://github.com/antoyo/gccjit.rs#e6109eb8b7ced60b5191e65b34954d04d4abeaec" dependencies = [ "libc", ] diff --git a/build_system/src/test.rs b/build_system/src/test.rs index 44c003d8f75..5e8a5ebe949 100644 --- a/build_system/src/test.rs +++ b/build_system/src/test.rs @@ -988,7 +988,6 @@ fn file_handling(file_path: &Path) -> Result<(), String> { // one test. let count = files.len() / nb_parts + 1; let start = current_part * count; - let end = current_part * count + count; // We remove the files we don't want to test. for path in files.iter().skip(start).take(count) { remove_file(&rust_path.join(path))?; @@ -1047,7 +1046,7 @@ fn test_failing_rustc(env: &Env, args: &TestArg) -> Result<(), String> { Some(Path::new("rust")), )?; // 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) { for file in files .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> { test_rustc_inner(env, args, || { // 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) { for file in files .split('\n') diff --git a/src/consts.rs b/src/consts.rs index d8a1fd315c0..2501c126faf 100644 --- a/src/consts.rs +++ b/src/consts.rs @@ -235,7 +235,7 @@ pub fn get_static(&self, def_id: DefId) -> LValue<'gcc> { if !self.tcx.is_reachable_non_generic(def_id) { #[cfg(feature = "master")] - global.add_attribute(VarAttribute::Visibility(Visibility::Hidden)); + global.add_string_attribute(VarAttribute::Visibility(Visibility::Hidden)); } global diff --git a/src/mono_item.rs b/src/mono_item.rs index 3322d56513b..fdeb2f96fe2 100644 --- a/src/mono_item.rs +++ b/src/mono_item.rs @@ -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 global = self.define_global(symbol_name, gcc_type, is_tls, attrs.link_section); #[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. self.instances.borrow_mut().insert(instance, global); diff --git a/failing-lto-tests.txt b/tests/failing-lto-tests.txt similarity index 100% rename from failing-lto-tests.txt rename to tests/failing-lto-tests.txt diff --git a/failing-non-lto-tests.txt b/tests/failing-non-lto-tests.txt similarity index 100% rename from failing-non-lto-tests.txt rename to tests/failing-non-lto-tests.txt diff --git a/failing-ui-tests.txt b/tests/failing-ui-tests.txt similarity index 98% rename from failing-ui-tests.txt rename to tests/failing-ui-tests.txt index 023fe9d7e83..13d79cd23e3 100644 --- a/failing-ui-tests.txt +++ b/tests/failing-ui-tests.txt @@ -70,3 +70,4 @@ tests/ui/async-await/deep-futures-are-freeze.rs tests/ui/closures/capture-unsized-by-ref.rs tests/ui/coroutine/resume-after-return.rs tests/ui/macros/rfc-2011-nicer-assert-messages/all-expr-kinds.rs +tests/ui/intrinsics/intrinsics-integer.rs diff --git a/failing-ui-tests12.txt b/tests/failing-ui-tests12.txt similarity index 97% rename from failing-ui-tests12.txt rename to tests/failing-ui-tests12.txt index 3ef2bc3ebf8..857c158e42f 100644 --- a/failing-ui-tests12.txt +++ b/tests/failing-ui-tests12.txt @@ -38,6 +38,5 @@ tests/ui/rust-2018/proc-macro-crate-in-paths.rs tests/ui/target-feature/missing-plusminus.rs tests/ui/sse2.rs tests/ui/codegen/issue-79865-llvm-miscompile.rs -tests/ui/intrinsics/intrinsics-integer.rs tests/ui/std-backtrace.rs tests/ui/mir/alignment/packed.rs