Skip to content

Fix Findzstd.cmake for compiler-rt with MSVC #98645

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
Jul 12, 2024

Conversation

yxsamliu
Copy link
Collaborator

@yxsamliu yxsamliu commented Jul 12, 2024

When building compiler-rt with MSVC, CMAKE_INSTALL_LIBDIR and CMAKE_INSTALL_BINDIR are empty.

This causes error in Findzstd.cmake like the following:

CMake Error at C:/llvm/cmake/modules/Findzstd.cmake:39 (string):
string sub-command REGEX, mode REPLACE: regex "$" matched an empty string.

Do not do the REGEX when CMAKE_INSTALL_LIBDIR and CMAKE_INSTALL_BINDIR are empty.

Similar issues were reported by others at

e7fc754

@yxsamliu yxsamliu requested review from nga888 and kzhuravl July 12, 2024 14:59
@llvmbot llvmbot added the cmake Build system in general and CMake in particular label Jul 12, 2024
When building compiler-rt with MSVC, CMAKE_INSTALL_LIBDIR and CMAKE_INSTALL_BINDIR
are empty.

This causes error in Findzstd.cmake like the following:

CMake Error at C:/llvm/cmake/modules/Findzstd.cmake:39 (string):
  string sub-command REGEX, mode REPLACE: regex matched an empty string.

Do not do the REGEX when CMAKE_INSTALL_LIBDIR and CMAKE_INSTALL_BINDIR are empty.

Similar issues were reported by others at

llvm@e7fc754
@yxsamliu yxsamliu merged commit 216db5e into llvm:main Jul 12, 2024
4 of 6 checks passed
aaryanshukla pushed a commit to aaryanshukla/llvm-project that referenced this pull request Jul 14, 2024
When building compiler-rt with MSVC, CMAKE_INSTALL_LIBDIR and
CMAKE_INSTALL_BINDIR are empty.

This causes error in Findzstd.cmake like the following:

CMake Error at C:/llvm/cmake/modules/Findzstd.cmake:39 (string):
string sub-command REGEX, mode REPLACE: regex "$" matched an empty
string.

Do not do the REGEX when CMAKE_INSTALL_LIBDIR and CMAKE_INSTALL_BINDIR
are empty.

Similar issues were reported by others at


llvm@e7fc754
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.

3 participants