X-Git-Url: http://git.megacz.com/?a=blobdiff_plain;ds=sidebyside;f=ghc%2Fcompiler%2Fmain%2FGHC.hs;h=fec3dfc4a72b707033c76b076415fcd44b4f8f01;hb=57d26da8cd35d248916a037c6934d4ef526e7e13;hp=2ff52295454e1cac565574f1c66d5844e135a163;hpb=26f300cea548cd8bbc9983975f95fa8a5d13384d;p=ghc-hetmet.git diff --git a/ghc/compiler/main/GHC.hs b/ghc/compiler/main/GHC.hs index 2ff5229..fec3dfc 100644 --- a/ghc/compiler/main/GHC.hs +++ b/ghc/compiler/main/GHC.hs @@ -365,7 +365,11 @@ guessOutputFile s = modifySession s $ \env -> let isMain = (== mainModIs dflags) . ms_mod [ms] <- return (filter isMain mod_graph) ml_hs_file (ms_location ms) +#if defined(mingw32_HOST_OS) + guessedName = fmap (\fname -> basenameOf fname `joinFileExt` "exe") mainModuleSrcPath +#else guessedName = fmap basenameOf mainModuleSrcPath +#endif in case outputFile dflags of Just _ -> env