Skip to content

Commit 7e0994b

Browse files
committed
Test wrt libstdc++
1 parent 5bd2c80 commit 7e0994b

File tree

2 files changed

+27
-2
lines changed

2 files changed

+27
-2
lines changed

.github/workflows/ci.yml

Lines changed: 21 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -52,9 +52,12 @@ jobs:
5252
# `llvm-14-tools` is needed to install the `FileCheck` binary which is used for asm tests.
5353
run: sudo apt-get install ninja-build ripgrep llvm-14-tools llvm libstdc++6
5454

55-
- run: g++ -v
55+
- run: find / -name libstdc++.so.6 2> /dev/null || true
56+
- run: find / -name libstdc++.so 2> /dev/null || true
5657

57-
- run: find / -name libstdc++.so | true
58+
- run: |
59+
cc tests/main.cpp -o main -lstdc++
60+
ldd main
5861
5962
- name: Install rustfmt & clippy
6063
run: rustup component add rustfmt clippy
@@ -67,6 +70,22 @@ jobs:
6770
sudo dpkg --force-overwrite -i ${{ matrix.libgccjit_version.gcc }}
6871
echo 'gcc-path = "/usr/lib/"' > config.toml
6972
73+
- name: Install libstdc++
74+
run: |
75+
sudo apt-get --reinstall install libstdc++6
76+
sudo mkdir -p /usr/lib/gcc/x86_64-linux-gnu/15/
77+
sudo mkdir -p /usr/lib/gcc/x86_64-linux-gnu/16/
78+
sudo cp /usr/lib/gcc/x86_64-linux-gnu/14/libstdc++.so /usr/lib/gcc/x86_64-linux-gnu/15/
79+
sudo cp /usr/lib/gcc/x86_64-linux-gnu/14/libstdc++.so /usr/lib/gcc/x86_64-linux-gnu/16/
80+
81+
- run: find / -name libstdc++.so.6 2> /dev/null || true
82+
- run: find / -name libstdc++.so 2> /dev/null || true
83+
84+
- run: g++ -v
85+
86+
- run: cc tests/main.cpp -o main -lstdc++
87+
- run: cc tests/main.cpp -o main
88+
7089
- name: Set env
7190
run: |
7291
echo "workspace="$GITHUB_WORKSPACE >> $GITHUB_ENV

tests/main.cpp

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
#include <iostream>
2+
3+
int main() {
4+
std::cout << "Hello, world!\n";
5+
return 0;
6+
}

0 commit comments

Comments
 (0)