# avoid passing \-march=native when not supported · gitcafe/zig

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

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

Visibility: public

Requested revision: ad438a95c528c4a2013e3e7fb99ea9a260143eb3

Requested commit: ad438a95c528c4a2013e3e7fb99ea9a260143eb3

Commit: ad438a95c528c4a2013e3e7fb99ea9a260143eb3

Tree: 7d4daebb99dd0d1fbc9b324f0416b9bc86008f70

Author: Andrew Kelley

Committer: Andrew Kelley

## Message

```
avoid passing -march=native when not supported

Clang does not support -march=native for all targets.
Arguably it should always work, but in reality it gives:
error: the clang compiler does not support '-march=native'
If we move CPU detection logic into Zig itelf, we will not need this,
instead we will always pass target features and CPU configuration explicitly.
For now, we simply avoid passing the flag when it is known to not be
supported.

```

## Parents

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

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