yaxunl added a comment.

In D78979#2006847 <https://reviews.llvm.org/D78979#2006847>, @arsenm wrote:

> I'm also wondering if using -nogpulib for the corresponding linker purpose 
> was correct, since in the OpenCL case it's not really an offload target. 
> Maybe this should switch to -nostdlib?


-nogpulib is fine since opencl compiler is in parallel with the device compiler 
of CUDA/HIP. The library it uses is the device library.



================
Comment at: clang/lib/Frontend/CompilerInvocation.cpp:2548
 
-  Opts.IncludeDefaultHeader = Args.hasArg(OPT_finclude_default_header);
+  Opts.IncludeDefaultHeader = !Args.hasArg(OPT_fno_include_default_header);
   Opts.DeclareOpenCLBuiltins = Args.hasArg(OPT_fdeclare_opencl_builtins);
----------------
should use hasFlag in case there are multiple occurrences of both options. 


CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D78979/new/

https://reviews.llvm.org/D78979



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

Reply via email to