Commit b53be27
committed
GPU: check that the toolchain can compile MSL 4.1 before enabling Metal
The Metal frameworks are present on every macOS, so finding them said nothing
about whether the backend can be built. It needs MSL 4.1, which arrives with
macOS 27 and its toolchain, and a library compiled as MSL 4.1 only loads on
macOS 27 and later. The deployment target has no say in this: the -std= flag is
what picks the target OS, and MACOSX_DEPLOYMENT_TARGET and -mmacosx-version-min
are both ignored by the Metal compiler.
Compiling a three-line kernel answers the question directly. AUTO now turns
Metal off on an older toolchain instead of failing somewhere in the middle of
the build, and an explicit ENABLE_METAL=ON says why it cannot be honoured.1 parent da3986b commit b53be27
1 file changed
Lines changed: 19 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
10 | 10 | | |
11 | 11 | | |
12 | 12 | | |
13 | | - | |
| 13 | + | |
14 | 14 | | |
15 | 15 | | |
16 | 16 | | |
| |||
450 | 450 | | |
451 | 451 | | |
452 | 452 | | |
453 | | - | |
| 453 | + | |
| 454 | + | |
| 455 | + | |
| 456 | + | |
| 457 | + | |
| 458 | + | |
| 459 | + | |
| 460 | + | |
| 461 | + | |
| 462 | + | |
| 463 | + | |
| 464 | + | |
| 465 | + | |
| 466 | + | |
| 467 | + | |
454 | 468 | | |
455 | 469 | | |
456 | 470 | | |
457 | 471 | | |
458 | 472 | | |
| 473 | + | |
| 474 | + | |
| 475 | + | |
459 | 476 | | |
460 | 477 | | |
461 | 478 | | |
| |||
0 commit comments