Skip to content

Commit a3dff54

Browse files
committed
Enable shared libs for wasm
1 parent 98c396d commit a3dff54

File tree

3 files changed

+3
-3
lines changed

3 files changed

+3
-3
lines changed

builder/comp-builder.nix

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ let self =
4343
, hardeningDisable ? component.hardeningDisable
4444

4545
, enableStatic ? component.enableStatic
46-
, enableShared ? ghc.enableShared && component.enableShared && !haskellLib.isCrossHost
46+
, enableShared ? ghc.enableShared && component.enableShared && (!haskellLib.isCrossHost || stdenv.hostPlatform.isWasm)
4747
, enableExecutableDynamic ? component.enableExecutableDynamic && !stdenv.hostPlatform.isMusl
4848
, enableDeadCodeElimination ? component.enableDeadCodeElimination
4949
, writeHieFiles ? component.writeHieFiles

compiler/ghc/default.nix

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ let self =
3939

4040
, # Whether to build dynamic libs for the standard library (on the target
4141
# platform). Static libs are always built.
42-
enableShared ? !haskell-nix.haskellLib.isCrossTarget
42+
enableShared ? !haskell-nix.haskellLib.isCrossTarget || stdenv.targetPlatform.isWasm
4343

4444
, enableLibraryProfiling ? true
4545

overlays/wasm.nix

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ final: prev: prev.lib.optionalAttrs prev.stdenv.targetPlatform.isWasm {
4646
({ pkgs, ... }: {
4747
testWrapper = ["HOME=$(mktemp -d)" (pkgs.pkgsBuildBuild.wasmtime + "/bin/wasmtime")];
4848
package-keys = ["clock"];
49-
packages.clock.configureFlags = ["--ghc-option=-optc-Wno-int-conversion"];
49+
packages.clock.ghcOptions = ["-optc-Wno-int-conversion"];
5050
})
5151
];
5252
});

0 commit comments

Comments
 (0)