From 917e15ea408e1d3d25574edbb466b39cfbcb61fe Mon Sep 17 00:00:00 2001 From: Keith Smiley Date: Fri, 5 Nov 2021 03:31:23 -0700 Subject: [PATCH] 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 --- tools/cpp/osx_cc_configure.bzl | 1 + 1 file changed, 1 insertion(+) diff --git a/tools/cpp/osx_cc_configure.bzl b/tools/cpp/osx_cc_configure.bzl index a612308e4d5ce1..4bfa61807a0e2e 100644 --- a/tools/cpp/osx_cc_configure.bzl +++ b/tools/cpp/osx_cc_configure.bzl @@ -102,6 +102,7 @@ def _compile_cc_file(repository_ctx, src_name, out_name): "-arch", "x86_64", "-Wl,-no_adhoc_codesign", + "-Wl,-no_uuid", "-O3", "-o", out_name,