Eric-Guo-NXP wrote: > perhaps change -O0 to -disable-llvm-passes can solve your problem?
I tried `-disable-llvm-passes` as suggested, but it does not work for SPIR-V targets. While it does preserve function bodies, running no passes means the libclc helpers keep their `Import` LinkageAttributes unresolved. `llvm-spirv` then emits functions that have a body and are decorated with `Import`, which fails SPIR-V validation: ``` A function definition (an OpFunction with basic blocks) cannot be decorated with the Import Linkage Type. ``` https://github.com/llvm/llvm-project/pull/202891 _______________________________________________ cfe-commits mailing list [email protected] https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
