lean4 icon indicating copy to clipboard operation
lean4 copied to clipboard

chore: add header pad on Darwin for patching

Open lenianiva opened this issue 1 month ago • 1 comments

This PR adds the -headerpad_max_install_names flag to the linker so the built libraries and executable can be properly patched in Nix builds.

Discussion: https://leanprover.zulipchat.com/#narrow/channel/341532-lean4-dev/topic/Add.20.60-headerpad.60.20to.20linker.20args/with/563288593

Issue on lean4-nix: https://github.com/lenianiva/lean4-nix/issues/76

lenianiva avatar Dec 11 '25 21:12 lenianiva

What does this mean in file size? Can you please document the code?

Kha avatar Dec 12 '25 08:12 Kha

What does this mean in file size? Can you please document the code?

This allows Nix to patch the generated binary. It only makes load commands larger so it shouldn't impact file sizes by a lot.

lenianiva avatar Dec 15 '25 18:12 lenianiva