-
Notifications
You must be signed in to change notification settings - Fork 81
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Bazelify compiler's global package database
Exposing GHC's global package database to Bazel enables us to stop treating prebuilt libraries specially. They now export a `HaskellLibraryInfo` like any other library. Even better, they now also export a `CcInfo` provider like any other native code library, which means that CC rules have a full view of all static archives needed for linking a binary statically (see the `cc_haskell_import` test, which no longer requires `linkstatic = False`). `HaskellPrebuiltPackageInfo` is still there but now has no content. It's only there to prevent aspects from reaching too far. We'll get rid of it in future commits. Fixes #838
- Loading branch information
Showing
34 changed files
with
573 additions
and
172 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
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 was deleted.
Oops, something went wrong.
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
This file was deleted.
Oops, something went wrong.
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,45 @@ | ||
load( | ||
"@io_tweag_rules_haskell//haskell:haskell.bzl", | ||
"haskell_import", | ||
"haskell_toolchain", | ||
) | ||
|
||
%{toolchain} | ||
|
||
filegroup( | ||
name = "bin", | ||
srcs = glob(["bin/*"]), | ||
) | ||
|
||
# Expose embedded MinGW toolchain when on Windows. | ||
|
||
filegroup( | ||
name = "empty", | ||
srcs = [], | ||
) | ||
|
||
cc_toolchain_suite( | ||
name = "cc_toolchain", | ||
toolchains = { | ||
"x64_windows": ":cc-compiler-mingw64", | ||
"x64_windows|ghc-mingw-gcc": ":cc-compiler-mingw64", | ||
}, | ||
visibility = ["//visibility:public"], | ||
) | ||
|
||
# Keep in sync with @bazel_tools//cpp:cc-compiler-x64_windows definition. | ||
cc_toolchain( | ||
name = "cc-compiler-mingw64", | ||
all_files = ":empty", | ||
ar_files = ":empty", | ||
as_files = ":empty", | ||
compiler_files = ":empty", | ||
cpu = "x64_windows", | ||
dwp_files = ":empty", | ||
linker_files = ":empty", | ||
objcopy_files = ":empty", | ||
strip_files = ":empty", | ||
supports_param_files = 0, | ||
toolchain_identifier = "ghc_windows_mingw64", | ||
visibility = ["//visibility:public"], | ||
) |
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
Oops, something went wrong.