zig
zig copied to clipboard
Compiling Mold with `zig c++` fails, likely due to `-x <language>` flag
Zig Version
0.11.0
Steps to Reproduce and Observed Behavior
Try compiling Mold 2.4.0 using zig c++ and it will return an error:
[ 24%] Building CXX object CMakeFiles/mold.dir/cmake_pch.hxx.pch
error: language 'h' is unsupported in this context
Removing all instances of -x c++-header from mold-2.4.0/CMakeFiles/mold.dir/build.make suppresses the error, so the problem might be because c++-header does not map to .hxx in the Zig compiler.
Expected Behavior
Compilation should proceed normally.
Related #17956