Skip to content

Commit e116cb7

Browse files
committed
Fix to use the correct libgccjit for the CI where 128-bit integers are disabled
1 parent af289a5 commit e116cb7

File tree

4 files changed

+25
-24
lines changed

4 files changed

+25
-24
lines changed

.github/workflows/ci.yml

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -19,8 +19,8 @@ jobs:
1919
fail-fast: false
2020
matrix:
2121
libgccjit_version:
22-
- { gcc: "libgccjit.so", artifacts_branch: "master" }
23-
- { gcc: "libgccjit_without_int128.so", artifacts_branch: "master-without-128bit-integers" }
22+
- { gcc: "gcc-13.deb" }
23+
- { gcc: "gcc-13-without-int128.deb" }
2424
commands: [
2525
"--mini-tests",
2626
"--std-tests",
@@ -49,10 +49,19 @@ jobs:
4949
# `llvm-14-tools` is needed to install the `FileCheck` binary which is used for asm tests.
5050
run: sudo apt-get install ninja-build ripgrep llvm-14-tools
5151

52+
- name: Download artifact
53+
run: curl -LO https://github.com/antoyo/gcc/releases/latest/download/${{ matrix.libgccjit_version.gcc }}
54+
55+
- name: Setup path to libgccjit
56+
run: |
57+
sudo dpkg --force-overwrite -i ${{ matrix.libgccjit_version.gcc }}
58+
echo 'gcc-path = "/usr/lib/"' > config.toml
59+
5260
- name: Set env
5361
run: |
5462
echo "workspace="$GITHUB_WORKSPACE >> $GITHUB_ENV
55-
echo 'download-gccjit = true' > config.toml
63+
echo "LIBRARY_PATH=/usr/lib" >> $GITHUB_ENV
64+
echo "LD_LIBRARY_PATH=/usr/lib" >> $GITHUB_ENV
5665
5766
#- name: Cache rust repository
5867
## We only clone the rust repository for rustc tests
@@ -67,15 +76,6 @@ jobs:
6776
run: |
6877
./y.sh prepare --only-libcore
6978
./y.sh build
70-
71-
- name: Set env (part 2)
72-
run: |
73-
# Set the `LD_LIBRARY_PATH` and `LIBRARY_PATH` env variables...
74-
echo "LD_LIBRARY_PATH="$(./y.sh info | grep -v Using) >> $GITHUB_ENV
75-
echo "LIBRARY_PATH="$(./y.sh info | grep -v Using) >> $GITHUB_ENV
76-
77-
- name: Build (part 2)
78-
run: |
7979
cargo test
8080
./y.sh clean all
8181

.github/workflows/stdarch.yml

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -50,24 +50,24 @@ jobs:
5050
sudo ln -s /usr/share/intel-sde/sde /usr/bin/sde
5151
sudo ln -s /usr/share/intel-sde/sde64 /usr/bin/sde64
5252
53-
- name: Download artifact
54-
run: curl -LO https://github.com/antoyo/gcc/releases/latest/download/gcc-13.deb
55-
56-
- name: Setup path to libgccjit
57-
run: |
58-
sudo dpkg --force-overwrite -i gcc-13.deb
59-
echo 'gcc-path = "/usr/lib/"' > config.toml
60-
6153
- name: Set env
6254
run: |
6355
echo "workspace="$GITHUB_WORKSPACE >> $GITHUB_ENV
64-
echo "LIBRARY_PATH=/usr/lib" >> $GITHUB_ENV
65-
echo "LD_LIBRARY_PATH=/usr/lib" >> $GITHUB_ENV
56+
echo 'download-gccjit = true' > config.toml
6657
6758
- name: Build
6859
run: |
6960
./y.sh prepare --only-libcore
7061
./y.sh build --release --release-sysroot
62+
63+
- name: Set env (part 2)
64+
run: |
65+
# Set the `LD_LIBRARY_PATH` and `LIBRARY_PATH` env variables...
66+
echo "LD_LIBRARY_PATH="$(./y.sh info | grep -v Using) >> $GITHUB_ENV
67+
echo "LIBRARY_PATH="$(./y.sh info | grep -v Using) >> $GITHUB_ENV
68+
69+
- name: Build (part 2)
70+
run: |
7171
cargo test
7272
7373
- name: Clean

libgccjit.version

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
89a92e561
1+
cdd897840

src/declare.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -181,7 +181,8 @@ fn declare_raw_fn<'gcc>(cx: &CodegenCx<'gcc, '_>, name: &str, _callconv: () /*ll
181181
}
182182

183183
// FIXME(antoyo): this is a hack because libgccjit currently only supports alpha, num and _.
184-
// Unsupported characters: `$` and `.`.
184+
// Unsupported characters: `$`, `.` and `*`.
185+
// FIXME(antoyo): `*` might not be expected: https://github.com/rust-lang/rust/issues/116979#issuecomment-1840926865
185186
#[cfg(not(feature="master"))]
186187
fn mangle_name(name: &str) -> String {
187188
name.replace(|char: char| {

0 commit comments

Comments
 (0)