about summary refs log tree commit diff
diff options
context:
space:
mode:
authorantoyo <antoyo@users.noreply.github.com>2024-02-02 12:11:57 -0500
committerGitHub <noreply@github.com>2024-02-02 12:11:57 -0500
commitb04824a3b2f280ec66a4e528ee2c15a75883ac10 (patch)
treeddb118efa7d711767f66ce97db1ad0cd0ed361a0
parent2a36f58475ce6b2bcf7d5e619af2c4875698f9fb (diff)
parentad8e8201395b0c2a9dbacfde2c5aa7580a1cdb82 (diff)
downloadrust-b04824a3b2f280ec66a4e528ee2c15a75883ac10.tar.gz
rust-b04824a3b2f280ec66a4e528ee2c15a75883ac10.zip
Merge pull request #421 from rust-lang/update/gcc
Update for rebased gcc
-rw-r--r--.github/workflows/ci.yml14
-rw-r--r--.github/workflows/failures.yml14
-rw-r--r--.github/workflows/gcc12.yml4
-rw-r--r--.github/workflows/m68k.yml12
-rw-r--r--.github/workflows/release.yml14
-rw-r--r--.github/workflows/stdarch.yml12
-rw-r--r--.gitignore2
-rw-r--r--Cargo.lock4
-rw-r--r--build_system/src/test.rs5
-rw-r--r--src/consts.rs2
-rw-r--r--src/mono_item.rs2
-rw-r--r--tests/failing-lto-tests.txt (renamed from failing-lto-tests.txt)0
-rw-r--r--tests/failing-non-lto-tests.txt (renamed from failing-non-lto-tests.txt)0
-rw-r--r--tests/failing-ui-tests.txt (renamed from failing-ui-tests.txt)1
-rw-r--r--tests/failing-ui-tests12.txt (renamed from failing-ui-tests12.txt)1
15 files changed, 25 insertions, 62 deletions
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 @@ where
         // 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 @@ impl<'gcc, 'tcx> CodegenCx<'gcc, 'tcx> {
 
             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 @@ impl<'gcc, 'tcx> PreDefineMethods<'tcx> for CodegenCx<'gcc, 'tcx> {
         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
index 2e0b6134070..2e0b6134070 100644
--- a/failing-lto-tests.txt
+++ b/tests/failing-lto-tests.txt
diff --git a/failing-non-lto-tests.txt b/tests/failing-non-lto-tests.txt
index 4fd60f2b8e4..4fd60f2b8e4 100644
--- a/failing-non-lto-tests.txt
+++ b/tests/failing-non-lto-tests.txt
diff --git a/failing-ui-tests.txt b/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
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