mirror of
https://github.com/digital-asset/daml.git
synced 2024-09-20 09:17:43 +03:00
f57c74d706
* Fix network build on Windows Some files were not added to the build, which led missing symbols at link time. * Drop dll.a files from Windows GHC bindist Those files greatly confuse GHC when linking statically. * Add some Windows system libraries These libraries are needed when linking GRPC. * Statically link pthread on Windows Otherwise the executables fail at runtime because they cannot find the shared object. * Build and run damlc on CI * Try to fix package_db/* nullglob error * Fix powershell command * Cleanup package db rule * Make formatting ugly again
19 lines
743 B
Diff
19 lines
743 B
Diff
The presence of files with `dll.a` extensions greatly confuses GHC, so we
|
|
remove them for the libraries we link in.
|
|
|
|
diff --git a/haskell/ghc_bindist.bzl b/haskell/ghc_bindist.bzl
|
|
index 941bf18..f9f3276 100644
|
|
--- a/haskell/ghc_bindist.bzl
|
|
+++ b/haskell/ghc_bindist.bzl
|
|
@@ -201,6 +201,10 @@ def _ghc_bindist_impl(ctx):
|
|
_execute_fail_loudly(ctx, ["./configure", "--prefix", bindist_dir.realpath])
|
|
_execute_fail_loudly(ctx, ["make", "install"])
|
|
|
|
+ if os == "windows":
|
|
+ _execute_fail_loudly(ctx, ["rm", "mingw/lib/gcc/x86_64-w64-mingw32/7.2.0/libstdc++.dll.a"])
|
|
+ _execute_fail_loudly(ctx, ["rm", "mingw/x86_64-w64-mingw32/lib/libwinpthread.dll.a"])
|
|
+
|
|
ctx.template(
|
|
"BUILD",
|
|
ghc_build,
|