Skip to content

Commit

Permalink
Fix missing include directory making hsc2hs fail
Browse files Browse the repository at this point in the history
  • Loading branch information
avdv committed Aug 2, 2023
1 parent ec0f225 commit 2da33a5
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions haskell/ghc_bindist.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -164,6 +164,15 @@ include Makefile""")
working_directory = unpack_dir,
)

unpack_include_dir = ctx.path(paths.join(unpack_dir, "include"))
bindist_include_dir = ctx.path(paths.join(str(bindist_dir), "include"))

# if the `make install` step above did not create the `include` directory, symlink it
# to the `include` directory when it exists in the distribution
# see https://gitlab.haskell.org/ghc/ghc/-/issues/23769
if unpack_include_dir.exists and not bindist_include_dir.exists:
ctx.symlink(unpack_include, bindist_include)

if not is_hadrian_dist:
ctx.file(paths.join(unpack_dir, "patch_bins"), executable = True, content = r"""#!/usr/bin/env bash
find bin -type f -print0 | xargs -0 \
Expand Down

0 comments on commit 2da33a5

Please sign in to comment.