Skip to content

Conversation

@chrisnovakovic
Copy link
Contributor

While it is theoretically possible to generate statically-linked Mach-O binaries for Darwin, Apple heavily discourages it [1]. Emit a warning when static is set to True when building a c_binary target for Darwin, and generate a dynamically-linked binary instead.

Fixes #86.

[1] https://developer.apple.com/library/archive/qa/qa1118/_index.html

While it is theoretically possible to generate statically-linked Mach-O
binaries for Darwin, Apple heavily discourages it [1]. Emit a warning
when `static` is set to `True` when building  a `c_binary` target for
Darwin, and generate a dynamically-linked binary instead.

Fixes please-build#86.

[1] https://developer.apple.com/library/archive/qa/qa1118/_index.html
@chrisnovakovic chrisnovakovic merged commit 61de6f0 into please-build:master Nov 6, 2025
28 checks passed
@chrisnovakovic chrisnovakovic deleted the darwin-no-static branch November 6, 2025 10:36
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.

Binary link failure on Darwin when static = True

2 participants