forked from digital-asset/daml
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.hie-bios
executable file
·32 lines (32 loc) · 886 Bytes
/
.hie-bios
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
31
32
#!/usr/bin/env bash
set -euo pipefail
hie_bios_flags() {
bazel build //compiler/damlc:damlc@ghci \
--output_groups=hie_bios \
--experimental_show_artifacts \
2>&1 \
| awk '
BEGIN { rts_opts = false }
/^>>>/ {
while ((getline line < substr($1, 4)) > 0) {
if (rts_opts) {
if (line == "-RTS") {
rts_opts = false
}
} else if (line == "+RTS") {
rts_opts = true
} else if (match(line, "-qg|-fexternal-interpreter")) {
} else if (match(line, "com_github_madler_zlib")) {
} else if (match(line, "grpc_haskell_core_cbits")) {
} else if (match(line, "-lmerged_cbits")) {
} else {
print line
}
}
}'
}
if [[ -z "${HIE_BIOS_OUTPUT-}" ]]; then
hie_bios_flags
else
hie_bios_flags >"$HIE_BIOS_OUTPUT"
fi