[Openmp-commits] [PATCH] D101509: An attempt to abandon omptarget out-of-tree builds.
Wei Wang via Phabricator via Openmp-commits
openmp-commits at lists.llvm.org
Mon May 10 21:28:02 PDT 2021
weiwang added a comment.
In D101509#2749710 <https://reviews.llvm.org/D101509#2749710>, @vzakhari wrote:
> Yes, you can disable the device RTL build using this control.
>
> It looks like your scripts define one of these PATH variables <https://gcc.gnu.org/onlinedocs/cpp/Environment-Variables.html>. And it has something to do with `-ffreestanding`. I was able to reproduce it with the following example:
>
> #include <stdint.h>
>
> uint64_t foo() {
> return UINT64_C(0x1);
> }
>
>
>
>> $ CPLUS_INCLUDE_PATH=<path>/x86_64-linux-gnu/9.2.0/include clang test.cpp -c -ffreestanding
>
> test.cpp:4:10: error: use of undeclared identifier '__UINT64_C'
> return UINT64_C(0x1);
> ^
> <path>/x86_64-linux-gnu/9.2.0/include/stdint-gcc.h:254:21: note: expanded from macro 'UINT64_C'
> #define UINT64_C(c) __UINT64_C(c)
> ^
> 1 error generated.
>
> I am not sure whether clang is supposed to work in this conditions or not, but the error is not specific to amdgcn device RTL build. Basically, any target that uses the in-tree clang may fail the same way (e.g. LIT tests).
Ah, this is good finding! I do find the include path in both `CPLUS_INCLUDE_PATH` and `C_INCLUDE_PATH` from the env created by script.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D101509/new/
https://reviews.llvm.org/D101509
More information about the Openmp-commits
mailing list