This is an archive of the discontinued LLVM Phabricator instance.

Windows packaging script. Include lld-link, llvm-lib and llvm-windres from stage0
ClosedPublic

Authored by CarlosAlbertoEnciso on Jul 12 2022, 5:11 AM.

Details

Summary

Update the Windows packaging script.

As discussed on:

https://discourse.llvm.org/t/build-llvm-release-bat-script-options/63146/6
  • Refactor the build steps into functions
  • In stage1 use the following binaries from stage0: lld-link, llvm-lib and llvm-windres
  • Add the '-y' switch to 7-zip (assume Yes on all queries)
  • Remove any previous build directory

Diff Detail

Event Timeline

CarlosAlbertoEnciso requested review of this revision.Jul 12 2022, 5:11 AM
CarlosAlbertoEnciso created this revision.

Test results for 32-bits - stage0

[0/1] Running lld test suite

  • Testing: 2597 tests, 12 workers --

Testing: 0.. 10.. 20.. 30.. 40.. 50.. 60.. 70.. 80.. 90..

Testing Time: 43.27s

Unsupported      :   40
Passed           : 2556
Expectedly Failed:    1

[41/42] Running sanitizer_common tests

  • Testing: 687 tests, 12 workers --

Testing: 0.. 10.. 20.. 30.. 40.. 50.. 60.. 70.. 80.. 90..

Testing Time: 5.67s

Unsupported: 388
Passed     : 299

Test results for 32-bits - stage1

[0/1] Running lld test suite

  • Testing: 2597 tests, 12 workers --

Testing: 0.. 10.. 20.. 30.. 40.. 50.. 60.. 70.. 80.. 90..

Testing Time: 46.23s

Unsupported      :   40
Passed           : 2556
Expectedly Failed:    1

[41/42] Running sanitizer_common tests

  • Testing: 687 tests, 12 workers --

Testing: 0.. 10.. 20.. 30.. 40.. 50.. 60.. 70.. 80.. 90..

Testing Time: 5.97s

Unsupported: 388
Passed     : 299

Test results for 64-bits - stage0

[596/597] Running the LLVM regression tests

  • Testing: 47009 tests, 12 workers --

Testing: 0.. 10.. 20.. 30.. 40.. 50.. 60.. 70.. 80.. 90..

Testing Time: 316.20s

Unsupported      :  1534
Passed           : 45310
Expectedly Failed:   165

[241/242] Running the Clang regression tests

  • Testing: 29800 tests, 12 workers --

Testing: 0.. 10.. 20.. 30.. 40.. 50.. 60.. 70.. 80.. 90..

Testing Time: 623.47s

Skipped          :     4
Unsupported      :   249
Passed           : 29517
Expectedly Failed:    30

[0/1] Running lld test suite

  • Testing: 2597 tests, 12 workers --

Testing: 0.. 10.. 20.. 30.. 40.. 50.. 60.. 70.. 80.. 90..

Testing Time: 43.85s

Unsupported      :   40
Passed           : 2556
Expectedly Failed:    1

[41/42] Running sanitizer_common tests

  • Testing: 703 tests, 12 workers --

Testing: 0.. 10.. 20.. 30.. 40.. 50.. 60.. 70.. 80.. 90..

Testing Time: 9.98s

Unsupported: 388
Passed     : 315

[47/48] Running the Clang extra tools' regression tests

  • Testing: 1137 tests, 12 workers --

Testing: 0.. 10.. 20.. 30.. 40.. 50.. 60.. 70.. 80.. 90..

Testing Time: 25.49s

Unsupported      :   10
Passed           : 1125
Expectedly Failed:    2

[102/103] Running the Clangd regression tests

  • Testing: 1120 tests, 12 workers --

Testing: 0.. 10.. 20.. 30.. 40.. 50.. 60.. 70.. 80.. 90..

Testing Time: 15.32s

Unsupported:   12
Passed     : 1108

Test results for 64-bits - stage1

[596/597] Running the LLVM regression tests

  • Testing: 47009 tests, 12 workers --

Testing: 0.. 10.. 20.. 30.. 40.. 50.. 60.. 70.. 80.. 90..

Testing Time: 321.01s

Unsupported      :  1534
Passed           : 45310
Expectedly Failed:   165

[241/242] Running the Clang regression tests

  • Testing: 29800 tests, 12 workers --

Testing: 0.. 10.. 20.. 30.. 40.. 50.. 60.. 70.. 80.. 90..

Testing Time: 561.87s

Skipped          :     4
Unsupported      :   249
Passed           : 29517
Expectedly Failed:    30

[0/1] Running lld test suite

  • Testing: 2597 tests, 12 workers --

Testing: 0.. 10.. 20.. 30.. 40.. 50.. 60.. 70.. 80.. 90..

Testing Time: 44.46s

Unsupported      :   40
Passed           : 2556
Expectedly Failed:    1

[41/42] Running sanitizer_common tests

  • Testing: 703 tests, 12 workers --

Testing: 0.. 10.. 20.. 30.. 40.. 50.. 60.. 70.. 80.. 90..

Testing Time: 9.64s

Unsupported: 388
Passed     : 315

[47/48] Running the Clang extra tools' regression tests

  • Testing: 1137 tests, 12 workers --

Testing: 0.. 10.. 20.. 30.. 40.. 50.. 60.. 70.. 80.. 90..

Testing Time: 24.73s

Unsupported      :   10
Passed           : 1125
Expectedly Failed:    2

[102/103] Running the Clangd regression tests

  • Testing: 1120 tests, 12 workers --

Testing: 0.. 10.. 20.. 30.. 40.. 50.. 60.. 70.. 80.. 90..

Testing Time: 13.92s

Unsupported:   12
Passed     : 1108
hans added inline comments.Jul 13 2022, 5:47 AM
llvm/utils/release/build_llvm_release.bat
71

I don't think we should do this. I think we should exit and let the user decide what to do.

78–79

What are the 7z queries that need "yes"? I don't remember seeing any.

107

Is there a reason for these new variables, instead of just using `%python32_dir%' "inline" as in the old code?

163

These flags seem new?

168

Could the LINKER, AR, and RC changes be done separately from this patch?

llvm/utils/release/build_llvm_release.bat
71

Changed to Displays a message and exit.

78–79

Removed the -y flag.
It was left there before the change to remove any existing build directory to overwrite the existing files being extracted.

107

Just to add clarity about the location of Pyhton. The only variable that I think is good to keep is PYTHONHOME.

163

Sorry. These are from another unrelated change. Removed.

168

Removed LINKER, AR and RC options. To be done separately.

hans added inline comments.Jul 15 2022, 11:44 AM
llvm/utils/release/build_llvm_release.bat
72

nit: I'd drop the comment here, the code is clear enough.

145

I don't think we were setting PYTHON_EXECUTABLE before?

167–168

If this or some other build step fails, we would previously exit the script. Now I think we will just exit this "sub routine". Is that what we want?

Address @hans feedback

  • Remove PYTHON_EXECUTABLE variable.
  • Keep original behaviour: exit script on any build/test failure.
hans accepted this revision.Jul 18 2022, 7:03 AM

lgtm, thanks!

Please update the commit message to indicate that this is just doing the sub routines part.

This revision is now accepted and ready to land.Jul 18 2022, 7:03 AM
This revision was landed with ongoing or failed builds.Jul 18 2022, 9:56 PM
This revision was automatically updated to reflect the committed changes.

@hans Thanks for all your feedback.

llvm/utils/release/build_llvm_release.bat
72

Done.

145

You are right. It is not needed.

167–168

Good point.
To preserve the previous behaviour, adding code to exit the script if the function fails.

Note: This patch only includes:

  • Refactor the build/test steps into functions.
  • Exit the script if the build directory already exists.