#!/bin/bash # Copyright (c) Advanced Micro Devices, Inc., or its affiliates. # # SPDX-License-Identifier: MIT SOURCE="${BASH_SOURCE[0]}" HIP_PATH="$( command cd -P "$( dirname "$SOURCE" )/.." && pwd )" HIP_COMPILER=$(eval "$HIP_PATH/bin/hipconfig --compiler") if [ "$HIP_COMPILER" = "hcc" ]; then HCC_HOME=$1 $HIP_PATH/bin/hipcc "${@:2}" elif [ "$HIP_COMPILER" = "clang" ]; then HIP_CLANG_PATH=$1 $HIP_PATH/bin/hipcc "${@:2}" else $HIP_PATH/bin/hipcc "${@:1}" fi