If the hipcc compiler cannot be found in dejagnu's tool_root_dir, look
for it in $::env(ROCM_PATH) (if set). If hipcc is still not found,
fallback to "hipcc" so the compiler will be searched in the PATH. This
removes the fallback to the hard-coded "/opt/rocm/bin" prefix.
This change is done so ROCM tools are searched in a uniform manner.
Approved-By: Simon Marchi <simon.marchi@efficios.com>
global tool_root_dir
if {![is_remote host]} {
set hipcc [lookfor_file $tool_root_dir hipcc]
- if {$hipcc == ""} {
- set hipcc [lookfor_file /opt/rocm/bin hipcc]
+ if {$hipcc eq "" && [info exists ::env(ROCM_PATH)]} {
+ set hipcc [lookfor_file $::env(ROCM_PATH)/bin hipcc]
+ }
+ if {$hipcc eq ""} {
+ set hipcc hipcc
}
} else {
set hipcc ""