Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Set ZERO_AR_DATE=1 to eliminate timestamp from .a outputs
Summary: By default, the archive header produced by `ar q` embeds the current unix timestamp. The GNU archiver provides `ar qD` to make a deterministic archive, which we already use in Buck if supported. https://www.internalfb.com/code/fbsource/[b6ae1a41be80e4b62a2595c69f0502b7f71b3103]/fbcode/buck2/prelude/cxx/archive.bzl?lines=44-46 The darwin archiver does not support `qD`. ```lang=text /bin/ar: illegal option -- D usage: ar -d [-TLsv] archive file ... ar -m [-TLsv] archive file ... ar -m [-abiTLsv] position archive file ... ar -p [-TLsv] archive [file ...] ar -q [-cTLsv] archive file ... ar -r [-cuTLsv] archive file ... ar -r [-abciuTLsv] position archive file ... ar -t [-TLsv] archive [file ...] ar -x [-ouTLsv] archive [file ...] ``` It instead supports the same behavior through an environment variable `ZERO_AR_DATE`. Reviewed By: d16r Differential Revision: D60680127 fbshipit-source-id: 628e12b5ea4b209ba92582722fe49bc8e24ad5c3
- Loading branch information