Skip to content

Commit 418c696

Browse files
committed
fix zig build
1 parent c497cc2 commit 418c696

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

make/detect_platform.lua

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,8 @@ elseif platform.os == 'linux' then
2525
local use_zig = os.getenv("USE_ZIG")
2626
if use_zig and use_zig ~= "0" and use_zig ~= "false" then
2727
-- Set compiler to zig (handles both C and C++)
28-
lm.cc = 'zig c++'
28+
-- Use a wrapper script to filter out -lstdc++fs which doesn't work with Zig
29+
lm.cc = 'bash -c \'exec zig c++ "${@/#-lstdc++fs/}"\' --'
2930
lm.ar = 'zig ar'
3031

3132
if lm.platform == nil then

0 commit comments

Comments
 (0)