From 6337dbfac948e3c5fbfc25477fbe33d5b2b41703 Mon Sep 17 00:00:00 2001 From: Bo Anderson Date: Fri, 26 Nov 2021 13:03:30 +0000 Subject: [PATCH] ENV/super: enable deterministic archive generation --- Library/Homebrew/extend/os/mac/extend/ENV/super.rb | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/Library/Homebrew/extend/os/mac/extend/ENV/super.rb b/Library/Homebrew/extend/os/mac/extend/ENV/super.rb index f4920216b7..4f20502d57 100644 --- a/Library/Homebrew/extend/os/mac/extend/ENV/super.rb +++ b/Library/Homebrew/extend/os/mac/extend/ENV/super.rb @@ -127,6 +127,12 @@ module Superenv # The tools in /usr/bin proxy to the active developer directory. # This means we can use them for any combination of CLT and Xcode. self["HOMEBREW_PREFER_CLT_PROXIES"] = "1" + + # Deterministic timestamping. + # This can work on older Xcode versions, but they contain some bugs. + # Notably, Xcode 10.2 fixes issues where ZERO_AR_DATE affected file mtimes. + # Xcode 11.0 contains fixes for lldb reading things built with ZERO_AR_DATE. + self["ZERO_AR_DATE"] = "1" if MacOS::Xcode.version >= "11.0" || MacOS::CLT.version >= "11.0" end def no_weak_imports