Swift Mac Command Line Tool target cannot link with -ObjC flag in Xcode 7.3
| Originator: | amcknight2718 | ||
| Number: | rdar://25442928 | Date Originated: | 3/30/16 |
| Status: | Closed as duplicate | Resolved: | |
| Product: | Xcode | Product Version: | 7.3 (7D175) |
| Classification: | Serious bug | Reproducible: | Always |
Description: When linking, many duplicate symbol errors are thrown from the linker for ErrorObject and SwiftObject in libswiftRuntime.a and libswiftCore.a. This does not occur in Xcode 7.2.1 Repro steps: 1. Create new Xcode 7.3 project for a mac command line tool 2. Build and run to confirm everything works 3. Add -ObjC to OTHER_LDFLAGS 4. Try to build again 5. Try to build now in Xcode 7.2.1 Expected results: Project should build fine in both Xcode 7.2.1 and 7.3 Actual results: LD fails due to the mentioned duplicate symbol errors in Xcode 7.3, but not in Xcode 7.2.1 Setup: Version 7.3 (7D175), OS X 10.11.4 (15E65) Sample project available at https://www.dropbox.com/s/0xqt4j1kzdzen6b/swift_cli_xcode7_3.zip?dl=0
Comments
Please note: Reports posted here will not necessarily be seen by Apple. All problems should be submitted at bugreport.apple.com before they are posted here. Please only post information for Radars that you have filed yourself, and please do not include Apple confidential information in your posts. Thank you!
Seconded, Fatal bug
Tried many, many ways to work around this with no success. This is is a critical bug for our app and completely prohibits using 7.3 in our development.
Apple pls
We found a workaround
The only reason we were using -ObjC was to pull in some categories through a static library. How about you?