Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Build and run damlc on Windows (#568)
* 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
- Loading branch information
1 parent
29123c7
commit f57c74d
Showing
8 changed files
with
65 additions
and
14 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
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, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters