Skip to content

Commit 2eb41b4

Browse files
autarchclaude
andcommitted
Remove dead musl-tools step and link hello_cpp from Rust
The musl-tools install step can never run now that all musl targets on Linux use cross. Remove it to avoid confusion. Also call hello_cpp() from bin1.rs so the C++ runtime is actually linked, making the test cover linker failures as well as compiler failures. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
1 parent a56724d commit 2eb41b4

2 files changed

Lines changed: 5 additions & 12 deletions

File tree

action.yml

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -157,18 +157,6 @@ runs:
157157
env:
158158
GITHUB_TOKEN: ${{ inputs.GITHUB_TOKEN }}
159159

160-
- name: Install musl-tools on Linux if target includes "musl"
161-
shell: bash
162-
run: |
163-
if dpkg -l musl-tools | grep -q "^ii\s*musl-tools"; then
164-
exit 0
165-
fi
166-
sudo apt-get update --yes && \
167-
sudo apt-get install --yes musl-tools
168-
if:
169-
steps.determine-cross-compile.outputs.needs-cross != 'true' && contains(inputs.target,
170-
'musl')
171-
172160
- name: Set build command
173161
id: set-build-command
174162
shell: bash

test-project/src/bin1.rs

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,9 @@
1+
extern "C" {
2+
fn hello_cpp() -> i32;
3+
}
4+
15
fn main() {
6+
let _ = unsafe { hello_cpp() };
27
println!("Hello, world!");
38
}
49

0 commit comments

Comments
 (0)