Skip to content

Commit

Permalink
Add -resource-dir flag to nix-support/cc-cflags on Darwin
Browse files Browse the repository at this point in the history
This fixes a problem on Darwin when running `bazel coverage` failed because the
runtime profiling library (libclang_rt.profile_osx.a) was not found.

(see tweag/rules_haskell#1768)

Note, this sets the resource dir to the `/resource-root` directory of the
original wrapped `cc`; otherwise we would have to re-create this directory for
our own wrapper again.
  • Loading branch information
avdv committed Jul 12, 2022
1 parent a8e2978 commit 5f15973
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions toolchains/cc/cc.nix
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@ let
echo "-L${pkgs.llvmPackages.libcxxabi}/lib" >> $out/nix-support/cc-cflags
echo "-L${pkgs.libiconv}/lib" >> $out/nix-support/cc-cflags
echo "-L${pkgs.darwin.libobjc}/lib" >> $out/nix-support/cc-cflags
echo "-resource-dir=${pkgs.stdenv.cc}/resource-root" >> $out/nix-support/cc-cflags
'';
};
cc =
Expand Down

0 comments on commit 5f15973

Please sign in to comment.