Fix macOS link: use ld64 flags instead of GNU ld ones

ld64.lld rejects --allow-shlib-undefined and -rpath=$ORIGIN. Add a
macOS branch with -undefined dynamic_lookup and an @executable_path
rpath, and skip the Linux-only patchelf step in the justfile.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
This commit is contained in:
Greg ShuflinandClaude Fable 5.1 committed 2026-09-08 15:26:20 -07:00
1 parent a54101b48e
commit 2de47f0db9
2 files changed
+10 -2

No files matched your search

+5
View File
@@ -28,10 +28,15 @@ run-webcam-demo: build-webcam-demo
_build binary-name:
lake build {{binary-name}} --verbose
[linux]
_perform_nix_patch binary-name:
patchelf --set-interpreter /usr/lib/ld-linux-x86-64.so.2 .lake/build/bin/{{binary-name}}
patchelf --set-rpath '$ORIGIN:/usr/lib' .lake/build/bin/{{binary-name}}
[macos]
_perform_nix_patch binary-name:
@true
# Build the C version of the SDL3 webcam
[group: "C_build"]