Skip to content
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

CLANG_ENABLE_OBJC_WEAK = YES fails all the builds for apps using __weak #544

Closed
vorobievalex opened this issue Feb 2, 2018 · 12 comments
Closed
Assignees

Comments

@vorobievalex
Copy link

Version 1.5.5 fails builds with:
clang: error: -fobjc-weak is not supported on the current deployment target

CLANG_ENABLE_OBJC_WEAK = YES added -fobjc-weak compilation option, what was disabled in project settings.

Regression of f356891

@segiddins
Copy link
Member

Xcode 9.3 defaults CLANG_ENABLE_OBJC_WEAK to YES

@segiddins
Copy link
Member

segiddins commented Feb 2, 2018

what deployment target does your target have?

@segiddins
Copy link
Member

Looks like the mapping for deployment targets is:

case FragileMacOSX: return getVersion() >= VersionTuple(10, 7);
case MacOSX: return getVersion() >= VersionTuple(10, 7);
case iOS: return getVersion() >= VersionTuple(5);
case WatchOS: return true;

@segiddins
Copy link
Member

Can you see if #546 fixes things for you? Thanks!

@nivanchikov
Copy link

@segiddins I'm also facing this issue on deployment target = 9.0. I didn't try lower or higher target versions. Maybe the issue is more related if MRC or ARC is used in specific pod library as opposed to making it a global setting?

@vorobievalex
Copy link
Author

#546 helps. Could it be released, please?
Thanks a lot!

@vorobievalex
Copy link
Author

vorobievalex commented Feb 3, 2018

Xcode 9.3 defaults CLANG_ENABLE_OBJC_WEAK to YES

The error appeared in some compiled pods.
For example https://github.com/TTTAttributedLabel/TTTAttributedLabel/blob/1.13.4/TTTAttributedLabel/TTTAttributedLabel.m
Explicitly setting this to NO in the app project does not help. Xcodeproj 1.5.5 overrides it.

what deployment target does your target have?

This affected several apps with deployment target 8.2, 9.0 and 10.3.

@segiddins
Copy link
Member

Can you share a project I can use to reproduce the issue (if indeed #546 does not fix it)?

@vorobievalex
Copy link
Author

@segiddins, #546 fixed this issue. Build succeed with this fix. Could it be released, please?
I just wanted to clarify earlier questions with my latest message above. Pardon for a miscommunication.

@segiddins
Copy link
Member

Released

@vorobievalex
Copy link
Author

@segiddins, thank you for a quick fix! Out team was able to quickly get back to the latest version of xcodeproj. Everything goes smoothly so far 👍

@HandongKim
Copy link

I had the same problem. But, finally, I solved the problem. The version of xcodeproj was searched for 1.5.5 and upgraded to 1.5.6, which solved the problem.

sudo gem install xcodeproj

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants