mirror of
https://github.com/ilyakooo0/streamly.git
synced 2024-09-17 11:37:20 +03:00
Add support for --with-compiler
This commit is contained in:
parent
44b0ff2ac3
commit
cdccb78b7e
@ -17,6 +17,7 @@ print_help () {
|
||||
echo " [--quick]"
|
||||
echo " [--raw]"
|
||||
echo " [--dev-build]"
|
||||
echo " [--with-compiler <compiler exe name>]"
|
||||
echo " [--cabal-build-options <options>]"
|
||||
echo " [--rtsopts <opts>]"
|
||||
echo " [--compare] [--base <commit>] [--candidate <commit>]"
|
||||
@ -297,6 +298,7 @@ do
|
||||
--fields) shift; FIELDS=$1; shift ;;
|
||||
--base) shift; BASE=$1; shift ;;
|
||||
--candidate) shift; CANDIDATE=$1; shift ;;
|
||||
--with-compiler) shift; CABAL_WITH_COMPILER=$1; shift ;;
|
||||
--cabal-build-flags) shift; CABAL_BUILD_OPTIONS+=$1; shift ;;
|
||||
--cabal-build-options) shift; CABAL_BUILD_OPTIONS+=$1; shift ;;
|
||||
--rtsopts) shift; RTS_OPTIONS=$1; shift ;;
|
||||
@ -317,6 +319,8 @@ do
|
||||
done
|
||||
GAUGE_ARGS=$*
|
||||
|
||||
set_derived_vars
|
||||
|
||||
#-----------------------------------------------------------------------------
|
||||
# Determine targets
|
||||
#-----------------------------------------------------------------------------
|
||||
|
@ -137,8 +137,6 @@ set_common_vars () {
|
||||
TARGET_EXE_ARGS=
|
||||
RTS_OPTIONS=
|
||||
|
||||
GHC_VERSION=$(ghc --numeric-version)
|
||||
|
||||
CABAL_BUILD_OPTIONS=""
|
||||
CABAL_EXECUTABLE=cabal
|
||||
|
||||
@ -155,6 +153,18 @@ set_common_vars () {
|
||||
fi
|
||||
}
|
||||
|
||||
# To be called after parsing CLI arguments
|
||||
set_derived_vars () {
|
||||
if test -n "$CABAL_WITH_COMPILER"
|
||||
then
|
||||
CABAL_BUILD_OPTIONS+=" --with-compiler $CABAL_WITH_COMPILER"
|
||||
else
|
||||
CABAL_WITH_COMPILER=ghc
|
||||
fi
|
||||
|
||||
GHC_VERSION=$($CABAL_WITH_COMPILER --numeric-version)
|
||||
}
|
||||
|
||||
# XXX cabal issue "cabal v2-exec which" cannot find benchmark/test executables
|
||||
|
||||
# $1: builddir
|
||||
|
@ -9,6 +9,7 @@ SCRIPT_DIR=$(dirname $0)
|
||||
print_help () {
|
||||
echo "Usage: $0 "
|
||||
echo " [--targets <"target1 target2 ..." | help>]"
|
||||
echo " [--with-compiler <compiler exe name>]"
|
||||
echo " [--cabal-build-options <option>]"
|
||||
echo " [--dev-build]"
|
||||
echo " [--coverage]"
|
||||
@ -52,6 +53,7 @@ do
|
||||
-h|--help|help) print_help ;;
|
||||
# options with arguments
|
||||
--targets) shift; TARGETS=$1; shift ;;
|
||||
--with-compiler) shift; CABAL_WITH_COMPILER=$1; shift ;;
|
||||
--cabal-build-options) shift; CABAL_BUILD_OPTIONS=$1; shift ;;
|
||||
--hpc-report-options) shift; HPC_REPORT_OPTIONS=$1; shift ;;
|
||||
--rtsopts) shift; RTS_OPTIONS=$1; shift ;;
|
||||
@ -69,6 +71,8 @@ do
|
||||
done
|
||||
TARGET_EXE_ARGS=$*
|
||||
|
||||
set_derived_vars
|
||||
|
||||
#-----------------------------------------------------------------------------
|
||||
# Determine targets
|
||||
#-----------------------------------------------------------------------------
|
||||
|
Loading…
Reference in New Issue
Block a user