nandi/jolt-nativepublic Fork 0
5acc801872977305e0f29a8dc4aca4ddca240f98
Commits
Clone
git clone https://git.rickub.com/nandi/jolt-native.git
git clone ssh://git@rickub.com/nandi/jolt-native.git

Host key fingerprint (ed25519): SHA256:iycHnxEyq0Q7uyVpB7JlznP0G7JrTPXLYRcAU5CSLhc — verify it before your first connect.

Make the C toolchain a dependency too, so zig travels with the action 6391496 · on 5acc801872977305e0f29a8dc4aca4ddca240f98 · nandi · 19d ago
zcc.sh · 30 lines · 938 BBash Blame HistoryRaw
 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
#!/bin/sh
# zig, as the C toolchain, out of the tarball buck fetched.
#
# The buck-side twin of scripts/zcc, and the same argument rewriting: cc-rs
# builds a `--target=` from the Rust triple, which carries a vendor field —
# `x86_64-unknown-linux-gnu`. zig's own triples have no vendor, and it refuses
# the whole query rather than ignoring the part it does not want, reporting
# "unable to parse target query: UnknownOperatingSystem" as though Linux were
# the problem.
#
# $1 is the directory the tarball unpacked into and $2 the zig subcommand — cc,
# c++, ar or ranlib. buck passes both; nothing here can work them out.
set -e
zig=$1/zig
mode=$2
shift 2

for arg do
    case $arg in
        --target=*-unknown-linux-*)
            set -- "$@" "$(printf '%s' "$arg" | sed 's/-unknown-linux-/-linux-/')"
            shift
            continue
            ;;
    esac
    set -- "$@" "$arg"
    shift
done

exec "$zig" "$mode" "$@"