WebGHC/wasm-cross

Cannot build libraries via nix generic-builder

Closed this issue · 4 comments

While building libraries using nix, it errors out during linking due to WebGHC/ghc#7

I think it is due to -staticlib flag.

This flag might be redundant as the libraries built via cabal (without -staticlib) seem to work fine.

Hm. I don't see -staticlib being passed anywhere in generic-builder. Is this a generic-builder thing or a Cabal thing?

I think is the one causing this.

generic-builder.nix

# --enable-static does not work on windows. This is a bug in GHC.
# --enable-static will pass -staticlib to ghc, which only works for mach-o and elf.
assert hostPlatform.isWindows -> enableStaticLibraries == false;

That's just an assertion. It can't change what actually happens in the build.

Oh but I see what you mean now. We need to make sure we're not passing --enable-static to cabal