Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Closed
absolutelynothinghere opened this issue Dec 22, 2023 · 1 comment · Fixed by #18600
Closed

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

absolutelynothinghere opened this issue Dec 22, 2023 · 1 comment · Fixed by #18600
Labels
bug Observed behavior contradicts documented or intended behavior zig cc Zig as a drop-in C compiler feature

Comments

@absolutelynothinghere
Copy link

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 absolutelynothinghere added the bug Observed behavior contradicts documented or intended behavior label Dec 22, 2023
@absolutelynothinghere absolutelynothinghere changed the title Compiling Mold with zig c++ fails, likely due to -x <language flag Compiling Mold with zig c++ fails, likely due to -x <language> flag Dec 22, 2023
@Vexu
Copy link
Member

Vexu commented Dec 22, 2023

Related #17956

@andrewrk andrewrk added the zig cc Zig as a drop-in C compiler feature label Jan 20, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Observed behavior contradicts documented or intended behavior zig cc Zig as a drop-in C compiler feature
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants