Skip to content

Conversation

harlanhaskins
Copy link
Contributor

The linker expects to see mangled symbols in the TBD, otherwise it won't
be able to link anything. Use LLVM's mangler to mangle them.

Fixes rdar://54055049

The linker expects to see mangled symbols in the TBD, otherwise it won't
be able to link anything. Use LLVM's mangler to mangle them.

Fixes rdar://54055049
@harlanhaskins
Copy link
Contributor Author

@swift-ci please smoke test

@@ -25,6 +25,7 @@
#include "llvm/ADT/StringRef.h"
#include "llvm/ADT/StringSet.h"
#include "llvm/IR/Module.h"
#include "llvm/IR/Mangler.h"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nitpick: the alphabet

@cachemeifyoucan
Copy link
Contributor

Does the test failure means swift TBDGen is not getting the compatibility version/current version correctly?

@harlanhaskins
Copy link
Contributor Author

TAPI has started defaulting compatibility-version to 0 in its TBDs, which I think is wrong. But I don't want to stray from what TAPI is doing, since we're using llvm/TextAPI I think we should use whatever it thinks the default should be.

@harlanhaskins
Copy link
Contributor Author

harlanhaskins commented Oct 17, 2019

For a Swift-only framework, TAPI produced this for the HeadersOnly TBD:

--- !tapi-tbd-v3
archs:           [ x86_64 ]
platform:        macosx
flags:           [ installapi ]
install-name:    '<redacted>'
current-version: 202
compatibility-version: 0
...

@cyndyishida
Copy link
Contributor

For a Swift-only framework, TAPI produced this for the HeadersOnly TBD:

--- !tapi-tbd-v3
archs:           [ x86_64 ]
platform:        macosx
flags:           [ installapi ]
install-name:    '<redacted>'
current-version: 202
compatibility-version: 0
...

This is the intended behavior, there's discussion/explanation in #27736

@harlanhaskins
Copy link
Contributor Author

@swift-ci please smoke test

@harlanhaskins harlanhaskins merged commit e69fa3b into swiftlang:master Oct 17, 2019
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.

4 participants