summaryrefslogtreecommitdiff
path: root/hadrian/build-stack
blob: 68f2e311276e9f75d726bb306ac219dbfa163f4a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
#!/usr/bin/env bash

# Make sure that the script exits if Hadrian fails to build
set -euo pipefail

STACK="${STACK:-stack}"

# Make sure Hadrian is up-to-date
cd hadrian
$STACK build --no-library-profiling "${HADRIAN_NIX:+--nix}"

# Run Hadrian in the top-level GHC directory
$STACK exec hadrian "${HADRIAN_NIX:+--nix}" -- \
    --directory ".."  \
    "$@"