Files
rocm-systems/packaging/hip-rocclr.prerm
T
Tao Sang bcd067f462 Make directed_test support static libs
1.Make directed_test apps linked against static libs
    of hip, rocclr, rocr, roct and amd_comgr.
    2.Remove custom_target amdhip64_static_combiner.
    3.Support EXCLUDE_HIP_LIB_TYPE <static|shared>.
    4.Simplify argument list parsing.
    5.Install rocclr when rocm is installed.
    6.Fix some original small bugs.

Revert "Revert "Make directed_test support static libs""
This reverts commit 5b7533e49f.

Change-Id: I918eeae94487e5e2ff5bfde083667ac65fb6e702
2020-10-26 12:39:58 -04:00

43 строки
864 B
Bash
Исполняемый файл

#!/bin/bash
pushd () {
command pushd "$@" > /dev/null
}
popd () {
command popd "$@" > /dev/null
}
ROCMDIR=@ROCM_PATH@
ROCMLIBDIR=$ROCMDIR/lib
ROCCLRDIR=$ROCMDIR/rocclr
ROCCLRLIBDIR=$ROCMDIR/rocclr/lib
HIPDIR=$ROCMDIR/hip
HIPLIBDIR=$ROCMDIR/hip/lib
([ ! -d $ROCMDIR ] || [ ! -d $ROCCLRDIR ] || [ ! -d $HIPDIR ]) && exit 0
([ ! -d $ROCMLIBDIR ] || [ ! -d $ROCCLRLIBDIR ] || [ ! -d $HIPLIBDIR ]) && exit 0
# Remove soft-links to libraries
ROCCLRLIBFILES=$(ls -A $ROCCLRLIBDIR | grep -v [-/$])
HIPLIBFILES=$(ls -A $HIPLIBDIR | grep -v [-/$])
pushd $ROCMLIBDIR
for f in $ROCCLRLIBFILES; do
[ -e $f ] || continue
rm $(basename $f)
done
for f in $HIPLIBFILES; do
[ -e $f ] || continue
rm $(basename $f)
done
pushd cmake
unlink rocclr
unlink hip
popd
rmdir --ignore-fail-on-non-empty cmake
popd
rmdir --ignore-fail-on-non-empty $ROCMLIBDIR