The issue is that https://reviews.llvm.org/D117888 does not correctly add include path for libstdc++ which causes compilation to fail.
Diff Detail
Event Timeline
Is the one using MultiarchTriple before wrong? Why is this one being used now even if the OS is unknown?
Indeed, it looks like this case should already be handled by the // First add the per-target include path if the OS is known. case above. Also, I would expect the MultiarchTriple triple to come before the "/c++/" part of the directory, as it does with the existing path above.
clang/lib/Driver/ToolChains/WebAssembly.cpp | ||
---|---|---|
541 | I see, but regardless of if the multi-arch part comes after the c++ or before, shoudln't this patch be changing the first "target specific" path above rather than the second "generic one". i.e. shouldn't we be searching the multi-arch path first and then the generic path second? |
clang/lib/Driver/ToolChains/WebAssembly.cpp | ||
---|---|---|
541 | I'm a little confused by c++/<version>/<triple> thing... looking at clang/lib/Driver/ToolChains/Fuchsia.cpp and clang/lib/Driver/ToolChains/Gnu.cpp it looks like /<version> is always the last part of the include path. Do you know what the <triple> component would be needed after the version for wasm but not for other platforms? |
I do not know. I have invited Jonathan Wakely. He knows how GCC deals with that and i want to know what he says about this. Then i will fix it later.
clang/lib/Driver/ToolChains/WebAssembly.cpp | ||
---|---|---|
541 |
It's always needed. Libstdc++ headers are always split across three directories:
The second one will be modified by the multilib options, so on x86_64 -m32 will use $prefix/include/c++/$version/$triplet/32 instead. In all cases, $version might be X.Y.Z or just X if GCC was configured with --with-gcc-major-version-only |
I see, but regardless of if the multi-arch part comes after the c++ or before, shoudln't this patch be changing the first "target specific" path above rather than the second "generic one". i.e. shouldn't we be searching the multi-arch path first and then the generic path second?