haskellPackages: include pthread libraries when using the external interpreter on Windows
Fixes errors: - user specified .o/.so/.DLL could not be loaded (addDLL: pthread or dependencies not loaded. (Win32 error 126)) - iserv-proxy-interpreter.exe:Couldnotload`libwinpthread-1.dll'.Reason:addDLL:libwinpthread-1.dllordependenciesnotloaded.(Win32error126)
This commit is contained in:
@@ -13,6 +13,7 @@
|
||||
haskellLib,
|
||||
iserv-proxy,
|
||||
nodejs,
|
||||
windows,
|
||||
writeShellScriptBin,
|
||||
}:
|
||||
|
||||
@@ -358,11 +359,17 @@ let
|
||||
++ optional (allPkgconfigDepends != [ ]) "--with-pkg-config=${pkg-config.targetPrefix}pkg-config"
|
||||
|
||||
++ optionals enableExternalInterpreter (
|
||||
map (opt: "--ghc-option=${opt}") [
|
||||
"-fexternal-interpreter"
|
||||
"-pgmi"
|
||||
crossSupport.iservWrapper
|
||||
]
|
||||
map (opt: "--ghc-option=${opt}") (
|
||||
[
|
||||
"-fexternal-interpreter"
|
||||
"-pgmi"
|
||||
crossSupport.iservWrapper
|
||||
]
|
||||
++ lib.optionals stdenv.hostPlatform.isWindows [
|
||||
"-L${windows.pthreads}/bin"
|
||||
"-L${windows.pthreads}/lib"
|
||||
]
|
||||
)
|
||||
);
|
||||
|
||||
makeGhcOptions = opts: lib.concatStringsSep " " (map (opt: "--ghc-option=${opt}") opts);
|
||||
|
||||
Reference in New Issue
Block a user