jhuber6 wrote:

> Can you explain again why the compiler isn't providing the C library and the 
> start files implicitly by default, just like it does for non-GPU code?

Because the GPU is not a target that wants to provide a C library and start 
files by default. This is an edge case where I make the  GPU look like a normal 
target for unit testing purposes. If you use a GPU this way, you're basically 
turning your 1000$+ card into a 10$ Raspberry Pi, it's not something people 
want by default. Kernels cannot be optimized out, and currently 0.001% of GPU 
applications in the wild define a `main` function on the device side so it 
would cause a linker error.

https://github.com/llvm/llvm-project/pull/112025
_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to