# build: do not emit \-iwithsysroot/\-iframeworkwithsysroot implicitly · gitcafe/zig

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

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

Visibility: public

Requested revision: 5e945f813c89b47a92ed0e1b3051ebc38547a790

Requested commit: 5e945f813c89b47a92ed0e1b3051ebc38547a790

Commit: 5e945f813c89b47a92ed0e1b3051ebc38547a790

Tree: e12ee8df6be656c9ae7564683cacaa662ca6eb44

Author: Jakub Konka

Committer: Jakub Konka

## Message

```
build: do not emit -iwithsysroot/-iframeworkwithsysroot implicitly

Prior to this change, we would unconditionally emit any system include path/framework
path as `-iwithsysroot`/`-iframeworkwithsysroot` if the sysroot was
set which can lead to unexpected build failures. Now, calls to
`b.addSystemIncludePath` and `b.addFrameworkPath` will always emit
search paths as `-isystem`/`-iframework`. As a result, it is now up to
the user to correctly concat the search paths with the sysroot when
and where desired.

If there is a need for emitting `-iwithsysroot`/`-iframeworkwithsysroot`
I would advise adding explicit hooks such as `addSystemIncludePathWithSysroot`
and `addFrameworkPathWithSysroot`.

```

## Parents

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

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