New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
darwinssl: fix compiler warnings #1705
Conversation
I know those weak-link check lines were raising warnings, but I wonder if this change is the right thing to do. Because, according to ADC, the original code did the right thing: https://developer.apple.com/library/content/documentation/MacOSX/Conceptual/BPFrameworks/Concepts/WeakLinking.html (and scroll down to "Using Weakly Linked Symbols"). |
Yeah, I just tried building this branch with the compiler option "-mmacosx-version-min=10.6" and got a number of build errors:
I think wrapping the code in "@available" as the message above recommends would be a better fix. The catch is, it's an extension that was added to LLVM 5.0, so if we use it, we'll break building with GCC on older macOS releases. (And I'm okay with that, actually.) |
Ok, so my take was plain wrong. Thanks for clarifying that @nickzman ! I figure a fix based on @available should be fine. I would presume we can even make an #ifdef thing to make older compilers without support for that construct to not use it. Would you be able to write up a take on that, @nickzman ? |
I started on it, but it appears that the C equivalent function (__builtin_available()) only builds correctly in the Xcode 9 beta, which means we'll solve the build warnings, but blow away a lot more backward compatibility than I thought we'd blow away. I'll continue, but when I'm done, it probably shouldn't be merged until after Xcode 9 launches this fall. |
I'll experiment with silencing them by simply ignoring that specific error. I'll close this and open a new PR with that approach. |
No description provided.