Commit 3741d17b authored by Dmitry Ivankov's avatar Dmitry Ivankov
Browse files

bazel_8: fix update for darwin

parent 52e51771
Loading
Loading
Loading
Loading
+0 −2
Original line number Diff line number Diff line
@@ -144,9 +144,7 @@ stdenv.mkDerivation rec {
    # Nixpkgs toolcahins do not support that (yet?) and get confused.
    # Also add an explicit /usr/bin prefix that will be patched below.
    (replaceVars ./patches/xcode.patch {
      usrBinEnv = "${coreutils}/bin/env";
      clangDarwin = "${stdenv.cc}/bin/clang";
      codesign = "${darwin.sigtool}/bin/codesign";
    })

    # Revert preference for apple_support over rules_cc toolchain for now
+2 −2
Original line number Diff line number Diff line
@@ -8,11 +8,11 @@ index b3dde1c838..a54bf8141d 100644
 
-# Depend on apple_support first and then rules_cc so that the Xcode toolchain
-# from apple_support wins over the generic Unix toolchain from rules_cc.
-bazel_dep(name = "apple_support", version = "1.18.1")
-bazel_dep(name = "apple_support", version = "1.23.1")
+# Not Depend on apple_support first and then rules_cc so that the Xcode toolchain
+# from apple_support not wins over the generic Unix toolchain from rules_cc.
 bazel_dep(name = "rules_cc", version = "0.1.1")
+bazel_dep(name = "apple_support", version = "1.18.1")
+bazel_dep(name = "apple_support", version = "1.23.1")
 
 # repo_name needs to be used, until WORKSPACE mode is to be supported in bazel_tools
 bazel_dep(name = "protobuf", version = "29.0", repo_name = "com_google_protobuf")
+3 −7
Original line number Diff line number Diff line
@@ -12,20 +12,16 @@ index 1bad14cba7..d312fe08bb 100755
   cp tools/osx/xcode_locator_stub.sh ${ARCHIVE_DIR}/xcode-locator
 fi
diff --git a/tools/osx/BUILD b/tools/osx/BUILD
index 0358fb0ffe..1e6eae1f33 100644
index 5b99589ad4..3d3269772b 100644
--- a/tools/osx/BUILD
+++ b/tools/osx/BUILD
@@ -27,9 +27,9 @@ exports_files([
@@ -27,7 +27,7 @@ exports_files([
 ])
 
 DARWIN_XCODE_LOCATOR_COMPILE_COMMAND = """
-  /usr/bin/xcrun --sdk macosx clang -mmacosx-version-min=10.13 -fobjc-arc -framework CoreServices \
-      -framework Foundation -arch arm64 -arch x86_64 -Wl,-no_adhoc_codesign -Wl,-no_uuid -o $@ $< && \
-  env -i codesign --identifier $@ --force --sign - $@
+  @clangDarwin@ -mmacosx-version-min=10.13 -fobjc-arc -framework CoreServices \
+      -framework Foundation -Wl,-no_adhoc_codesign -Wl,-no_uuid -o $@ $< && \
+  @usrBinEnv@ @codesign@ --identifier $@ --force --sign - $@
       -framework Foundation -arch arm64 -arch x86_64 -o $@ $<
 """
 
 genrule(