How do I resolve linker warning “ignoring linker optimzation hint at” in XCode?

本小妞迷上赌 提交于 2019-12-22 09:01:09

问题


A google search for "ignoring linker optimzation hint" practically turns up nothing. NOTE: "optimzation" is the exact spelling :)

I'm using a 3rd party WebRTC library (libjingle_peerconnection) from Pristine in one of my apps and I get warnings when I build for my iPhone 6. I'm not sure if this warning will pop up for other devices, however, it does not appear when I build for the simulator.

I have exactly 68 of these bad boys in my build output:

ld: warning: ignoring linker optimzation hint at _cftmdl_128_neon+0xF0 because ldrInfoC.offset == 0

I'm not sure if I should notify the maintainers or if this is something I can resolve myself.


回答1:


If you're compiling the WebRTC library by yourself using build scripts, the warnings are generated because of a missing parameter in GYP_DEFINES.

In order to fix the warnings, the WebRTC library needs to be compiled again with the parameter clang_xcode=1 in the GYP_DEFINES setting, like below (only an example):

export GYP_DEFINES="$GYP_DEFINES OS=ios target_arch=arm64 clang_xcode=1"

More about the issue can be found here, on the Chromium forums: https://bugs.chromium.org/p/webrtc/issues/detail?id=5182

--

If you're not compiling the WebRTC library yourself, and instead installing the WebRTC library from a 3rd party source, I don't believe there is a fix as the warnings are stemming from the static library.



来源:https://stackoverflow.com/questions/34820679/how-do-i-resolve-linker-warning-ignoring-linker-optimzation-hint-at-in-xcode

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