Skip to content

[5.10][CMake] Add module ABI name prefix to swift-syntax libraries #69203

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

Merged

Conversation

rintaro
Copy link
Member

@rintaro rintaro commented Oct 16, 2023

Cherry-pick #69188 into release/5.10

  • Explanation: Add SWIFT_MODULE_ABI_NAME_PREFIX CMake variable to swift-syntax libraries. Without this, (lib)sourcekitdInProc.{dylib|so|dll} was unusable if the binary links with swift-syntax via SwiftPM dependency, because sourcekitdInProc's swift-syntax symbols conflict with them. By differentiating the ABI name of the compiler's swift-syntax libraries, it can avoids name conflicts.
  • Risk: Low, no code change. -module-abi-name is a well-tested reliable option.
  • Testing: Passes current test-suite
  • Issues: rdar://116951101 , After building SwiftLint in Linux, a runtime error is generated when attempting to Lint a file. #68812
  • Reviewer: Alex Hoppen (@ahoppen), Ben Barham (@bnbarham)

Add 'Compiler' prefix to ABI names of swift-syntax libraries so that
compiler libraries (e.g. sourcekitdInProc) can be used from binaries
linking with swift-syntax (e.g. via SwiftPM)

swiftlang#68812
rdar://116951101
(cherry picked from commit 68d52bd)
@rintaro rintaro requested a review from a team as a code owner October 16, 2023 15:51
@rintaro
Copy link
Member Author

rintaro commented Oct 16, 2023

swiftlang/swift-syntax#2288
@swift-ci Please test

@rintaro
Copy link
Member Author

rintaro commented Oct 16, 2023

@swift-ci Please test Linux

JSON decoder's error message include the ABI name specified by
'-module-abi-name'.

(cherry picked from commit efcebe3)
@rintaro
Copy link
Member Author

rintaro commented Oct 16, 2023

swiftlang/swift-syntax#2297
@swift-ci Please test

@rintaro rintaro merged commit acb431b into swiftlang:release/5.10 Oct 17, 2023
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