https://github.com/ilya-klyuchnikov/sanitizer
https://github.com/ilya-klyuchnikov/sanitizer
Last synced: 3 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/ilya-klyuchnikov/sanitizer
- Owner: ilya-klyuchnikov
- Created: 2016-12-22T15:02:43.000Z (almost 9 years ago)
- Default Branch: master
- Last Pushed: 2017-02-17T16:13:33.000Z (over 8 years ago)
- Last Synced: 2024-10-05T10:41:07.243Z (about 1 year ago)
- Language: Python
- Size: 805 KB
- Stars: 2
- Watchers: 0
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Experimental utilities to make cxx compilation with MSVS compilers deterministic and hermetic
## The problem
VS tools (`cl.exe`, `link.exe`, `lib.exe`) are not deterministic. Given exactly the same sources, they do not produce
the same (byte-for-byte) outputs.**Why?**
- They put so called compilation timestamp into any possible piece of output.
- They put absolute pats to files into output.
- For debug builds GUIDs are put into binaries (dll, exe) and debug symbols (pdb files) to be able to match them.## The scope of current solution
Sanitizer is able to make release builds byte-for-byte deterministic.
**What are release builds?**
- Compilation happens without storing debug information (no `/Zi`, `/ZI` or `/Z7` compiler's flag)
- Linking wihout pdb files**How?**
- Fixing compilation timestamps to a default or a predifined deterministic value.
- Removing the redundant `debug$s` (for release builds) section from object files.## Usage
- `python release_normalize --input-object=foo.obj --output-object=foo.normalized.obj` - normalizes an object file
- `python release_normalize --input-lib=foo.lib --output-image=foo.normalized.lib` - normalizes a lib file
- `python release_normalize --input-image=foo.dll --output-image=foo.normalized.dll` - normalizes an image (dll/exe) file