# expand argv\[0\] when spawning system C compiler · gitcafe/zig

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

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

Visibility: public

Requested revision: 44c14749a1063e5525b3249cddca6435d0654df4

Requested commit: 44c14749a1063e5525b3249cddca6435d0654df4

Commit: 44c14749a1063e5525b3249cddca6435d0654df4

Tree: 3c53668e301d9e8359660f90e62e990ebfe47177

Author: Andrew Kelley

Committer: Andrew Kelley

## Message

```
expand argv[0] when spawning system C compiler

Some C compilers, such as Clang, are known to rely on
argv[0] to find the path to their own executable,
without even bothering to resolve PATH. This results
in the message:

error: unable to execute command: Executable "" doesn't exist!

So we tell ChildProcess to expand argv[0] to the absolute path
to give them a helping hand.

```

## Parents

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

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