Record build environment in generated file