Skip to content

Commit b04824a

Browse files
authored
Merge pull request #421 from rust-lang/update/gcc
Update for rebased gcc
2 parents 2a36f58 + ad8e820 commit b04824a

File tree

15 files changed

+25
-62
lines changed

15 files changed

+25
-62
lines changed

.github/workflows/ci.yml

Lines changed: 3 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -49,19 +49,11 @@ jobs:
4949
run: sudo apt-get install ninja-build ripgrep llvm-14-tools
5050

5151
- name: Download artifact
52-
uses: dawidd6/action-download-artifact@v2
53-
with:
54-
workflow: main.yml
55-
name: gcc-13
56-
path: gcc-13
57-
repo: antoyo/gcc
58-
branch: ${{ matrix.libgccjit_version.artifacts_branch }}
59-
event: push
60-
search_artifacts: true # Because, instead, the action only check the last job ran and that won't work since we want multiple artifacts.
52+
run: curl -LO https://github.com/antoyo/gcc/releases/latest/download/gcc-13.deb
6153

6254
- name: Setup path to libgccjit
6355
run: |
64-
sudo dpkg --force-overwrite -i gcc-13/gcc-13.deb
56+
sudo dpkg --force-overwrite -i gcc-13.deb
6557
echo /usr/lib/ > gcc_path
6658
6759
- name: Set env
@@ -95,7 +87,7 @@ jobs:
9587
./y.sh prepare
9688
9789
- name: Add more failing tests because the sysroot is not compiled with LTO
98-
run: cat failing-non-lto-tests.txt >> failing-ui-tests.txt
90+
run: cat tests/failing-non-lto-tests.txt >> tests/failing-ui-tests.txt
9991

10092
- name: Run tests
10193
run: |

.github/workflows/failures.yml

Lines changed: 3 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -56,20 +56,12 @@ jobs:
5656

5757
- name: Download artifact
5858
if: matrix.libgccjit_version.gcc != 'libgccjit12.so'
59-
uses: dawidd6/action-download-artifact@v2
60-
with:
61-
workflow: main.yml
62-
name: gcc-13
63-
path: gcc-13
64-
repo: antoyo/gcc
65-
branch: ${{ matrix.libgccjit_version.artifacts_branch }}
66-
event: push
67-
search_artifacts: true # Because, instead, the action only check the last job ran and that won't work since we want multiple artifacts.
59+
run: curl -LO https://github.com/antoyo/gcc/releases/latest/download/gcc-13.deb
6860

6961
- name: Setup path to libgccjit
7062
if: matrix.libgccjit_version.gcc != 'libgccjit12.so'
7163
run: |
72-
sudo dpkg --force-overwrite -i gcc-13/gcc-13.deb
64+
sudo dpkg --force-overwrite -i gcc-13.deb
7365
echo /usr/lib/ > gcc_path
7466
7567
- name: Set env
@@ -99,7 +91,7 @@ jobs:
9991
run: ./y.sh prepare
10092

10193
- name: Add more failing tests because the sysroot is not compiled with LTO
102-
run: cat failing-non-lto-tests.txt >> failing-ui-tests.txt
94+
run: cat tests/failing-non-lto-tests.txt >> tests/failing-ui-tests.txt
10395

10496
- name: Run tests
10597
id: tests

.github/workflows/gcc12.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -78,10 +78,10 @@ jobs:
7878
./y.sh prepare --libgccjit12-patches
7979
8080
- name: Add more failing tests for GCC 12
81-
run: cat failing-ui-tests12.txt >> failing-ui-tests.txt
81+
run: cat tests/failing-ui-tests12.txt >> tests/failing-ui-tests.txt
8282

8383
- name: Add more failing tests because the sysroot is not compiled with LTO
84-
run: cat failing-non-lto-tests.txt >> failing-ui-tests.txt
84+
run: cat tests/failing-non-lto-tests.txt >> tests/failing-ui-tests.txt
8585

8686
- name: Run tests
8787
run: |

.github/workflows/m68k.yml

Lines changed: 3 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -50,14 +50,8 @@ jobs:
5050
sudo apt-get update
5151
sudo apt-get install qemu qemu-user-static
5252
53-
- name: Download GCC artifact
54-
uses: dawidd6/action-download-artifact@v2
55-
with:
56-
workflow: m68k.yml
57-
name: gcc-m68k-13
58-
repo: cross-cg-gcc-tools/cross-gcc
59-
branch: master
60-
event: push
53+
- name: Download artifact
54+
run: curl -LO https://github.com/cross-cg-gcc-tools/cross-gcc/releases/latest/download/gcc-m68k-13.deb
6155

6256
- name: Download VM artifact
6357
uses: dawidd6/action-download-artifact@v2
@@ -110,7 +104,7 @@ jobs:
110104
./y.sh prepare --cross
111105
112106
- name: Add more failing tests because the sysroot is not compiled with LTO
113-
run: cat failing-non-lto-tests.txt >> failing-ui-tests.txt
107+
run: cat tests/failing-non-lto-tests.txt >> tests/failing-ui-tests.txt
114108

115109
- name: Run tests
116110
run: |

.github/workflows/release.yml

Lines changed: 3 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -37,19 +37,11 @@ jobs:
3737
run: sudo apt-get install ninja-build ripgrep
3838

3939
- name: Download artifact
40-
uses: dawidd6/action-download-artifact@v2
41-
with:
42-
workflow: main.yml
43-
name: gcc-13
44-
path: gcc-13
45-
repo: antoyo/gcc
46-
branch: "master"
47-
event: push
48-
search_artifacts: true # Because, instead, the action only check the last job ran and that won't work since we want multiple artifacts.
40+
run: curl -LO https://github.com/antoyo/gcc/releases/latest/download/gcc-13.deb
4941

5042
- name: Setup path to libgccjit
5143
run: |
52-
sudo dpkg --force-overwrite -i gcc-13/gcc-13.deb
44+
sudo dpkg --force-overwrite -i gcc-13.deb
5345
echo /usr/lib/ > gcc_path
5446
5547
- name: Set env
@@ -76,7 +68,7 @@ jobs:
7668
echo -n 'lto = "fat"' >> build_sysroot/Cargo.toml
7769
7870
- name: Add more failing tests because of undefined symbol errors (FIXME)
79-
run: cat failing-lto-tests.txt >> failing-ui-tests.txt
71+
run: cat tests/failing-lto-tests.txt >> tests/failing-ui-tests.txt
8072

8173
- name: Run tests
8274
run: |

.github/workflows/stdarch.yml

Lines changed: 2 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -51,19 +51,11 @@ jobs:
5151
sudo ln -s /usr/share/intel-sde/sde64 /usr/bin/sde64
5252
5353
- name: Download artifact
54-
uses: dawidd6/action-download-artifact@v2
55-
with:
56-
workflow: main.yml
57-
name: gcc-13
58-
path: gcc-13
59-
repo: antoyo/gcc
60-
branch: "master"
61-
event: push
62-
search_artifacts: true # Because, instead, the action only check the last job ran and that won't work since we want multiple artifacts.
54+
run: curl -LO https://github.com/antoyo/gcc/releases/latest/download/gcc-13.deb
6355

6456
- name: Setup path to libgccjit
6557
run: |
66-
sudo dpkg --force-overwrite -i gcc-13/gcc-13.deb
58+
sudo dpkg --force-overwrite -i gcc-13.deb
6759
echo /usr/lib/ > gcc_path
6860
6961
- name: Set env

.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,8 @@ gimple*
1919
res
2020
test-backend
2121
gcc_path
22+
cross_gcc_path
23+
projects
2224
benchmarks
2325
tools/llvm-project
2426
tools/llvmint

Cargo.lock

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

build_system/src/test.rs

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -988,7 +988,6 @@ where
988988
// one test.
989989
let count = files.len() / nb_parts + 1;
990990
let start = current_part * count;
991-
let end = current_part * count + count;
992991
// We remove the files we don't want to test.
993992
for path in files.iter().skip(start).take(count) {
994993
remove_file(&rust_path.join(path))?;
@@ -1047,7 +1046,7 @@ fn test_failing_rustc(env: &Env, args: &TestArg) -> Result<(), String> {
10471046
Some(Path::new("rust")),
10481047
)?;
10491048
// Putting back only the failing ones.
1050-
let path = "failing-ui-tests.txt";
1049+
let path = "tests/failing-ui-tests.txt";
10511050
if let Ok(files) = std::fs::read_to_string(path) {
10521051
for file in files
10531052
.split('\n')
@@ -1072,7 +1071,7 @@ fn test_failing_rustc(env: &Env, args: &TestArg) -> Result<(), String> {
10721071
fn test_successful_rustc(env: &Env, args: &TestArg) -> Result<(), String> {
10731072
test_rustc_inner(env, args, || {
10741073
// Removing the failing tests.
1075-
let path = "failing-ui-tests.txt";
1074+
let path = "tests/failing-ui-tests.txt";
10761075
if let Ok(files) = std::fs::read_to_string(path) {
10771076
for file in files
10781077
.split('\n')

src/consts.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -235,7 +235,7 @@ impl<'gcc, 'tcx> CodegenCx<'gcc, 'tcx> {
235235

236236
if !self.tcx.is_reachable_non_generic(def_id) {
237237
#[cfg(feature = "master")]
238-
global.add_attribute(VarAttribute::Visibility(Visibility::Hidden));
238+
global.add_string_attribute(VarAttribute::Visibility(Visibility::Hidden));
239239
}
240240

241241
global

src/mono_item.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ impl<'gcc, 'tcx> PreDefineMethods<'tcx> for CodegenCx<'gcc, 'tcx> {
2323
let is_tls = attrs.flags.contains(CodegenFnAttrFlags::THREAD_LOCAL);
2424
let global = self.define_global(symbol_name, gcc_type, is_tls, attrs.link_section);
2525
#[cfg(feature="master")]
26-
global.add_attribute(VarAttribute::Visibility(base::visibility_to_gcc(visibility)));
26+
global.add_string_attribute(VarAttribute::Visibility(base::visibility_to_gcc(visibility)));
2727

2828
// TODO(antoyo): set linkage.
2929
self.instances.borrow_mut().insert(instance, global);
File renamed without changes.
File renamed without changes.

failing-ui-tests.txt renamed to tests/failing-ui-tests.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -70,3 +70,4 @@ tests/ui/async-await/deep-futures-are-freeze.rs
7070
tests/ui/closures/capture-unsized-by-ref.rs
7171
tests/ui/coroutine/resume-after-return.rs
7272
tests/ui/macros/rfc-2011-nicer-assert-messages/all-expr-kinds.rs
73+
tests/ui/intrinsics/intrinsics-integer.rs

failing-ui-tests12.txt renamed to tests/failing-ui-tests12.txt

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,5 @@ tests/ui/rust-2018/proc-macro-crate-in-paths.rs
3838
tests/ui/target-feature/missing-plusminus.rs
3939
tests/ui/sse2.rs
4040
tests/ui/codegen/issue-79865-llvm-miscompile.rs
41-
tests/ui/intrinsics/intrinsics-integer.rs
4241
tests/ui/std-backtrace.rs
4342
tests/ui/mir/alignment/packed.rs

0 commit comments

Comments
 (0)