The Xcode toolchain in `apple_support` used to be part of Bazel and was used to build Bazel itself back then. Since it has been moved to `apple_support`, Bazel has been building with the generic Unix toolchain, which isn't frequently used with Xcode and much less actively maintained than the one in `apple_support`. Switching back also gets rid of a number of warnings.
Also avoid compiling unused functions on macOS to get rid of the last C/C++ compilation warnings.
Closes #25388.
PiperOrigin-RevId: 731395289
Change-Id: Ia75e50dbe38d039be840ae9bc3d74bba41598d34