This is an archive of the discontinued LLVM Phabricator instance.

Add script to download prerequisites for Windows build
AbandonedPublic

Authored by pbo-linaro on Oct 6 2022, 3:46 AM.

Details

Summary

llvm/utils/release/download_prerequisites.bat
usage: <out_folder>

This script downloads needed dependencies in <out_folder> and create an
activate.bat script to load them on PATH.

In build_llvm_release.bat, add an option --download-prerequisites that
calls this script before doing the build.

Example: build_llvm_release.bat --version 15.0.0 --x64 --download-prerequisites

Diff Detail

Event Timeline

pbo-linaro created this revision.Oct 6 2022, 3:46 AM
Herald added a project: Restricted Project. · View Herald TranscriptOct 6 2022, 3:46 AM
pbo-linaro requested review of this revision.Oct 6 2022, 3:46 AM
Herald added a project: Restricted Project. · View Herald Transcript
pbo-linaro updated this revision to Diff 465698.Oct 6 2022, 4:04 AM

rebased commit

Would a README.md help to understand what the requirements are without having to read batch scripts?

pbo-linaro added a comment.EditedOct 6 2022, 10:35 AM

Would a README.md help to understand what the requirements are without having to read batch scripts?

No problem to add one, but it's redundant information. Will future commiters think to update both? I tried to make the beginning of the script readable, so people can see directly what is done.

hans added inline comments.Oct 7 2022, 7:43 AM
llvm/utils/release/download_prerequisites.bat
17

Whoa, I had not realized pushd/popd is a thing on Windows.

37

I suppose VS is tricky, but for Python and Perl, it would be *really* nice if they could also be handled automatically. Don't they have any official zip files we could use?

93

copy-paste-o from get_7z?

101

Clever :)

128

I'll be very happy not to have to do this manually ever again :-)

151

I'm not actually sure we need nuget at the moment? It was used when we built the visual studio clang-format plugin, but that was dropped a while ago.

pbo-linaro marked 3 inline comments as done.Oct 7 2022, 7:52 AM
pbo-linaro added inline comments.
llvm/utils/release/download_prerequisites.bat
37

Python and Perl have portable version, but as discussed here, the python used for build will be a dependency at runtime for lldb. Since that involves to packages python *with* llvm release, there is more work involved.

For Perl, I don't know exactly how it's used, but the comment "OpenMP runtime" made me adopt a prudent approach.

93

Good catch, thanks

128

yes. The worse part in this script was finding how to escape url. Batch is really... exotic, to stay polite.

151

Ok, I can probably remove this then. Just included that based on an original comment.

hans added inline comments.Oct 11 2022, 5:22 AM
llvm/utils/release/download_prerequisites.bat
37

The current Python version used for the win releases is 3.10.5. Since we're already using it to build, we might as well hard-code it here. If there is a way to download and extract that without running commands manually it would be very handy.

pbo-linaro abandoned this revision.Jan 31 2023, 3:48 AM
pbo-linaro marked 3 inline comments as done.