问题
I tried to built my project on Xcode with the LLVM compiler 2.0 and it gives this error:
error: unknown argument: '-fobjc-nonfragile-abi2'
I'm not familiar with the LLVM compilers, does anyone has a solution?
Removing the argument doesn't solve my problem, because my code has errors in that situation.
回答1:
That option is no longer necessary as it is the default setting now in the latest version of LLVM.
回答2:
From clang man page:
% man 1 clang ... Driver Options -Xclang arg Pass arg to the clang compiler. The -Xclang flag is a LLVM driver option for “Pass argument to the clang compiler,” and the the argument here is -fobjc-nonfragile-abi2.
So, if you put them in reversed order, the compiler will use -fobjc-nonfragile-abi2 as cflag, which isn’t, and get you the error in return.
Looki Looki here: http://digdog.tumblr.com/post/833744044
来源:https://stackoverflow.com/questions/4909019/fobjc-nonfragile-abi2-on-llvm-compiler-2-0-unknow-argument