From bc4a645e111646668a72affba45e71d0c408fd20 Mon Sep 17 00:00:00 2001 From: Keith Smiley Date: Thu, 28 Oct 2021 16:07:20 -0700 Subject: [PATCH] [5.x] 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 (cherry picked from commit d2aab87df7c1e1e48544aef321f72f40f6dad575) --- 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,