Skip to content

[Build] Fix linking of llbuild #1965

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
merged 1 commit into from
Aug 7, 2025
Merged

Conversation

drexin
Copy link
Contributor

@drexin drexin commented Aug 7, 2025

In the cmake build, the lilbrary to link was specified as libllbuild, which caused the build to pass -llibllbuild to the linker, instead of -lllbuild.

In the cmake build, the lilbrary to link was specified as `libllbuild`, which caused the build to pass `-llibllbuild` to the linker, instead of `-lllbuild`.
@drexin
Copy link
Contributor Author

drexin commented Aug 7, 2025

@swift-ci test

@artemcm artemcm self-requested a review August 7, 2025 00:24
@drexin drexin merged commit 30e5aa1 into swiftlang:main Aug 7, 2025
3 checks passed
@compnerd
Copy link
Member

compnerd commented Aug 7, 2025

The original spelling is correct. The problem is that llbuild is the executable target and the library target is libllbuild.

See https://github.com/swiftlang/swift-llbuild/blob/main/products/llbuild/CMakeLists.txt#L4
https://github.com/swiftlang/swift-llbuild/blob/main/products/libllbuild/CMakeLists.txt#L10

The fact that -llibllbuild is correct given the name of the target (liblibllbuild). However, the output name is tweaked to be renamed to libllbuild at https://github.com/swiftlang/swift-llbuild/blob/main/products/libllbuild/CMakeLists.txt#L13.

This change broke the early swift-driver on windows.

@drexin drexin deleted the wip-fix-linking branch August 8, 2025 16:21
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.

3 participants