feat(haskell build): export configure variables in setup toolchain step
Signed-off-by: Aditya Alok <dev.aditya.alok@gmail.com>
This commit is contained in:
parent
f58de40f2e
commit
f21125b33a
@ -105,16 +105,10 @@ termux_step_configure_haskell_build() {
|
||||
AVOID_GNULIB+=" gl_cv_header_working_fcntl_h=yes"
|
||||
AVOID_GNULIB+=" gl_cv_C_locale_sans_EILSEQ=yes"
|
||||
|
||||
LLVM_BACKEND=""
|
||||
[ "${TERMUX_ARCH}" != "i686" ] && {
|
||||
LLVM_BACKEND="-fllvm --ghc-option=-fllvm"
|
||||
}
|
||||
[ "$TERMUX_DEBUG_BUILD" = "true" ] && OPTIMISATION="-O0" || OPTIMISATION="-O"
|
||||
|
||||
# NOTE: We do not want to quote AVOID_GNULIB as we want word expansion.
|
||||
# shellcheck disable=SC2086
|
||||
env $AVOID_GNULIB termux-ghc-setup configure \
|
||||
$OPTIMISATION \
|
||||
$TERMUX_HASKELL_OPTIMISATION \
|
||||
--prefix=$TERMUX_PREFIX \
|
||||
--configure-option=--disable-rpath \
|
||||
--configure-option=--disable-rpath-hack \
|
||||
@ -134,7 +128,7 @@ termux_step_configure_haskell_build() {
|
||||
--extra-include-dirs=$TERMUX_PREFIX/include \
|
||||
--extra-lib-dirs=$TERMUX_PREFIX/lib \
|
||||
--disable-tests \
|
||||
$LLVM_BACKEND \
|
||||
$TERMUX_HASKELL_LLVM_BACKEND \
|
||||
$SPLIT_SECTIONS \
|
||||
$EXECUTABLE_STRIPPING \
|
||||
$LIB_STRIPPING \
|
||||
|
@ -18,6 +18,16 @@ termux_step_setup_toolchain() {
|
||||
export STRIP=llvm-strip
|
||||
export NM=llvm-nm
|
||||
|
||||
export TERMUX_HASKELL_LLVM_BACKEND="-fllvm --ghc-option=-fllvm"
|
||||
if [ "${TERMUX_ARCH}" = "i686" ]; then
|
||||
TERMUX_HASKELL_LLVM_BACKEND=""
|
||||
fi
|
||||
|
||||
export TERMUX_HASKELL_OPTIMISATION="-O"
|
||||
if [ "${TERMUX_DEBUG_BUILD}" = true ]; then
|
||||
TERMUX_HASKELL_OPTIMISATION="-O0"
|
||||
fi
|
||||
|
||||
if [ "$TERMUX_ON_DEVICE_BUILD" = "false" ]; then
|
||||
export PATH=$TERMUX_STANDALONE_TOOLCHAIN/bin:$PATH
|
||||
export CC_FOR_BUILD=gcc
|
||||
|
Loading…
Reference in New Issue
Block a user