sourcegraph / scip-clang

Apache License 2.0
56 stars 7 forks source link

Avoid GCC's stdlib being picked up when indexing CUDA #440

Closed varungandhi-src closed 2 weeks ago

varungandhi-src commented 1 year ago

When indexing MXNet, we see some errors when using --show-compiler-diagnostics like:

In file included from /home/varun/mxnet/include/dmlc/./logging.h:15:
In file included from /usr/bin/../lib/gcc/x86_64-linux-gnu/12/../../../../include/c++/12/memory:76:
In file included from /usr/bin/../lib/gcc/x86_64-linux-gnu/12/../../../../include/c++/12/bits/shared_ptr.h:53:
/usr/bin/../lib/gcc/x86_64-linux-gnu/12/../../../../include/c++/12/bits/shared_ptr_base.h:196:22: error: use of undeclared identifier 'noinline'; did you mean 'inline'?
      __attribute__((__noinline__))
                     ^

It's unclear why GCC headers are being included, it would be nice to avoid them if possible.