# fix order of CLI args passed to clang · gitcafe/zig

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

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

Visibility: public

Requested revision: 3a7ea0b65e4edb3e13218023eb667792ab2d0d51

Requested commit: 3a7ea0b65e4edb3e13218023eb667792ab2d0d51

Commit: 3a7ea0b65e4edb3e13218023eb667792ab2d0d51

Tree: dd968bb9858a94003678975f81a31fbe8c29e5b3

Author: Andrew Kelley

Committer: Andrew Kelley

## Message

```
fix order of CLI args passed to clang

Commit eb3f7d2f37cab1d3df7c4493b8239e802b83e521 changed the order of CLI
args passed to clang, making object-specific "extra flags" passed first.
However, these are supposed to be able to override other flags, and this
behavior is exploited by workarounds in mingw.zig to disable LTO.

This commit rectifies the situation by moving extra flags back to being
passed after the call to addCCArgs().

```

## Parents

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

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