pub fn normalize_environment(env: &mut BuildEnvironment)Expand description
Normalize a build environment for reproducibility.
- Sets
SOURCE_DATE_EPOCHto “0” to eliminate timestamp variation - Removes locale-dependent variables (
LC_ALL,LANG,LANGUAGE) and sets them to “C” for deterministic collation - Sets
TZ=UTCfor timezone consistency - Canonicalizes paths by stripping trailing slashes and collapsing double slashes