Skip to content

Commit

Permalink
Also apply HSrts normalization to static lib
Browse files Browse the repository at this point in the history
  • Loading branch information
avdv committed Jun 5, 2024
1 parent d67085d commit a776c9b
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions haskell/toolchain.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -262,6 +262,16 @@ def _haskell_toolchain_libraries(ctx, libraries):
libs[libname] = {"dynamic": lib}
for lib in target[HaskellImportHack].static_libraries.to_list():
name = get_static_hs_lib_name(with_profiling, lib)

# with GHC >= 9.4.1 the rts library has a version number
# included in the name.
# for handling single-threaded and threading variants below,
# we normalize the name and strip the version number
if name.startswith("HSrts-"):
idx = name.find("_")
suffix = name[idx:] if idx > 0 else ""
name = "HSrts" + suffix

entry = libs.get(name, {})
entry["static"] = lib
libs[name] = entry
Expand Down

0 comments on commit a776c9b

Please sign in to comment.