Use -oso_prefix to relativize object file paths in debug info with ld64 on macOS #299904
Labels
6.topic: darwin
Running or building packages on Darwin
6.topic: reproducible builds
6.topic: stdenv
Standard environment
significant
Novel ideas, large API changes, notable refactorings, issues with RFC potential, etc.
Issue description
Currently absolute paths leak into linked binaries on macOS inside the OSO debug info section, making a lot of binaries nonreproducible since
/private/tmp/nix-build-dskfdsjlksdfl/
absolutely can arbitrarily vary between runs. This can be fixed with a ld64 feature called-oso_prefix
, about which you can learn more here: https://milen.me/writings/apple-linker-ld64-deterministic-builds-oso-prefix/The text was updated successfully, but these errors were encountered: