xcode LLVM 5.1 clang error

北城以北 提交于 2019-11-28 21:38:24
matt

There is no such thing as -fno-obj-arc. This never was working correctly; you just weren't seeing the warnings. The correct form is -fno-objc-arc.

EDIT (appended info drawn from my comments below): This is not a clang error. It is an error in the project; clang is merely reporting it. The project itself wrongly contains the -fno-obj-arc argument, probably in the Compile Sources build phase of the target (as described here: How can I disable ARC for a single file in a project?). It is easy to type the setting incorrectly; what has changed in Xcode 5.1 is merely that clang is now calling the problem to your attention. Thus, as I said before, this never was working correctly; you presumably intended to turn off ARC for certain files, but you were failing to do so, as the build argument was incorrectly entered.

Update to xcode now throws unknown compiler flags as hard errors rather than warnings. Found this to be helpful:

https://langui.sh/2014/03/10/wunused-command-line-argument-hard-error-in-future-is-a-harsh-mistress/

I figured out with a small bit of help from matt.
I was trying to figure out where to change the -fno-obj-arc and NO ONE answered that question. I found this link to be helpful... http://blog.evanmulawski.com/?p=36

Once you select build phases and compile sources, you can look next to the files in your project and change their build flags.

Thanks for the attempt guys.

export ARCHFLAGS="-Wno-error=unused-command-line-argument-hard-error-in-future"

You need to change -fno-obj-arc to -fno-objc-arc. Select project -> targets -> build phases ..see picture

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