compiling with clang and plugin

佐手、 提交于 2019-12-05 19:43:53

I always thought it "natural" to run clang twice, but it is a valid question.

I don't think you are doing anything wrong, but I believe (didn't dig too much into clang sources) what is happening is that all Xclang are forwarded to the cc1 part of clang which create temp files to accommodate the plugin runs. However, when the linker is evoked as a separate process those files are not there anymore, hence the error.
You can see all that by using -v option on all those commands.

I'm not sure if this possible, but this SO thread might provide a clue to the right direction.

You need to use -add-plugin instead of -plugin

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!