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

Update Swift-mangled NSCFConstantString class name #1006

Merged
merged 1 commit into from
Jun 10, 2017
Merged

Conversation

e78l
Copy link
Contributor

@e78l e78l commented May 22, 2017

Fixing:

ld: warning: undefined base symbol '__TMC15SwiftFoundation19_NSCFConstantString' for alias '___CFConstantStringClassReference'
Undefined symbols for architecture x86_64:
  "__T015SwiftFoundation21__CFSwiftGetBaseClassyXlXpyF", referenced from:
      ___CFInitialize in libCoreFoundation.a(CFRuntime.o)
ld: symbol(s) not found for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)

Split from #988 (this has somewhat higher risk of breaking on some Macs, maybe)

@parkera
Copy link
Member

parkera commented May 24, 2017

Just to be clear on this: this is the mangled name produced by the top of tree Swift compiler right?

@e78l e78l changed the title Update mangled Swift class+function names for CF Update Swift-mangled NSCFConstantString class name May 24, 2017
@e78l
Copy link
Contributor Author

e78l commented May 24, 2017

Hello Tony,
Thanks for asking - I use snapshots on macOS, and when checking with swift-DEVELOPMENT-SNAPSHOT-2017-05-23-a, only the string warning appears:

ld: warning: undefined base symbol '__TMC15SwiftFoundation19_NSCFConstantString' for alias '___CFConstantStringClassReference'

Looks like the AnyObject part of the class name isn't in the Swift 4 branch. (When I submitted the PR, I was using the 5/15 swift 4 snapshot)

So, I've dropped the CFRuntime init name change, but kept the SymbolAliases change.
As I mentioned in #988, I think it would be better to have a script determine these mangled names at build time, but I'm not sure how to get them.

@parkera
Copy link
Member

parkera commented Jun 10, 2017

I think we're actually going to be ok for the long term once Swift 4 ships - changing mangling is a big deal and I'm hoping it calms down now.

@parkera parkera merged commit e6853f4 into apple:master Jun 10, 2017
@e78l e78l deleted the macos3 branch June 10, 2017 18:32
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

Successfully merging this pull request may close these issues.

2 participants