File tree 3 files changed +14
-5
lines changed
Cabal/src/Distribution/Simple 3 files changed +14
-5
lines changed Original file line number Diff line number Diff line change @@ -235,8 +235,9 @@ mkGenericSharedBundledLibName platform comp lib
235
235
-- | Default extension for executable files on the current platform.
236
236
-- (typically @\"\"@ on Unix and @\"exe\"@ on Windows or OS\/2)
237
237
exeExtension :: Platform -> String
238
- exeExtension (Platform _arch os) = case os of
239
- Windows -> " exe"
238
+ exeExtension platform = case platform of
239
+ Platform _ Windows -> " exe"
240
+ Platform Wasm32 _ -> " wasm"
240
241
_ -> " "
241
242
242
243
-- | Extension for object files. For GHC the extension is @\"o\"@.
Original file line number Diff line number Diff line change @@ -1535,12 +1535,13 @@ dropExeExtension filepath =
1535
1535
-- | List of possible executable file extensions on the current build
1536
1536
-- platform.
1537
1537
exeExtensions :: [String ]
1538
- exeExtensions = case buildOS of
1538
+ exeExtensions = case (buildArch, buildOS) of
1539
1539
-- Possible improvement: on Windows, read the list of extensions from the
1540
1540
-- PATHEXT environment variable. By default PATHEXT is ".com; .exe; .bat;
1541
1541
-- .cmd".
1542
- Windows -> [" " , " exe" ]
1543
- Ghcjs -> [" " , " exe" ]
1542
+ (_, Windows ) -> [" " , " exe" ]
1543
+ (_, Ghcjs ) -> [" " , " exe" ]
1544
+ (Wasm32 , _) -> [" " , " wasm" ]
1544
1545
_ -> [" " ]
1545
1546
1546
1547
-- ------------------------------------------------------------
Original file line number Diff line number Diff line change
1
+ synopsis: Specify default exe extension on wasm32 to be .wasm
2
+ packages: Cabal
3
+ prs: #8633
4
+ issues:
5
+ description: {
6
+ Specify default exe extension on wasm32 to be .wasm, following the convention in other WebAssembly toolchains.
7
+ }
You can’t perform that action at this time.
0 commit comments