Merge pull request #12482 from Bo98/zero_ar_date

ENV/super: enable deterministic archive generation
This commit is contained in:
Bo Anderson 2021-11-26 23:37:43 +00:00 committed by GitHub
commit 4c3f325347
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -127,6 +127,12 @@ module Superenv
# The tools in /usr/bin proxy to the active developer directory. # The tools in /usr/bin proxy to the active developer directory.
# This means we can use them for any combination of CLT and Xcode. # This means we can use them for any combination of CLT and Xcode.
self["HOMEBREW_PREFER_CLT_PROXIES"] = "1" 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 end
def no_weak_imports def no_weak_imports