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

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

Reviewed By: ldionne

Differential Revision: https://reviews.llvm.org/D139306
This commit is contained in:
David Spickett
2022-12-05 11:53:06 +00:00
parent 3e4ae76d03
commit 500587e23d

View File

@@ -405,6 +405,10 @@ function configure_llvmCore() {
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"