-fobjc-nonfragile-abi2 on LLVM compiler 2.0: unkno

2019-08-22 16:09发布

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.

2条回答
太酷不给撩
2楼-- · 2019-08-22 16:30

That option is no longer necessary as it is the default setting now in the latest version of LLVM.

查看更多
家丑人穷心不美
3楼-- · 2019-08-22 16:46

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

查看更多
登录 后发表回答