build-llvm: Simplify handling of the --pgo=<file> option
These variable expansions/modifications work the same if the option "--pgo" is specified - so either we can simplify the stripping of the "--pgo=" prefix, or we can just skip the check, similar to the case above with --instrumented.
This commit is contained in:
1 parent
a57c32023b
commit
ebde75f350
1 file changed
+2
-6
+2
-6
@@ -81,12 +81,8 @@ while [ $# -gt 0 ]; do
|
||||
# A fixed BUILDDIR is set at the end for this case.
|
||||
;;
|
||||
--pgo|--pgo=*)
|
||||
case "$1" in
|
||||
--pgo=*)
|
||||
LLVM_PROFDATA_FILE="${1#--pgo}"
|
||||
LLVM_PROFDATA_FILE="${LLVM_PROFDATA_FILE#=}"
|
||||
;;
|
||||
esac
|
||||
LLVM_PROFDATA_FILE="${1#--pgo}"
|
||||
LLVM_PROFDATA_FILE="${LLVM_PROFDATA_FILE#=}"
|
||||
LLVM_PROFDATA_FILE="${LLVM_PROFDATA_FILE:-profile.profdata}"
|
||||
if [ ! -e "$LLVM_PROFDATA_FILE" ]; then
|
||||
echo Profile \"$LLVM_PROFDATA_FILE\" not found
|
||||
|
||||
Reference in new issue
Block a user