Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: NixOS/nixpkgs
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: 84aa023cf4c5
Choose a base ref
...
head repository: NixOS/nixpkgs
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: 5ac5f503b2a0
Choose a head ref
  • 1 commit
  • 1 file changed
  • 1 contributor

Commits on Apr 8, 2020

  1. bazel_0_26: fix linker flags for darwin (#84614)

    Same as done for bazel_0_29 in d1ee615:
    
    (cherry picked from commit 677b2d8)
    mikesperber authored and veprbl committed Apr 8, 2020

    Verified

    This commit was signed with the committer’s verified signature.
    veprbl Dmitry Kalinkin
    Copy the full SHA
    5ac5f50 View commit details
Showing with 10 additions and 2 deletions.
  1. +10 −2 pkgs/development/tools/build-managers/bazel/bazel_0_26/default.nix
12 changes: 10 additions & 2 deletions pkgs/development/tools/build-managers/bazel/bazel_0_26/default.nix
Original file line number Diff line number Diff line change
@@ -161,6 +161,14 @@ stdenv.mkDerivation rec {
postPatch = let

darwinPatches = ''
bazelLinkFlags () {
eval set -- "$NIX_LDFLAGS"
local flag
for flag in "$@"; do
printf ' -Wl,%s' "$flag"
done
}
# Disable Bazel's Xcode toolchain detection which would configure compilers
# and linkers from Xcode instead of from PATH
export BAZEL_USE_CPP_ONLY_TOOLCHAIN=1
@@ -170,14 +178,14 @@ stdenv.mkDerivation rec {
# Framework search paths aren't added by bintools hook
# https://github.com/NixOS/nixpkgs/pull/41914
export NIX_LDFLAGS="$NIX_LDFLAGS -F${CoreFoundation}/Library/Frameworks -F${CoreServices}/Library/Frameworks -F${Foundation}/Library/Frameworks"
export NIX_LDFLAGS+=" -F${CoreFoundation}/Library/Frameworks -F${CoreServices}/Library/Frameworks -F${Foundation}/Library/Frameworks"
# libcxx includes aren't added by libcxx hook
# https://github.com/NixOS/nixpkgs/pull/41589
export NIX_CFLAGS_COMPILE="$NIX_CFLAGS_COMPILE -isystem ${libcxx}/include/c++/v1"
# don't use system installed Xcode to run clang, use Nix clang instead
sed -i -e "s;/usr/bin/xcrun clang;${stdenv.cc}/bin/clang $NIX_CFLAGS_COMPILE $NIX_LDFLAGS -framework CoreFoundation;g" \
sed -i -E "s;/usr/bin/xcrun (--sdk macosx )?clang;${stdenv.cc}/bin/clang $NIX_CFLAGS_COMPILE $(bazelLinkFlags) -framework CoreFoundation;g" \
scripts/bootstrap/compile.sh \
src/tools/xcode/realpath/BUILD \
src/tools/xcode/stdredirect/BUILD \