nandi/jolt-nativepublic Fork 0
6391496e8bf6bb0aa9007b9b18d01c75da07306e
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.

Fetch rustc the way buck can ship it, from what DotSlash already pins 8cf1b33 · on 6391496e8bf6bb0aa9007b9b18d01c75da07306e · nandi · 19d ago
rustc.sh · 29 lines · 1.1 KBBash 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
#!/bin/sh
# rustc out of the dist tarball buck fetched, with the sysroot stitched on.
#
# The same job scripts/rustc does, said in a way buck can ship: the wrapper and
# the tarball are both inputs to every action that runs it, so the compiler's
# identity is part of the action's cache digest and a remote worker can be
# handed the whole thing.
#
# $1 is the directory the tarball unpacked into, $2 the target triple; buck
# passes both because neither is knowable from inside the script.
set -e
dist=$1
triple=$2
shift 2

# The dist tarball keeps its components in sibling directories, so the
# compiler's own default sysroot (rustc/) holds no libstd — it lives under
# rust-std-<triple>/. The codegen libraries are found by rpath relative to the
# binary, so only the sysroot has to be named.
#
# Callers that set their own win: buck's rustc_cfg action passes an empty
# --sysroot, and rustc refuses the option twice.
for arg do
    case $arg in
        --sysroot|--sysroot=*) exec "$dist/rustc/bin/rustc" "$@" ;;
    esac
done

exec "$dist/rustc/bin/rustc" --sysroot "$dist/rust-std-$triple" "$@"