Commit 8958828
Always take _Exit on Apple instead of gating on deployment target
The version gate this replaces could not have worked. Nothing in the build sets
CMAKE_OSX_DEPLOYMENT_TARGET, so __MAC_OS_X_VERSION_MIN_REQUIRED follows the build
host and reads 150000 on exactly the macOS 15 builders that emit the hard
_quick_exit reference. The trigger is the SDK, not the host: a macOS 14 machine
with Xcode 16 installed builds the broken binary.
Both spellings also fail to compile against SDKs older than 15, which do not
declare quick_exit at all -- bare quick_exit as an undeclared identifier,
std::quick_exit as a reference to an unresolved using declaration, since libc++'s
<cstdlib> has no ::quick_exit to pull in.
_Exit is equivalent here as nothing registers at_quick_exit handlers, so take it
unconditionally on Apple and drop the version arithmetic entirely.
Verified against the 13.3 and 15.2 SDKs: compiles on both, and nm -u shows __Exit
with no _quick_exit reference. For contrast, std::quick_exit against the 15.2 SDK
compiles clean and emits _quick_exit, which is the load-time failure on macOS < 15.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>1 parent 190e37e commit 8958828
1 file changed
Lines changed: 21 additions & 19 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
31 | 31 | | |
32 | 32 | | |
33 | 33 | | |
34 | | - | |
35 | | - | |
36 | | - | |
37 | | - | |
38 | | - | |
39 | | - | |
40 | | - | |
41 | | - | |
42 | | - | |
43 | | - | |
44 | | - | |
45 | | - | |
46 | | - | |
47 | | - | |
48 | | - | |
49 | | - | |
50 | 34 | | |
51 | 35 | | |
52 | 36 | | |
| |||
57 | 41 | | |
58 | 42 | | |
59 | 43 | | |
60 | | - | |
61 | | - | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
62 | 64 | | |
63 | 65 | | |
64 | | - | |
| 66 | + | |
65 | 67 | | |
66 | 68 | | |
67 | 69 | | |
| |||
0 commit comments