Skip to content

support compiling and linking c++ code #4786

@andrewrk

Description

@andrewrk

Zig supports compiling and linking C code because we already depend on libclang for translate-c. But Clang is also a c++ compiler. It's not really much more work to also support compiling and linking c++ code. I looked into it and it looks like it amounts to about 20k more lines to ship both libc++ and libc++abi.

Note that this does not include translating C++ code.

This would go a long way toward #853, and it would make zig cc even more useful. It also serves the use case of using zig as a build system and package manager for C/C++ projects.

Metadata

Metadata

Assignees

No one assigned

    Labels

    acceptedThis proposal is planned.proposalThis issue suggests language modifications. If it also has the "accepted" label then it is planned.

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions