Commit 722cb0e
committed
fix: don't use xcrun SDK as sysroot for xlings LLVM on macOS
Root cause: probe_sysroot() falls back to xcrun --show-sdk-path on
macOS when the compiler doesn't report a sysroot via -print-sysroot.
For xlings-installed LLVM 20.1.7, this sets --sysroot to the Xcode
SDK path. Combined with -nostdinc++ from clang++.cfg, this breaks
C runtime header resolution — macOS SDK headers reference internal
macros (_CTYPE_A, etc.) that are only defined via default include
paths which --sysroot overrides.
Fix: remove the xcrun SDK fallback in probe_sysroot(). If the
compiler itself doesn't report a sysroot, none should be used.
The xcrun fallback was designed for Apple's system clang, not for
standalone xlings LLVM which provides its own libc++ headers.
Also revert the ci-macos.yml MCPP_HOME workaround — the real bug
is fixed, no workaround needed.1 parent b1b872d commit 722cb0e
2 files changed
Lines changed: 12 additions & 9 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
19 | 19 | | |
20 | 20 | | |
21 | 21 | | |
22 | | - | |
23 | | - | |
24 | 22 | | |
25 | 23 | | |
26 | 24 | | |
| |||
287 | 285 | | |
288 | 286 | | |
289 | 287 | | |
290 | | - | |
291 | | - | |
292 | | - | |
| 288 | + | |
293 | 289 | | |
294 | 290 | | |
295 | | - | |
296 | 291 | | |
297 | 292 | | |
298 | 293 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
262 | 262 | | |
263 | 263 | | |
264 | 264 | | |
265 | | - | |
266 | | - | |
267 | | - | |
| 265 | + | |
| 266 | + | |
| 267 | + | |
| 268 | + | |
| 269 | + | |
| 270 | + | |
| 271 | + | |
| 272 | + | |
| 273 | + | |
| 274 | + | |
| 275 | + | |
268 | 276 | | |
269 | 277 | | |
270 | 278 | | |
| |||
0 commit comments