Skip to content

[llvm] Build Windows release package with clang-cl if possible #135446

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 2 commits into from
Apr 15, 2025

Conversation

aganea
Copy link
Member

@aganea aganea commented Apr 11, 2025

If clang-cl.exe and lld-link.exe are installed in %PATH%, the Windows release build script will now use these by default, in place of MSVC. The reason for doing this is that MSVC still has, for the past year(s), a O(N^2) behavior when building certain LLVM source files, which leads to long build times (minutes per file). A report was filled here: https://developercommunity.visualstudio.com/t/ON2-in-SparseBitVectorBase-when-com/10657991

I also added a --force-msvc option to the script, to use MSVC even if clang-cl is installed.

@aganea aganea requested review from tru, mstorsjo, tstellar and zmodem April 11, 2025 22:14
@zmodem zmodem requested a review from omjavaid April 14, 2025 09:04
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.

lgtm. +omjavaid who's been working on this script lately.

Copy link
Collaborator

@tru tru left a comment

Choose a reason for hiding this comment

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

LGTM.

@aganea aganea merged commit 7cb7b2d into llvm:main Apr 15, 2025
11 checks passed
@aganea aganea deleted the feat/build_windows_package_with_clang-cl branch April 15, 2025 21:37
var-const pushed a commit to ldionne/llvm-project that referenced this pull request Apr 17, 2025
…135446)

If `clang-cl.exe` and `lld-link.exe` are installed in `%PATH%`, the
Windows release build script will now use these by default, in place of
MSVC. The reason for doing this is that MSVC still has, for the past
year(s), a O(N^2) behavior when building certain LLVM source files,
which leads to long build times (minutes per file). A report was filled
here:
https://developercommunity.visualstudio.com/t/ON2-in-SparseBitVectorBase-when-com/10657991

Also added a `--force-msvc` option to the script, to use MSVC even if
clang-cl is installed.
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