Skip to content

Conversation

@xxxbxxx
Copy link
Contributor

@xxxbxxx xxxbxxx commented Oct 16, 2023

two changes to restore the ability to build c++ projets, including zig itself with 'zig c++' as a c++ compiler.

closes #17536

following suit from b40943e,
add a version guard in addition to the ISOC2X check.
The build was previously failing with `error: unknown command: -print-file-name=libstdc++.a`
because the command invocation was
`zig -print-file-name=libstdc++.a`
instead of
`zig c++ -print-file-name=libstdc++.a`

note: .cxx_compiler_arg1 = "" instead of undefined to avoid breaking existing setups without requiring to run cmake again.
@xxxbxxx xxxbxxx changed the title build compatibility build compatibility for c++ & linux Oct 16, 2023
@andrewrk
Copy link
Member

Very nice, thank you.

@andrewrk andrewrk enabled auto-merge October 16, 2023 21:22
@andrewrk andrewrk merged commit 5039a5d into ziglang:master Oct 17, 2023
@xxxbxxx xxxbxxx deleted the glibc-strtoul branch August 4, 2024 20:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

zig c++ link error when targetting older glibc

2 participants