zig icon indicating copy to clipboard operation
zig copied to clipboard

Compiling Mold with `zig c++` fails, likely due to `-x <language>` flag

Open absolutelynothinghere opened this issue 1 year ago • 1 comments

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.

absolutelynothinghere avatar Dec 22 '23 11:12 absolutelynothinghere

Related #17956

Vexu avatar Dec 22 '23 14:12 Vexu