bazel_4: Fix Bazel-built protoc segfault on macOS Monterey ()

This was fixed by enabling the user_link_flags_feature for macosx cc_toolchain_config.

References:
- https://github.com/bazelbuild/bazel/issues/14216
- https://github.com/bazelbuild/bazel/pull/14275
This commit is contained in:
Wael Nasreddine 2021-11-24 10:55:14 -08:00 committed by GitHub
parent 86c48e88b0
commit c691e088d7
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -1,4 +1,4 @@
{ stdenv, callPackage, lib, fetchurl, fetchFromGitHub, installShellFiles { stdenv, callPackage, lib, fetchurl, fetchpatch, fetchFromGitHub, installShellFiles
, runCommand, runCommandCC, makeWrapper, recurseIntoAttrs , runCommand, runCommandCC, makeWrapper, recurseIntoAttrs
# this package (through the fixpoint glass) # this package (through the fixpoint glass)
, bazel_self , bazel_self
@ -214,6 +214,14 @@ stdenv.mkDerivation rec {
src = ../bazel_rc.patch; src = ../bazel_rc.patch;
bazelSystemBazelRCPath = bazelRC; bazelSystemBazelRCPath = bazelRC;
}) })
# On macOS Monterey, protoc segfaults.
# Issue: https://github.com/bazelbuild/bazel/issues/14216
# Fix: https://github.com/bazelbuild/bazel/pull/14275
(fetchpatch {
url = "https://github.com/bazelbuild/bazel/commit/ae0a6c98d4f94abedbedb2d51c27de5febd7df67.patch";
sha256 = "sha256-YcdxqjTMGI86k1wgFqxJqghv0kknAjlFQFpt4VccCTE=";
})
] ++ lib.optional enableNixHacks ../nix-hacks.patch; ] ++ lib.optional enableNixHacks ../nix-hacks.patch;