Skip to content

[5.9][CMake] Add option to specify '-module-abi-name' #2289

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 #2282 into release/5.9

  • 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. swift#68812
  • Reviewer: Alex Hoppen (@ahoppen), Ben Barham (@bnbarham)

@rintaro
Copy link
Member Author

rintaro commented Oct 16, 2023

@swift-ci Please test

1 similar comment
@rintaro
Copy link
Member Author

rintaro commented Oct 16, 2023

@swift-ci Please test

Add 'SWIFT_MODULE_ABI_NAME_PREFIX' CMake variable. This can be used from
compiler's CMake so its swift-syntax libraries can have unique names.
That avoids symbol name conflicts when compiler libraries (e.g.
sourcekitdInProc) is used from binaries linking with swift-syntax (e.g.
via SwiftPM)

swiftlang/swift#68812
rdar://116951101

(cherry picked from commit 093b895)
(cherry picked from commit d8c8695)
@rintaro rintaro force-pushed the 5.9-cmake-abi-name-rdar116951101 branch from 342b0bd to 3ede5a0 Compare October 16, 2023 23:25
@rintaro
Copy link
Member Author

rintaro commented Oct 16, 2023

@swift-ci Please test

@rintaro
Copy link
Member Author

rintaro commented Oct 17, 2023

@swift-ci Please test Windows

@rintaro rintaro merged commit 9a101b7 into swiftlang:release/5.9 Oct 24, 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