bazel_7: restore xcode_locator no-arc fix, still needed

+33 -2
+6 -2
pkgs/development/tools/build-managers/bazel/bazel_7/default.nix
··· 214 ./darwin_sleep.patch 215 216 # Make DARWIN_XCODE_LOCATOR_COMPILE_COMMAND behave properly by diabling 217 - # multi-arch support (I could not get it to work) and using proper /usr/bin 218 - # paths that will get fixed below. 219 ./xcode_locator.patch 220 221 # On Darwin, the last argument to gcc is coming up as an empty string. i.e: ''
··· 214 ./darwin_sleep.patch 215 216 # Make DARWIN_XCODE_LOCATOR_COMPILE_COMMAND behave properly by diabling 217 + # multi-arch support and using proper /usr/bin paths that will get fixed 218 + # below. 219 + # Also, xcode_locator requires arc support, but it seems pretty difficult 220 + # to provide, so we disable it altogether for xcode_locator. Caveat: this 221 + # leaks memory, but we accept this fact because xcode_locator is only a 222 + # short-lived process used during the build. 223 ./xcode_locator.patch 224 225 # On Darwin, the last argument to gcc is coming up as an empty string. i.e: ''
+27
pkgs/development/tools/build-managers/bazel/bazel_7/xcode_locator.patch
··· 14 """ 15 16 genrule(
··· 14 """ 15 16 genrule( 17 + diff --git a/tools/osx/xcode_configure.bzl b/tools/osx/xcode_configure.bzl 18 + index a4a712a341..dfbf4869a9 100644 19 + --- a/tools/osx/xcode_configure.bzl 20 + +++ b/tools/osx/xcode_configure.bzl 21 + @@ -135,7 +135,6 @@ def run_xcode_locator(repository_ctx, xcode_locator_src_label): 22 + "macosx", 23 + "clang", 24 + "-mmacosx-version-min=10.13", 25 + - "-fobjc-arc", 26 + "-framework", 27 + "CoreServices", 28 + "-framework", 29 + diff --git a/tools/osx/xcode_locator.m b/tools/osx/xcode_locator.m 30 + index c602b0bb4b..1f7eb64810 100644 31 + --- a/tools/osx/xcode_locator.m 32 + +++ b/tools/osx/xcode_locator.m 33 + @@ -21,10 +21,6 @@ 34 + // 6,6.4,6.4.1 = 6.4.1 35 + // 6.3,6.3.0 = 6.3 36 + 37 + -#if !defined(__has_feature) || !__has_feature(objc_arc) 38 + -#error "This file requires ARC support." 39 + -#endif 40 + - 41 + #import <CoreServices/CoreServices.h> 42 + #import <Foundation/Foundation.h> 43 +