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

llvm-shlib: Fix libLLVM-${MAJOR}.so symlink on MacOS #85163

Merged
merged 1 commit into from
Mar 15, 2024

Conversation

tstellar
Copy link
Collaborator

This is a partial revert of 10c48a7 with a fix for the symlink target name on MacOS

See #84637

This is a partial revert of 10c48a7
with a fix for the symlink target name on MacOS

See llvm#84637
@llvmbot llvmbot added the cmake Build system in general and CMake in particular label Mar 14, 2024
@tstellar tstellar requested a review from nikic March 14, 2024 00:54
Copy link
Contributor

@nikic nikic left a comment

Choose a reason for hiding this comment

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

LGTM

@tstellar tstellar merged commit ec2b752 into llvm:main Mar 15, 2024
6 checks passed
@mstorsjo
Copy link
Member

This broke building the dylib for mingw platforms, see e.g. https://github.com/mstorsjo/llvm-mingw/actions/runs/8303983325/job/22728993479:

CMake Error:
  Error evaluating generator expression:

    $<TARGET_SONAME_FILE_NAME:LLVM>

  TARGET_SONAME_FILE is not allowed for DLL target platforms.

Could we revert this until we sort it out, to get my builds back to green?

@tstellar
Copy link
Collaborator Author

@mstorsjo What symlinks / library names do you expect for mingw?

@mstorsjo
Copy link
Member

@mstorsjo What symlinks / library names do you expect for mingw?

I see the other recent changes here have regressed how libLLVM is set up for mingw, #82660 and/or #79376), so I see this behaves worse for 18.1.0 final, while it was ok in earlier RCs.

The ideal situation for mingw is like it was before all these changes; bin/libLLVM-18.dll coupled with lib/libLLVM.dll.a, no symlinks needed.

@tstellar
Copy link
Collaborator Author

@mstorsjo What files are currently produced? Is there a libLLVM.dll.18.1 file ?

@mstorsjo
Copy link
Member

@mstorsjo What files are currently produced? Is there a libLLVM.dll.18.1 file ?

Currently, before this change, the build produces bin/libLLVM.dll and lib/libLLVM.dll.a, and on install it adds bin/libLLVM-19git.dll as a symlink to bin/libLLVM.dll. (And currently after this change, the build fails at the cmake stage.)

@tstellar
Copy link
Collaborator Author

Can you try this fix: #85554

@mstorsjo
Copy link
Member

Can you try this fix: #85554

Thanks, this fixes the immediate build break.

I can look into fixing the rest of the situation later when I have time (in a day or two). Previously, the effective “soname” on windows was libLLVM-18.dll, but now it is libLLVM.dll, entirely lacking the version component. (The versioned libLLVM-18.dll is installed as a symlink, but the other binaries reference the unversioned name.)

llvmbot pushed a commit to llvmbot/llvm-project that referenced this pull request Mar 19, 2024
This is a partial revert of 10c48a7
with a fix for the symlink target name on MacOS

See llvm#84637

(cherry picked from commit ec2b752)
llvmbot pushed a commit to llvmbot/llvm-project that referenced this pull request Mar 19, 2024
This is a partial revert of 10c48a7
with a fix for the symlink target name on MacOS

See llvm#84637

(cherry picked from commit ec2b752)
@pointhex pointhex mentioned this pull request May 7, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cmake Build system in general and CMake in particular
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants