Marge Bot pushed to branch master at Glasgow Haskell Compiler / GHC
Commits:
-
fc2b083f
by Andreas Klebinger at 2026-03-14T05:15:14-04:00
1 changed file:
Changes:
| ... | ... | @@ -23,52 +23,9 @@ fi |
| 23 | 23 | CABVERSTR=$("$CABAL" --numeric-version)
|
| 24 | 24 | CABVER=( ${CABVERSTR//./ } )
|
| 25 | 25 | |
| 26 | -THREADS="-j1"
|
|
| 27 | -GC_THREADS=""
|
|
| 28 | -SEMAPHORE=""
|
|
| 29 | - |
|
| 30 | -echo "$@"
|
|
| 31 | - |
|
| 32 | -# Try building hadrian in parallel. We check for -j<n>.
|
|
| 33 | -# If threads > 1 we pass --semaphore to allow ghc to build more than one module in parallel
|
|
| 34 | -# If threads > 4 we pass -qn as higher parallel gc thread counts can lead to slow downs
|
|
| 35 | -# We only do any of thise for cabal >= 3.14, because I don't trust older versions to handle --semaphore right
|
|
| 36 | -if [ "${CABVER[0]}" -gt 3 ] || [ "${CABVER[0]}" -eq 3 -a "${CABVER[1]}" -ge 14 ];
|
|
| 37 | -then
|
|
| 38 | - |
|
| 39 | - for arg in "$@"; do
|
|
| 40 | - case "$arg" in
|
|
| 41 | - -j)
|
|
| 42 | - GC_THREADS="-qn4"
|
|
| 43 | - SEMAPHORE="--semaphore"
|
|
| 44 | - THREADS="-j"
|
|
| 45 | - ;;
|
|
| 46 | - -j[0-9]*)
|
|
| 47 | - threads="${arg#-j}"
|
|
| 48 | - if [[ "$threads" =~ ^[0-9]+$ ]] && [ "$threads" -ne 0 ]; then
|
|
| 49 | - THREADS="-j${threads}"
|
|
| 50 | - if [ $threads -ge 4 ]; then
|
|
| 51 | - GC_THREADS="-qn4"
|
|
| 52 | - fi
|
|
| 53 | - if [ $threads -gt 1 ]; then
|
|
| 54 | - SEMAPHORE="--semaphore"
|
|
| 55 | - fi
|
|
| 56 | - fi
|
|
| 57 | - ;;
|
|
| 58 | - esac
|
|
| 59 | - |
|
| 60 | - done
|
|
| 61 | - |
|
| 62 | -fi
|
|
| 63 | - |
|
| 64 | -if [ "$(uname -s)" = "FreeBSD" ]; then
|
|
| 65 | - # Can't rely on posix semaphore support in free bsd.
|
|
| 66 | - SEMAPHORE=""
|
|
| 67 | -fi
|
|
| 68 | - |
|
| 69 | 26 | if [ "${CABVER[0]}" -gt 2 -o "${CABVER[0]}" -eq 2 -a "${CABVER[1]}" -ge 2 ];
|
| 70 | 27 | then
|
| 71 | - "$CABAL" --project-file="$PROJ" new-build "${CABFLAGS[@]}" ${THREADS} ${SEMAPHORE} --ghc-options="+RTS ${GC_THREADS} -RTS" exe:hadrian
|
|
| 28 | + "$CABAL" --project-file="$PROJ" new-build "${CABFLAGS[@]}" -j exe:hadrian
|
|
| 72 | 29 | # use new-exec instead of new-run to make sure that the build-tools (alex & happy) are in PATH
|
| 73 | 30 | "$CABAL" --project-file="$PROJ" new-exec "${CABFLAGS[@]}" hadrian -- \
|
| 74 | 31 | --directory "$PWD" \
|