Output files with different contents
Technical Note 221111
Architectures:
All
Component:
general
Updated:
12/12/2022 8:35 AM
Introduction
his technical note describes how the generated output when building a project can differ from build to build.
Description
Differences in the generated output can occur when you:
- build with full paths
- build in another location
- build using the preprocessor symbols __TIME__ or __DATE__
- build a library
Building with full paths
For causes of differences in the generated output when building with full paths, see technical note 59374.
Building in another location
Building a project in another location should not affect the output file. For information on differences in the output file when building a project at another location, see technical note 59374.
Building using the preprocessor symbols __TIME__ , __DATE__
When building a project, using the preprocessor symbols __TIME__
or __DATE__
will cause the generated output to be different. If these symbols conflict with the need to generate deterministic builds, remove them.
Building a library
The tool iarchive.exe
adds Unix timestamps to each library. There is a new timestamp every time a project is built. To avoid this, use the iarchive
command line option --fake_time
.
Conclusion
To get deterministic builds, you might need to modify the project as suggested in this technical note and in technical note 59374.
All product names are trademarks or registered trademarks of their respective owners.