Commit 2ecfcfd
committed
Change macOS handling of undefined symbols
Newer version of XCode deprecate the ``-undefined dynamic_lookup`` flag
that pybind11 has used to avoid linking to a specific Python shared
library. Every use of it now lead to the following noisy warning
message.
```
ld: warning: -undefined dynamic_lookup may not work with chained fixups
```
More details on this are available here:
https://mjtsai.com/blog/2021/06/30/faster-app-launching-in-ios-15-and-monterey/
While this seems somewhat specific to Swift, it is problematic if a core
linker feature that pybind11 depends on is declared unreliable.
I have been able to replace these flags with
```
-undefined suppress -flat_namespace
```
I am not sure if this suits everyone. The purpose of the PR is to raise
the issue and starts a discussion on what to do.1 parent 252ed8f commit 2ecfcfd
2 files changed
+4
-4
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
583 | 583 | | |
584 | 584 | | |
585 | 585 | | |
586 | | - | |
| 586 | + | |
587 | 587 | | |
588 | 588 | | |
589 | 589 | | |
590 | 590 | | |
591 | | - | |
| 591 | + | |
592 | 592 | | |
593 | 593 | | |
594 | 594 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
75 | 75 | | |
76 | 76 | | |
77 | 77 | | |
78 | | - | |
| 78 | + | |
79 | 79 | | |
80 | 80 | | |
81 | 81 | | |
82 | 82 | | |
83 | 83 | | |
84 | 84 | | |
85 | 85 | | |
86 | | - | |
| 86 | + | |
87 | 87 | | |
88 | 88 | | |
89 | 89 | | |
| |||
0 commit comments