# put the previous commit behind cmake option ZIG_PREFER_CLANG_CPP_DYLIB · gitcafe/zig

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

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

Visibility: public

Requested revision: e857190dab2f1575dc3092f91bfb7fca5583b996

Requested commit: e857190dab2f1575dc3092f91bfb7fca5583b996

Commit: e857190dab2f1575dc3092f91bfb7fca5583b996

Tree: 3d7a195693e79d55dfabc8632a34b6427d09b193

Author: Andrew Kelley

Committer: Andrew Kelley

## Message

```
put the previous commit behind cmake option ZIG_PREFER_CLANG_CPP_DYLIB

Without this, building from source caused:

CommandLine Error: Option 'mc-relax-all' registered more than once!
LLVM ERROR: inconsistency in registered CommandLine options

This is due to LLVM static libs compiled in multiple times. But without
the LLVM static libs on the linker line, it caused undefined symbol
linker errors.

So our hands are tied. Homebrew users will have to specify
`-DZIG_PREFER_CLANG_CPP_DYLIB`.

```

## Parents

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

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