bazel_7: restore xcode_locator patch from no-arc patch

+21 -43
+5
pkgs/development/tools/build-managers/bazel/bazel_7/default.nix
··· 213 213 # I do not know yet how to allow IOPMAssertion{CreateWithName,Release} 214 214 ./darwin_sleep.patch 215 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 + 216 221 # On Darwin, the last argument to gcc is coming up as an empty string. i.e: '' 217 222 # This is breaking the build of any C target. This patch removes the last 218 223 # argument if it's found to be an empty string.
-43
pkgs/development/tools/build-managers/bazel/bazel_7/no-arc.patch
··· 1 - diff --git a/tools/osx/BUILD b/tools/osx/BUILD 2 - index 0358fb0ffe..baae1bf65b 100644 3 - --- a/tools/osx/BUILD 4 - +++ b/tools/osx/BUILD 5 - @@ -27,9 +27,8 @@ exports_files([ 6 - ]) 7 - 8 - DARWIN_XCODE_LOCATOR_COMPILE_COMMAND = """ 9 - - /usr/bin/xcrun --sdk macosx clang -mmacosx-version-min=10.13 -fobjc-arc -framework CoreServices \ 10 - - -framework Foundation -arch arm64 -arch x86_64 -Wl,-no_adhoc_codesign -Wl,-no_uuid -o $@ $< && \ 11 - - env -i codesign --identifier $@ --force --sign - $@ 12 - + /usr/bin/xcrun --sdk macosx clang -framework CoreServices -framework Foundation -Wl,-no_uuid -o $@ $< && \ 13 - + /usr/bin/env -i /usr/bin/codesign --identifier $@ --force --sign - $@ 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 -
+16
pkgs/development/tools/build-managers/bazel/bazel_7/xcode_locator.patch
··· 1 + diff --git a/tools/osx/BUILD b/tools/osx/BUILD 2 + index 0358fb0ffe..baae1bf65b 100644 3 + --- a/tools/osx/BUILD 4 + +++ b/tools/osx/BUILD 5 + @@ -27,9 +27,8 @@ exports_files([ 6 + ]) 7 + 8 + DARWIN_XCODE_LOCATOR_COMPILE_COMMAND = """ 9 + - /usr/bin/xcrun --sdk macosx clang -mmacosx-version-min=10.13 -fobjc-arc -framework CoreServices \ 10 + - -framework Foundation -arch arm64 -arch x86_64 -Wl,-no_adhoc_codesign -Wl,-no_uuid -o $@ $< && \ 11 + - env -i codesign --identifier $@ --force --sign - $@ 12 + + /usr/bin/xcrun --sdk macosx clang -framework CoreServices -framework Foundation -Wl,-no_uuid -o $@ $< && \ 13 + + /usr/bin/env -i /usr/bin/codesign --identifier $@ --force --sign - $@ 14 + """ 15 + 16 + genrule(