Skip to content
Snippets Groups Projects
Commit 7996317b authored by Rodrigo Mesquita's avatar Rodrigo Mesquita :seedling:
Browse files

fixup! Windows builtin toolchain

parent c8e21124
No related merge requests found
Pipeline #81121 failed
......@@ -6,7 +6,7 @@
AC_DEFUN([SUBST_TOOLDIR],
[
dnl See Note [tooldir: How GHC finds mingw on Windows]
$1=`echo $1 | sed 's%'"$mingwpath"'%$$tooldir/mingw%'`
$1=`echo $$1 | sed 's%'"$mingwpath"'%$$tooldir/mingw%'`
])
# FP_SETTINGS
......
......@@ -120,6 +120,8 @@ AC_DEFUN([FP_SETUP_WINDOWS_TOOLCHAIN],[
RANLIB="${mingwbin}llvm-ranlib.exe"
OBJDUMP="${mingwbin}llvm-objdump.exe"
DLLTOOL="${mingwbin}llvm-dlltool.exe"
DllWrapCmd="${mingwbin}llvm-dllwrap.exe"
WindresCmd="${mingwbin}llvm-windres.exe"
# N.B. LLD does not support -r
MergeObjsCmd=""
......
......@@ -94,7 +94,7 @@ AC_DEFUN([FIND_GHC_TOOLCHAIN],
echo "--ar=$AR" >> acargs
echo "--ranlib=$RANLIB" >> acargs
echo "--nm=$NM" >> acargs
echo "--merge-objs=$SettingsMergeObjectsCommand" >> acargs
echo "--merge-objs=$MergeObjsCmd" >> acargs
echo "--readelf=$READELF" >> acargs
echo "--windres=$WindresCmd" >> acargs
echo "--dllwrap=$DllWrapCmd" >> acargs
......
......@@ -2,7 +2,7 @@
# =========================
#
# Issue a substitution of [$1MaybeProg] with
# * Nothing, if $1 is /bin/false (this is unfortunately hardcoded since SettingsDllWrapCommand and SettingsWindresCommand get set to this on windows).
# * Nothing, if $1 is empty
# * Just (Program {prgPath = "$$1", prgFlags = []}), otherwise
#
# $1 = optional value
......
......@@ -34,6 +34,8 @@ import qualified Control.Monad.Trans.Reader as Reader
import qualified Control.Monad.Trans.Except as Except
import System.IO hiding (readFile, writeFile, appendFile)
-- import qualified System.Directory
import qualified Data.Text as T
import qualified Data.Text.IO as T
data Env = Env { verbosity :: Int
......@@ -100,7 +102,7 @@ logMsg v msg = do
when (verbosity e >= v) (liftIO $ hPutStrLn stderr $ indent ++ msg)
readFile :: FilePath -> M String
readFile path = liftIO $ Prelude.readFile path
readFile path = liftIO $ T.unpack <$> T.readFile path
writeFile :: FilePath -> String -> M ()
writeFile path s = liftIO $ Prelude.writeFile path s
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment