mirror of
https://github.com/digital-asset/daml.git
synced 2024-09-20 09:17:43 +03:00
93d8e01db2
* Update rules_haskell and static GHC Remove patches that have been upstreamed or are no longer required. Update still required patches to match the new rules_haskell version. Previously we patched rules_haskell to coerce GHC into using static Haskell libraries in most places. In particular we moved hs-libraries entries into extra-libraries entries in the package configuration files. A much cleaner approach is to compile GHC with a static RTS, then GHC will by itself choose to load static Haskell libraries. * Remove haskell_cc_import * da-hs-daml-cli -> daml-cli * da-hs-damlc-app -> damlc-app
20 lines
790 B
Diff
20 lines
790 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 3a58776..69852f0 100644
|
|
--- a/haskell/ghc_bindist.bzl
|
|
+++ b/haskell/ghc_bindist.bzl
|
|
@@ -258,6 +258,12 @@ haskell_toolchain(
|
|
haddock_flags = ctx.attr.haddock_flags,
|
|
repl_ghci_args = ctx.attr.repl_ghci_args,
|
|
)
|
|
+
|
|
+ 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/libpthread.dll.a"])
|
|
+ _execute_fail_loudly(ctx, ["rm", "mingw/x86_64-w64-mingw32/lib/libwinpthread.dll.a"])
|
|
+
|
|
ctx.template(
|
|
"BUILD",
|
|
ghc_build,
|