## Clones latest LLVM being used by the Chromium Project, and builds a local LLVM toolchain with Polly to use the Polly optimizations in the main Thorium BUILD.gn
YEL='\033[1;33m'# Yellow
CYA='\033[1;96m'# Cyan
RED='\033[1;31m'# Red
GRE='\033[1;32m'# Green
c0='\033[0m'# Reset Text
bold='\033[1m'# Bold Text
underline='\033[4m'# Underline Text
# Error handling
yell(){echo"$0: $*" >&2;}
die(){ yell "$*";exit 111;}
try(){"$@"|| die "${RED}Failed $*";}
# --help
displayHelp (){
cd ~/chromium/src &&
python3 tools/clang/scripts/build.py --help &&
printf"\n"&&
printf"${bold}${GRE}Script to clone the latest LLVM being used by the Chromium Project, and builds a local ${c0}\n"&&
printf"${bold}${GRE}LLVM toolchain with Polly to use the Polly optimizations in the main Thorium BUILD.gn${c0}\n"&&
printf"${bold}${YEL}Use the --pgo flag to build LLVM with PGO.${c0}\n"&&