-
Notifications
You must be signed in to change notification settings - Fork 12.4k
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
[cmake] Extend zstd.dll finding logic from MSVC to WIN32 in general #121437
Conversation
Extend the special logic for finding `zstd.dll` in `Findzstd` to apply to all Windows configurations rather than just MSVC. From what I understand, this naming scheme is specific to Windows in general, rather than "Windows with MSVC", and `.lib` files are always used to link to shared libraries. I could reproduce the original problem when using Clang with Conda-installed LLVM, and extending the logic to `WIN32` seems to fix it for me. That said, I'm not an expert on Windows and I have only done very limited testing, so I'd appreciate if someone could double check that I'm not breaking some workflow. Fixes llvm#121345
Instead of unconditionally assuming MSVC-alike behavior for WIN32 that could negatively impact MSVC, use `CMAKE_CXX_SIMULATE_ID` to detect Clang using MSVC ABI. Note that this variable is unset for MSVC itself, so use it alternatively to MSVC. Thanks to @isuruf for the suggestion (conda-forge/llvmdev-feedstock#306 (comment)).
Updated to avoid breaking MinGW. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM.
LLVM Buildbot has detected a new failure on builder Full details are available at: https://lab.llvm.org/buildbot/#/builders/146/builds/1977 Here is the relevant piece of the build log for the reference
|
Extend the special logic for finding
zstd.dll
inFindzstd
to apply to all Windows configurations rather than just MSVC. From what I understand, this naming scheme is specific to Windows in general, rather than "Windows with MSVC", and.lib
files are always used to link to shared libraries. I could reproduce the original problem when using Clang with Conda-installed LLVM, and extending the logic toWIN32
seems to fix it for me.That said, I'm not an expert on Windows and I have only done very limited testing, so I'd appreciate if someone could double check that I'm not breaking some workflow.
Fixes #121345