We always add -cl-kernel-arg-info to the options. This option just generate
the arg information for the backend, no other side effect and does not have
performance issue. So we just always add it here.
Signed-off-by: Junyan He <junyan.he@linux.intel.com>
Reviewed-by: Zhigang Gong <zhigang.gong@linux.intel.com>
set (local_pch_object ${ocl_blob_file}.local.pch)
# generate pch object
if (LLVM_VERSION_NODOT VERSION_GREATER 32)
- set (clang_cmd -cc1 -x cl -triple spir -ffp-contract=off)
+ set (clang_cmd -cc1 -x cl -triple spir -ffp-contract=off -cl-kernel-arg-info)
else (LLVM_VERSION_NODOT VERSION_GREATER 32)
if (LLVM_VERSION_NODOT VERSION_GREATER 31)
set (clang_cmd -cc1 -x cl -triple nvptx -ffp-contract=off)
So we just disable the PCH validation of Clang and do the judgement by ourself. */
- if(options) {
+ /* We always add -cl-kernel-arg-info to the options. This option just generate the arg
+ information for the backend, no other side effect and does not have performance issue. */
+ if (!options || !strstr(const_cast<char *>(options), "-cl-kernel-arg-info"))
+ clOpt += "-cl-kernel-arg-info ";
+
+ if (options) {
char *p;
/* FIXME: Though we can disable the pch valid check, and load pch successfully,
but these language opts and pre-defined macro will still generate the diag msg