3 ms·
For unwanted values of __FILE__, you can "refix" these to something reproducible after the build (of the libraries or object files or the final binaries, whiche
by yosefk 3y ago
For unwanted values of __FILE__, you can "refix" these to something reproducible after the build (of the libraries or object files or the final binaries, whichever is easier with the given build flow), if that's your problem (better yet is to remap the path prefix at build time and then "refix" to where the source code really is, but if you don't want that but rather want to remove irrelevant absolute paths and replace them with something deterministic, you can do that, too)
- Cloudef 3y agoYeah, nix's remove-references-to does exactly that, it replaces the prefix with something deterministic (bunch of zeroes IIRC). I know about the gcc (and recently clang's) options to map the prefix, but the command line is annoying to use. Wish there was simply -relative-prefix or something and it would be the default. The nice thing about nix is that it will detect any references to /nix/store path that shouldn't be there and fail the build, so you immediately know if there is reproducibility problem related to the paths.