Skip to content

Commit 71b4a19

Browse files
claudebranchseer
authored andcommitted
fix(fspy_test_bin): force static linking for seccomp test binary
The global -crt-static flag (for dynamic musl linking) would make fspy_test_bin dynamically linked, but it must remain static so fspy can test its seccomp-based tracing path for static executables. Pass -static to the linker via build.rs to override the global flag. https://claude.ai/code/session_01R3RoGqPDBRtNa2NRg3SeBM
1 parent 8445f49 commit 71b4a19

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

crates/fspy_test_bin/build.rs

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
fn main() {
2+
// fspy_test_bin must be a statically-linked executable so fspy can test
3+
// its seccomp-based tracing path (used for static binaries that make raw
4+
// syscalls instead of going through a preloaded libc shim).
5+
// Force +crt-static even when the global RUSTFLAGS contain -crt-static.
6+
println!("cargo::rustc-link-arg=-static");
7+
}

0 commit comments

Comments
 (0)