summaryrefslogtreecommitdiff
path: root/compiler/GHC/Driver/Make.hs
diff options
context:
space:
mode:
Diffstat (limited to 'compiler/GHC/Driver/Make.hs')
-rw-r--r--compiler/GHC/Driver/Make.hs7
1 files changed, 4 insertions, 3 deletions
diff --git a/compiler/GHC/Driver/Make.hs b/compiler/GHC/Driver/Make.hs
index 25e2bdad9e..0d1cf892bd 100644
--- a/compiler/GHC/Driver/Make.hs
+++ b/compiler/GHC/Driver/Make.hs
@@ -788,9 +788,10 @@ guessOutputFile = modifySession $ \env ->
-- we must add the .exe extension unconditionally here, otherwise
-- when name has an extension of its own, the .exe extension will
-- not be added by GHC.Driver.Pipeline.exeFileName. See #2248
- !name' <- if platformOS platform == OSMinGW32
- then fmap (<.> "exe") name
- else name
+ !name' <- case platformArchOS platform of
+ ArchOS _ OSMinGW32 -> fmap (<.> "exe") name
+ ArchOS ArchWasm32 _ -> fmap (<.> "wasm") name
+ _ -> name
mainModuleSrcPath' <- mainModuleSrcPath
-- #9930: don't clobber input files (unless they ask for it)
if name' == mainModuleSrcPath'