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

Use libtool from nixpkgs #321

Merged
merged 1 commit into from
Feb 10, 2023
Merged
Show file tree
Hide file tree
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
2 changes: 1 addition & 1 deletion toolchains/cc/cc.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -175,7 +175,7 @@ def _nixpkgs_cc_toolchain_config_impl(repository_ctx):
)
if darwin:
info.tool_paths["gcc"] = "cc_wrapper.sh"
info.tool_paths["ar"] = "/usr/bin/libtool"
info.tool_paths["ar"] = info.tool_paths["libtool"]
write_builtin_include_directory_paths(
repository_ctx,
info.tool_paths["gcc"],
Expand Down
4 changes: 2 additions & 2 deletions toolchains/cc/cc.nix
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ let
name = "bazel-nixpkgs-cc";
# XXX: `gcov` is missing in `/bin`.
# It exists in `stdenv.cc.cc` but that collides with `stdenv.cc`.
paths = [ cc cc.bintools ];
paths = [ cc cc.bintools ] ++ pkgs.lib.optional pkgs.stdenv.isDarwin pkgs.darwin.cctools;
pathsToLink = [ "/bin" ];
passthru = {
isClang = cc.isClang;
Expand All @@ -84,7 +84,7 @@ pkgs.runCommand "bazel-nixpkgs-cc-toolchain"
# Determine toolchain tool paths.
#
# If a tool is not available then we use `bin/false` as a stand-in.
declare -A TOOLS=( [ar]=ar [cpp]=cpp [dwp]=dwp [gcc]=cc [gcov]=gcov [llvm-cov]=llvm-cov [ld]=ld [nm]=nm [objcopy]=objcopy [objdump]=objdump [strip]=strip )
declare -A TOOLS=( [ar]=ar [cpp]=cpp [dwp]=dwp [gcc]=cc [gcov]=gcov [llvm-cov]=llvm-cov [ld]=ld [libtool]=libtool [nm]=nm [objcopy]=objcopy [objdump]=objdump [strip]=strip )
TOOL_NAMES=(''${!TOOLS[@]})
declare -A TOOL_PATHS=()
for tool_name in ''${!TOOLS[@]}; do
Expand Down