How to link native libc++ when using system integration feature

Hi all!

I am using zig as a build system for a c++ project and was wondering how one can force the build system to use the system’s native c++ standard library headers instead of the libc++ ones provided by zig.

My issue arises from trying to use the system integration feature: I’d like the person running the build script to be able to choose either building the dependencies from scratch or linking the versions provided by the system. This does not work right now because mixing code built against libc++ and libstdc++ headers is not possible.

Any help would be appreciated!

Unfortunately, right now, I don’t believe we have a particularly good answer for this. Here’s what we do for Zig itself:

We need to fix the build system’s support for the system libc++ case so that hacks like this aren’t necessary.