SWDEV-330775 - Update search path for LLVM

ROCm's LLVM will be moved into /opt/rocm-<ver>/lib/, teach hipcc and
hipconfig about the new location.

Change-Id: Ie7f17146771aff94c684deb22148226cbb3a2895
This commit is contained in:
Siu Chi Chan
2022-10-13 14:28:06 -04:00
committed by Mark Searles
vanhempi c9ce9b3300
commit 3d15f9cbda
5 muutettua tiedostoa jossa 28 lisäystä ja 7 poistoa
+10 -1
Näytä tiedosto
@@ -137,7 +137,16 @@ find_rocm_executable_or_fail() {
local -r command="$1"; shift
local file
local searched=()
for dir in "$BASE_DIR" "${HIP_CLANG_PATH:-"$BASE_DIR/../../llvm/bin"}"; do
# Look for LLVM directory in ROCm's directory structure
local rocm_llvm_dir_root=`realpath $BASE_DIR/../lib`
local llvm_dir=`find "$rocm_llvm_dir_root" -maxdepth 1 -regextype posix-extended -regex ".*/llvm-[0-9]{2,}" -type d,l | sort -r`
local llvm_bin_dir=()
for d in $llvm_dir; do
llvm_bin_dir+=("$d/bin")
done
for dir in "$BASE_DIR" "${HIP_CLANG_PATH:-"$BASE_DIR/../../llvm/bin"}" ${llvm_bin_dir[*]}; do
file="$dir/$command"
if [[ -x $file ]]; then
printf "%s" "$file"