Commit fcff5d1
committed
build: compile the NIF as C++20 to match MLX 0.32
MLX 0.32.0 sets `CMAKE_CXX_STANDARD 20` (REQUIRED), so libmlx.a is built
as C++20 and its public headers use C++20 features — e.g. a defaulted
`operator==` on `CompileOptions` in mlx/backend/common/metal_kernel.h,
reachable via <mlx/fast.h>. The NIF includes those headers and statically
links those objects, so build it at the same language level to stay
ABI/ODR-consistent with the library.
Raises both `-std=c++17` sites in the Makefile (the NIF objects and the
standalone native bench binary) to `-std=c++20`.1 parent 0c4a332 commit fcff5d1
1 file changed
Lines changed: 9 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
10 | 10 | | |
11 | 11 | | |
12 | 12 | | |
13 | | - | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
14 | 21 | | |
15 | 22 | | |
16 | 23 | | |
| |||
58 | 65 | | |
59 | 66 | | |
60 | 67 | | |
61 | | - | |
| 68 | + | |
62 | 69 | | |
63 | 70 | | |
64 | 71 | | |
| |||
0 commit comments