The arm_cmse.h header includes standard headers, but some tests that include this header explicitly specify a target. The standard headers found via the standard include paths need not be compatible with the explicitly-specified target from the tests. In order to avoid test failures caused by such incompatibility, this patch uses %clang_cc1, which doesn't pick up the host system headers.
Details
Details
Diff Detail
Diff Detail
- Repository
- rG LLVM Github Monorepo
Event Timeline
Comment Actions
I'm sorry, I don't understand the issue. Certainly it's the compiler (driver) responsibility to setup include paths according to the selected target.
How do you trigger a problem?
Comment Actions
If your build was configured with DEFAULT_SYSROOT to a toolchain path that has a /include directory, then the contents of that directory would be picked up. The intent of the person doing the build with regards to DEFAULT_SYSROOT is to provide a sysroot for their intended targets, which may not match the needs of the explicit target provided here.
Comment Actions
I see.
I can also count (grep -rn '#include.*<std' | wc -l) 277 tests including standard headers. If they don't create a problem, wouldn't it be better to rewrite this test to use %clang_cc1 ?