Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix build breakage on macOS when XCode is not installed. #223

Merged
merged 3 commits into from
May 1, 2018
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions haskell/toolchain.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,14 @@ def _haskell_toolchain_impl(ctx):
"strip": ctx.host_fragments.cpp.strip_executable,
} + ghc_binaries

# If running on darwin but XCode is not installed (i.e., only the Command
# Line Tools are available), then Bazel will make ar_executable point to
# "/usr/bin/libtool". Since we call ar directly, override it.
# TODO: remove this if Bazel fixes its behavior.
# Upstream ticket: https://github.com/bazelbuild/bazel/issues/5127.
if targets_r["ar"].find("libtool") >= 0:
targets_r["ar"] = "/usr/bin/ar"

ar_runfiles = []

# "xcrunwrapper.sh" is a Bazel-generated dependency of the `ar` program on macOS.
Expand Down