Skip to content

Conversation

@lenianiva
Copy link
Contributor

@lenianiva lenianiva commented Dec 11, 2025

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: lenianiva/lean4-nix#76

@lenianiva lenianiva changed the title build: Add header pad on Darwin for patching chore: Add header pad on Darwin for patching Dec 11, 2025
@lenianiva lenianiva changed the title chore: Add header pad on Darwin for patching chore: add header pad on Darwin for patching Dec 11, 2025
@Kha
Copy link
Member

Kha commented Dec 12, 2025

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

@lenianiva
Copy link
Contributor Author

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants