[llvm-dev] clang-9 and wasm32-unknown-unknown

Elichai Turkel via llvm-dev llvm-dev at lists.llvm.org
Mon Feb 17 16:35:54 PST 2020


Hi,
I'm not sure if this is a bug or not, but would appreciate
understanding what's going on and what's the right way to fix it.
Running `clang --target=wasm32-unknown-unknown test.c` on a sample C
file with `include <string.h>` returns: "fatal error: 'string.h' file
not found". but without the target it works just fine.

With some help of @jdoerfert in IRC I found this difference:
`clang test.c -v` returns:
```
#include <...> search starts here:
 /usr/local/include
 /usr/local/lib/clang/9.0.1/include
 /usr/include
End of search list.
```
But `clang --target=wasm32-unknown-unknown test.c -v` returns:
```
#include <...> search starts here:
 /usr/local/lib/clang/9.0.1/include
End of search list.
```

Why are the other include paths missing? what's the right way to make this work?
FWIW I'm pretty sure it worked to me in the past with older clang versions.

Thanks.
Elichai.
-- 
PGP: 5607C93B5F86650C


More information about the llvm-dev mailing list