-
Notifications
You must be signed in to change notification settings - Fork 10.8k
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
build_llvm_release.bat: add tarball export to x64 release #79840
Conversation
Thank you for submitting a Pull Request (PR) to the LLVM Project! This PR will be automatically labeled and the relevant teams will be If you wish to, you can add reviewers by using the "Reviewers" section on this page. If this is not working for you, it is probably because you do not have write If you have received no comments on your PR for a week, you can request a review If you have further questions, they may be answered by the LLVM GitHub User Guide. You can also ask questions in a comment on this PR, on the LLVM Discord or on the forums. |
A few thoughts:
|
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.
Apologies for the delay, this got buried in my inbox.
Thanks for sending the PR! People keep asking for this, so I think it's worth a try if people think it's useful.
I tried your patch and ended up with a 936 MB .tar.xz file :) Uncompressed it's 4.4 GB.
.tar.xz is perhaps an unusual choice on Windows. On the other hand, a zip file would be much larger. I tried with 7zip's "maximum" setting and got a 1.34 GB file. (With "ultra" it's 1.33 GB so that doesn't seem worth it.)
Do you think users would prefer a zip file even though it's a bit bigger?
|
||
:: generate tarball with install toolchain only off | ||
set filename=clang+llvm-%version%-x86_64-pc-windows-msvc | ||
cmake -GNinja %cmake_flags% -DLLVM_INSTALL_TOOLCHAIN_ONLY=OFF ^ |
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.
Shouldn't we also keep %cmake_profile_flags%
from above?
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.
fixed
-DCMAKE_INSTALL_PREFIX=%build_dir%/%filename% ..\llvm-project\llvm || exit /b 1 | ||
ninja install || exit /b 1 | ||
:: check llvm_config is present & returns something | ||
%build_dir%/%filename%/bin/llvm-config.exe --bindir |
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.
Do we need to || exit /b 1
to make it fail if it doesn't exist/works?
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.
yes, fixed
No worries
For reference clang+llvm-17.0.6-x86_64-linux-gnu-ubuntu-22.04.tar.xz is 951 MB which is in the same ball park
I don't think it matters much, the file format is supported by 7z, and this tarball is primarily intended for developers. |
Let me know if you prefer to have a squashed PR |
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
I don't think it matters much, the file format is supported by 7z, and this tarball is primarily intended for developers.
All right, let's stick with .tar.xz.
Let me know if you prefer to have a squashed PR
No, that's fine. We'll squash when merging.
Do you have commit access or would you like me to merge this for you?
Like linux releases, export a tar.xz files containing most llvm tools, including non toolchain utilities, llvm-config, llvm-link and others. We do this by reconfiguring cmake one last time at the last step, running the install target so we do not need to recompile anything. Fix llvm#51192 Fix llvm#53052
87bab70
to
786a836
Compare
Thanks for the review ! Just in case, I've squashed & rebased it on latest upstream/main Do you know whether this new archive can be added to the latest stable (17.0.6) or the next release (18.1.0-rc3 o rc4) ? |
I've added it to the 18.1.0-rc3 release (see also https://discourse.llvm.org/t/llvm-18-1-0-rc3-tagged/77116/4) and will upload the new tarball for future release builds also. |
…28432c2ad Local branch amd-gfx cb52843 Merged main:e8740d4eb1c88e968b155f73ac745f80b4681589 into amd-gfx:35293f0c8e63 Remote branch main 52ada07 build_llvm_release.bat: add tarball export to x64 release (llvm#79840)
Like linux releases, export a tar.xz files containing most llvm tools, including non toolchain utilities, llvm-config, llvm-link and others.
We do this by reconfiguring cmake one last time at the last step, running the install target so we do not need to recompile anything.
Fix #51192
Fix #53052