Skip to content

[llvm-mt] Do not build llvm-mt if not functional #134631

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 4 commits into from
Apr 8, 2025

Conversation

Meinersbur
Copy link
Member

@Meinersbur Meinersbur commented Apr 7, 2025

llvm-mt requires libxml2 to work, so do not even build it without libxml2.

CMake 3.31 and later prefer llvm-mt.exe over Microsoft's mt.exe if available and using clang-cl.exe as CMAKE_CXX_COMPILER. When CMake picks up llvm-mt.exe without libxml2, any build will fail with the message

llvm-mt: error: no libxml2

Bug report: #134237

Any test except --help already uses REQUIRES: libxml2. There is no point in having a non-functional executable. Not building llvm-mt.exe will force CMake to use Microsoft's mt.exe instead.

@Meinersbur Meinersbur requested a review from zmodem April 7, 2025 13:55
@Meinersbur Meinersbur requested a review from nico April 7, 2025 13:56
Copy link
Collaborator

@zmodem zmodem left a comment

Choose a reason for hiding this comment

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

This only seems to remove the llvm-mt dependency in llvm/test/CMakeLists.txt. I think llvm-mt will still get built, since llvm/tools/CMakeLists.txt includes llvm/tools/llvm-mt/CMakeLists.txt ?

Copy link
Collaborator

@zmodem zmodem left a comment

Choose a reason for hiding this comment

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

D'oh, for some reason I didn't see your change to llvm/tools/llvm-mt/CMakeLists.txt, which is the important one. Now it makes more sense :)

@Meinersbur Meinersbur merged commit 8b11c39 into llvm:main Apr 8, 2025
11 of 12 checks passed
@llvm-ci
Copy link
Collaborator

llvm-ci commented Apr 8, 2025

LLVM Buildbot has detected a new failure on builder clangd-ubuntu-tsan running on clangd-ubuntu-clang while building llvm at step 2 "checkout".

Full details are available at: https://lab.llvm.org/buildbot/#/builders/134/builds/16500

Here is the relevant piece of the build log for the reference
Step 2 (checkout) failure: update (failure)
git version 2.17.1
fatal: unable to access 'https://github.com/llvm/llvm-project.git/': Could not resolve host: github.com
fatal: unable to access 'https://github.com/llvm/llvm-project.git/': Could not resolve host: github.com

petrhosek added a commit to petrhosek/llvm-zorg that referenced this pull request Apr 18, 2025
petrhosek added a commit to llvm/llvm-zorg that referenced this pull request Apr 18, 2025
@Meinersbur Meinersbur deleted the llvm_llvm-mt branch April 29, 2025 15:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants