Last active
December 3, 2019 03:37
-
-
Save naetherm/b5cd5987bbffd9775e8f0a70f67c970f to your computer and use it in GitHub Desktop.
hcc
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Submitter: Olaf Leidinger <[email protected]> | |
# Maintainer: Jakub Okoński <[email protected]> | |
# Maintainer: Rigo Reddig <[email protected]> ;) | |
pkgname=hcc | |
pkgver=2.10.0 | |
pkgrel=1 | |
pkgdesc="HCC is an Open Source, Optimizing C++ Compiler for Heterogeneous Compute" | |
arch=('x86_64') | |
url="https://github.com/RadeonOpenCompute/hcc" | |
license=('NCSAOSL') | |
depends=('rocr-runtime>=2.10.0' z3) | |
makedepends=(git cmake gcc ninja z3) | |
provides=("${pkgname%-git}") | |
conflicts=("${pkgname%-git}") | |
options=(!staticlibs strip) | |
_srcver=2.10.0 | |
source=( | |
"hcc.tar.gz::https://github.com/RadeonOpenCompute/hcc/archive/roc-hcc-$_srcver.tar.gz" | |
"llvm.tar.gz::https://github.com/RadeonOpenCompute/llvm/archive/roc-hcc-$_srcver.tar.gz" | |
"compiler-rt.tar.gz::https://github.com/RadeonOpenCompute/compiler-rt/archive/roc-hcc-$_srcver.tar.gz" | |
"hcc-clang-upgrade.tar.gz::https://github.com/RadeonOpenCompute/hcc-clang-upgrade/archive/roc-hcc-$_srcver.tar.gz" | |
"clang-tools-extra.tar.gz::https://github.com/RadeonOpenCompute/clang-tools-extra/archive/roc-hcc-$_srcver.tar.gz" | |
"lld.tar.gz::https://github.com/RadeonOpenCompute/lld/archive/roc-hcc-$_srcver.tar.gz" | |
"ROCm-Device-Libs.tar.gz::https://github.com/RadeonOpenCompute/ROCm-Device-Libs/archive/roc-hcc-$_srcver.tar.gz" | |
) | |
sha256sums=('993553c1754207a2642a91de699413212e6574ac00151d81cbaac0b413d92929' | |
'e8db3b426a4fb5fc960aec33e822efe33fcecd424ef7ed0f32b9d4b29b93162a' | |
'96bc2b0d519c6f0f7d9498990a86f47b15507d3cb07b7a9091375673f72079a1' | |
'5b6cc2314e43941b3bff0fd9114de0d227ab489c5422fb0bf08f8bdb2c9abe82' | |
'2a5e4547649be701e6b8830ae4d785f93aee0206dce01585c366d068a21db1ce' | |
'b167f829e64452f02e116af50adf969c913a3b56dd3f6622bff98cd79fbf8f4f' | |
'320144da5104bcf467d97d817230f91f5dcc2ec7c9e7a422a03f022beba076a9') | |
prepare() { | |
cd "$srcdir" | |
mv -T llvm-roc-hcc-$_srcver hcc-roc-hcc-$_srcver/compiler | |
mv -T compiler-rt-roc-hcc-$_srcver hcc-roc-hcc-$_srcver/compiler-rt | |
mv -T hcc-clang-upgrade-roc-hcc-$_srcver hcc-roc-hcc-$_srcver/clang | |
mv -T clang-tools-extra-roc-hcc-$_srcver hcc-roc-hcc-$_srcver/clang-tools-extra | |
mv -T lld-roc-hcc-$_srcver hcc-roc-hcc-$_srcver/lld | |
mv -T ROCm-Device-Libs-roc-hcc-$_srcver hcc-roc-hcc-$_srcver/rocdl | |
} | |
build() { | |
mkdir -p "$srcdir/build" | |
cd "$srcdir/build" | |
cmake -DCMAKE_BUILD_TYPE=Release \ | |
-DCMAKE_INSTALL_PREFIX="$pkgdir/opt/rocm/hcc" \ | |
-G Ninja \ | |
"$srcdir/hcc-roc-hcc-$_srcver" | |
ninja | |
} | |
package() { | |
ninja -C "$srcdir/build" install | |
# add links | |
mkdir -p "$pkgdir/usr/bin" | |
for fn in hcc hcc-config | |
do | |
ln -s /opt/rocm/hcc/bin/$fn "$pkgdir/usr/bin/$fn" | |
done | |
# additional link to make hcc demos happy | |
mkdir -p "$pkgdir/opt/rocm/include" | |
ln -s /opt/rocm/hcc/include "$pkgdir/opt/rocm/include/hcc" | |
# additional link to make clang-ocl work | |
ln -s /opt/rocm/hcc/bin "$pkgdir/opt/rocm/hcc/bin/x86_64" | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment