How to disable Linker Warnings from static libraries on xcode?
Asked Answered
B

0

8

In my current Swift project, I have a 3rd party static library, added through the Build Phases > "Link Binary With Libraries" section.

After updating to xcode 8.3, this library started throwing some linker warnings (e.g.: pointer not aligned at address 0x00000 from libraryFile.a)

As pointed out by other answers (https://mcmap.net/q/89422/-disable-warnings-in-xcode-from-frameworks and https://mcmap.net/q/88962/-in-xcode-how-to-suppress-all-warnings-in-specific-source-files), the compiler warnings could be ignored by adding a flag to the library code.

However, in my case, the libraries are static, and the warning are from the linker. Is there a way to disable linker warning from static 3rd party libraries on xcode?

Bearskin answered 6/4, 2017 at 17:20 Comment(3)
if you are linking non position independent code... do you really want to ignore the warning?Obeah
I have already notified the library creators about the issue, and since I cannot edit their code, there isn't pretty much I can do about it. While I wait for their update, I would like to fix my CI, which is broken by these warnings since its xcode was updated.Bearskin
I am not sure what is breaking your CI, if it is anything on stderr or an exit code... if it is stderr you could redirect to stdout if it is an exit code, it is probably more than a warning...Obeah

© 2022 - 2024 — McMap. All rights reserved.