File tree Expand file tree Collapse file tree 3 files changed +22
-3
lines changed
Expand file tree Collapse file tree 3 files changed +22
-3
lines changed Original file line number Diff line number Diff line change 4343 run :
4444 sudo snap install zig --classic --beta
4545
46+ - name : Prepare zig wrapper
47+ if : matrix.target == 'linux'
48+ run : chmod +x zig-cc-wrapper.sh
49+
4650 - name : Build
4751 env :
4852 USE_ZIG : ${{ matrix.target == 'linux' && '1' || '0' }}
Original file line number Diff line number Diff line change @@ -24,9 +24,10 @@ elseif platform.os == 'linux' then
2424 -- Use Zig for Linux builds to ensure glibc 2.17 compatibility
2525 local use_zig = os.getenv (" USE_ZIG" )
2626 if use_zig and use_zig ~= " 0" and use_zig ~= " false" then
27- -- Set compiler to zig (handles both C and 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/}"\' --'
27+ -- Set compiler to zig wrapper script that filters out -lstdc++fs
28+ -- The wrapper is needed because bee.lua requires stdc++fs but Zig's libc++ already includes it
29+ local wrapper = lm .workdir .. ' /zig-cc-wrapper.sh'
30+ lm .cc = wrapper
3031 lm .ar = ' zig ar'
3132
3233 if lm .platform == nil then
Original file line number Diff line number Diff line change 1+ #! /bin/bash
2+ # Wrapper script for Zig compiler to filter out -lstdc++fs
3+ # Zig's libc++ already includes filesystem support
4+
5+ # Filter out -lstdc++fs from arguments
6+ args=()
7+ for arg in " $@ " ; do
8+ if [ " $arg " != " -lstdc++fs" ]; then
9+ args+=(" $arg " )
10+ fi
11+ done
12+
13+ # Call zig c++ with filtered arguments
14+ exec zig c++ " ${args[@]} "
You can’t perform that action at this time.
0 commit comments