daml/bazel_tools/haskell-cffi.patch

26 lines
1.1 KiB
Diff
Raw Normal View History

From 5210265a3b95327038865b0c8a6cc3cf982626e6 Mon Sep 17 00:00:00 2001
From: Andreas Herrmann <andreas.herrmann@tweag.io>
Date: Tue, 25 Feb 2020 18:02:38 +0100
Subject: [PATCH] Explicitly check for "Cffi" in `is_hs_library`
---
haskell/private/path_utils.bzl | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/haskell/private/path_utils.bzl b/haskell/private/path_utils.bzl
index 2327c3aa..5e0a986e 100644
--- a/haskell/private/path_utils.bzl
+++ b/haskell/private/path_utils.bzl
@@ -187,7 +187,7 @@ def is_hs_library(lib):
# linked against directly, but rather through the package configuration. In
# particular ffi, if included in the GHC bindist, comes in different
# flavours for different GHC ways (e.g. threaded).
- return libname.startswith("HS") or lib.owner == Label("@rules_haskell//haskell:toolchain-libraries")
+ return libname.startswith("HS") or libname == "Cffi" or lib.owner == Label("@rules_haskell//haskell:toolchain-libraries")
def get_dynamic_hs_lib_name(ghc_version, lib):
"""Return name of library by dropping extension,
--
2.20.1