This is an archive of the discontinued LLVM Phabricator instance.

[LLVM][Release] Prevent empty runtime name in release script
ClosedPublic

Authored by DavidSpickett on Dec 5 2022, 4:02 AM.

Details

Summary

Unlike projects, runtimes doesn't have a default set of names.
This means you get a leading space at the start, which gets converted
to a ';' giving ";<runtime name>;<runtime name>".

CMake then errors because the "" before the first ';' is treated
as a runtime name and of course it's not a valid name.

Fix this by removing the leading spaces from runtimes before we
insert the ';'.

Diff Detail

Event Timeline

DavidSpickett created this revision.Dec 5 2022, 4:02 AM
Herald added a project: Restricted Project. · View Herald TranscriptDec 5 2022, 4:02 AM
DavidSpickett requested review of this revision.Dec 5 2022, 4:02 AM
Herald added a project: Restricted Project. · View Herald TranscriptDec 5 2022, 4:02 AM
DavidSpickett retitled this revision from [LLVM][Release] Prevent empty runtime name to [LLVM][Release] Prevent empty runtime name in release script.Dec 5 2022, 4:02 AM
DavidSpickett added a reviewer: ldionne.

Clearly this worked at some point but now I get:

CMake Error at CMakeLists.txt:160 (message):
  Runtime is not a supported runtime.  Supported runtimes are:
  libc;libunwind;libcxxabi;pstl;libcxx;compiler-rt;openmp;llvm-libgcc

If you'd expect it to ignore the empty entry I can figure out what changed on that side instead.

ldionne accepted this revision.Dec 5 2022, 5:42 AM

I think it makes more sense not to allow an empty entry (this patch) than implicitly ignore empty entries from within CMake. Thanks for fixing this.

This revision is now accepted and ready to land.Dec 5 2022, 5:42 AM