# stage2: only default to linking system libc if linking system libs · gitcafe/zig

[View on GitCafe](https://git.cafe/gitcafe/zig/commit/1d6c804b29fed146aafda0f56cae7a4853b6abf9)

Repository: [gitcafe/zig](https://git.cafe/gitcafe/zig)

Visibility: public

Requested revision: 1d6c804b29fed146aafda0f56cae7a4853b6abf9

Requested commit: 1d6c804b29fed146aafda0f56cae7a4853b6abf9

Commit: 1d6c804b29fed146aafda0f56cae7a4853b6abf9

Tree: 14bd343538920798222de899203147826957d207

Author: Isaac Freund

Committer: Andrew Kelley

## Message

```
stage2: only default to linking system libc if linking system libs

We do need to link the system libc if linking system libraries as
they may potentially be compiled against e.g. a newer glibc version
than zig can provide. However if not linking system libraries, using
the zig provided libc is more reliable as it does not depend on any
quirks of the host system or being able to invoke the system cc to
find include dirs.

```

## Parents

- [8861ee18f7fe9559a02389f07c4e5cdc5a8ffbde](https://git.cafe/gitcafe/zig/commit/8861ee18f7fe9559a02389f07c4e5cdc5a8ffbde?format=markdown)

[Source at this commit](https://git.cafe/gitcafe/zig/tree/1d6c804b29fed146aafda0f56cae7a4853b6abf9?format=markdown)
