Skip to content

Commit

Permalink
docs: add a release snippet for zig ld support
Browse files Browse the repository at this point in the history
  • Loading branch information
Akaricchi committed Sep 27, 2023
1 parent 4d74d9b commit ec9ece1
Showing 1 changed file with 18 additions and 0 deletions.
18 changes: 18 additions & 0 deletions docs/markdown/snippets/zig_ld.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
## Zig 0.11 can be used as a C/C++ compiler frontend

Zig offers
[a C/C++ frontend](https://andrewkelley.me/post/zig-cc-powerful-drop-in-replacement-gcc-clang.html) as a drop-in replacement for Clang. It worked fine with Meson up to Zig 0.10. Since 0.11, Zig's
dynamic linker reports itself as `zig ld`, which wasn't known to Meson. Meson now correctly handles
Zig's linker.

You can use Zig's frontend via a [machine file](Machine-files.md):

```ini
[binaries]
c = ['zig', 'cc']
cpp = ['zig', 'c++']
ar = ['zig', 'ar']
ranlib = ['zig', 'ranlib']
lib = ['zig', 'lib']
dlltool = ['zig', 'dlltool']
```

0 comments on commit ec9ece1

Please sign in to comment.