diff options
| author | Guillaume Maudoux <guillaume.maudoux@tweag.io> | 2023-12-13 23:16:33 +0100 |
|---|---|---|
| committer | github-actions[bot] <github-actions[bot]@users.noreply.github.com> | 2024-01-02 08:19:48 +0000 |
| commit | 023bbfce4f1990d8bcedbcabe7c04f597911b247 (patch) | |
| tree | 31f063f2cd055cb52715fdc4d7a570fafa751b5f | |
| parent | bazel_7: restore xcode_locator patch from no-arc patch (diff) | |
| download | nixpkgs-023bbfce4f1990d8bcedbcabe7c04f597911b247.tar.gz | |
bazel_7: restore xcode_locator no-arc fix, still needed
(cherry picked from commit 6d93cdd566ac2d809458bae328ed5b08dd7ba91b)
| -rw-r--r-- | pkgs/development/tools/build-managers/bazel/bazel_7/default.nix | 8 | ||||
| -rw-r--r-- | pkgs/development/tools/build-managers/bazel/bazel_7/xcode_locator.patch | 27 |
2 files changed, 33 insertions, 2 deletions
diff --git a/pkgs/development/tools/build-managers/bazel/bazel_7/default.nix b/pkgs/development/tools/build-managers/bazel/bazel_7/default.nix index f3382365f2d9..3802eadc3e12 100644 --- a/pkgs/development/tools/build-managers/bazel/bazel_7/default.nix +++ b/pkgs/development/tools/build-managers/bazel/bazel_7/default.nix @@ -214,8 +214,12 @@ stdenv.mkDerivation rec { ./darwin_sleep.patch # Make DARWIN_XCODE_LOCATOR_COMPILE_COMMAND behave properly by diabling - # multi-arch support (I could not get it to work) and using proper /usr/bin - # paths that will get fixed below. + # multi-arch support and using proper /usr/bin paths that will get fixed + # below. + # Also, xcode_locator requires arc support, but it seems pretty difficult + # to provide, so we disable it altogether for xcode_locator. Caveat: this + # leaks memory, but we accept this fact because xcode_locator is only a + # short-lived process used during the build. ./xcode_locator.patch # On Darwin, the last argument to gcc is coming up as an empty string. i.e: '' diff --git a/pkgs/development/tools/build-managers/bazel/bazel_7/xcode_locator.patch b/pkgs/development/tools/build-managers/bazel/bazel_7/xcode_locator.patch index 366cf474a911..5712c12f2bed 100644 --- a/pkgs/development/tools/build-managers/bazel/bazel_7/xcode_locator.patch +++ b/pkgs/development/tools/build-managers/bazel/bazel_7/xcode_locator.patch @@ -14,3 +14,30 @@ index 0358fb0ffe..baae1bf65b 100644 """ genrule( +diff --git a/tools/osx/xcode_configure.bzl b/tools/osx/xcode_configure.bzl +index a4a712a341..dfbf4869a9 100644 +--- a/tools/osx/xcode_configure.bzl ++++ b/tools/osx/xcode_configure.bzl +@@ -135,7 +135,6 @@ def run_xcode_locator(repository_ctx, xcode_locator_src_label): + "macosx", + "clang", + "-mmacosx-version-min=10.13", +- "-fobjc-arc", + "-framework", + "CoreServices", + "-framework", +diff --git a/tools/osx/xcode_locator.m b/tools/osx/xcode_locator.m +index c602b0bb4b..1f7eb64810 100644 +--- a/tools/osx/xcode_locator.m ++++ b/tools/osx/xcode_locator.m +@@ -21,10 +21,6 @@ + // 6,6.4,6.4.1 = 6.4.1 + // 6.3,6.3.0 = 6.3 + +-#if !defined(__has_feature) || !__has_feature(objc_arc) +-#error "This file requires ARC support." +-#endif +- + #import <CoreServices/CoreServices.h> + #import <Foundation/Foundation.h> + |
