Skip to content

Conversation

@aherrmann
Copy link
Member

  • Properly pass the CC toolchain to cabal #1325 changed the Cabal build directory to fix dangling relative RUNPATH entries in Cabal build outputs. The lengthens the path to the build directory which can cause build failures when the path exceeds MAX_PATH on Windows. Since we don't use dynamic Haskell libraries on Windows, we can stick to a shorter build directory path on Windows.
  • The cc_wrapper's logic to fix RUNPATHs in temporary outputs of GHC didn't work in a working directory outside of the Bazel execroot as is the case in Cabal builds. This triggered build failures with intermediate outputs exceeding the MACH-O header size limit on MacOS, see Setup ghcide for rules_haskell repository #1262 (comment). This PR extends the corresponding logic in the cc_wrapper to look for the solib directory under the execroot which can be specified by Cabal wrapper via an environment variable.

@thufschmitt thufschmitt added the merge-queue merge on green CI label Jun 4, 2020
aherrmann added 2 commits June 4, 2020 09:39
To enable cc_wrapper to determine the path to the `_solib_<cpu>`
directory also when executing outside the execroot directory.
@mergify mergify bot merged commit b3a7f9e into master Jun 4, 2020
@mergify mergify bot deleted the cc-wrapper branch June 4, 2020 10:13
@mergify mergify bot removed the merge-queue merge on green CI label Jun 4, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants