yaxunl added a comment.

In https://reviews.llvm.org/D47694#1121037, @rjmccall wrote:

> In https://reviews.llvm.org/D47694#1120375, @yaxunl wrote:
>
> > In https://reviews.llvm.org/D47694#1120367, @rjmccall wrote:
> >
> > > Why not just have the driver disable RTTI in the frontend invocation?
> >
> >
> > CUDA/HIP uses single source for device and host. The host code may depend 
> > on RTTI,
> >  e.g., an application may include some boost headers which will fail if 
> > RTTI is disabled,
> >  therefore RTTI cannot be disabled when compiling device code.
>
>
> It's a single source file, yes, but behind the scenes you do a separate 
> invocation of the compiler to re-parse that file for device code-generation, 
> right?


That's true. However, when compiling for device, the source file is still the 
original source code which are for both host and device. When compiling
for device, the compiler still needs to parse the source code for host, and 
there is no way to disable RTTI only for the device code.


https://reviews.llvm.org/D47694



_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to