Skip to content

Commit

Permalink
Auto merge of #111698 - Amanieu:force-static-lib, r=petrochenkov
Browse files Browse the repository at this point in the history
Force all native libraries to be statically linked when linking a static binary

Previously, `#[link]` without an explicit `kind = "static"` would confuse the linker and end up producing a dynamically linked library because of the `-Bdynamic` flag. However this binary would not work correctly anyways since it was linked with startup code for a static binary.

This PR solves this by forcing all native libraries to be statically linked when the output is a static binary that cannot link to dynamic libraries anyways.

Fixes #108878
Fixes #102993
  • Loading branch information
bors committed Jun 7, 2023
2 parents bd28f82 + 2fbd2d7 commit 2c69965
Showing 0 changed files with 0 additions and 0 deletions.

0 comments on commit 2c69965

Please sign in to comment.