[PATCH] D139306: [LLVM][Release] Prevent empty runtime name

David Spickett via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Dec 5 04:02:28 PST 2022


DavidSpickett created this revision.
Herald added a project: All.
DavidSpickett requested review of this revision.
Herald added a project: LLVM.
Herald added a subscriber: llvm-commits.

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 ';'.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D139306

Files:
  llvm/utils/release/test-release.sh


Index: llvm/utils/release/test-release.sh
===================================================================
--- llvm/utils/release/test-release.sh
+++ llvm/utils/release/test-release.sh
@@ -405,6 +405,10 @@
     esac
 
     project_list=${projects// /;}
+    # Leading spaces will result in ";<runtime name>". This causes a CMake
+    # error because the empty string before the first ';' is treated as an
+    # unknown runtime name.
+    runtimes=$(echo $runtimes | sed -e 's/^\s*//')
     runtime_list=${runtimes// /;}
     echo "# Using C compiler: $c_compiler"
     echo "# Using C++ compiler: $cxx_compiler"


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D139306.480046.patch
Type: text/x-patch
Size: 616 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20221205/607fbe36/attachment.bin>


More information about the llvm-commits mailing list