Add -no_uuid for hermetic macOS toolchain setup
The content based uuid embedded by ld64 contains the basename of the
file being built. In the case of multiarch builds this filename is
randomly generated. This doesn't hit in all cases based on the order of
the arguments to clang, but since this shouldn't have a downside for
this use case, it's safer to exclude this for the future.
More conversation https://github.com/bazelbuild/bazel/pull/14168
Filed with apple as FB9727658
Closes #14190.
PiperOrigin-RevId: 407784532
diff --git a/tools/cpp/osx_cc_configure.bzl b/tools/cpp/osx_cc_configure.bzl
index a612308..4bfa618 100644
--- a/tools/cpp/osx_cc_configure.bzl
+++ b/tools/cpp/osx_cc_configure.bzl
@@ -102,6 +102,7 @@
"-arch",
"x86_64",
"-Wl,-no_adhoc_codesign",
+ "-Wl,-no_uuid",
"-O3",
"-o",
out_name,