Created
February 16, 2019 16:54
-
-
Save awenocur/f08ba89923a6282c7111c446a6f02ee4 to your computer and use it in GitHub Desktop.
modified LLVM for ROCm ebuild to enable debug symbols and macros
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
# Copyright | |
# | |
EAPI=7 | |
DESCRIPTION="ROCm llvm,lld,clang" | |
HOMEPAGE="https://github.com/RadeonOpenCompute/ROCm/" | |
SRC_URI="https://github.com/RadeonOpenCompute/llvm/archive/roc-2.0.0.tar.gz -> llvm-roc-2.0.0.tar.gz | |
https://github.com/RadeonOpenCompute/clang/archive/roc-2.0.0.tar.gz -> clang-roc-2.0.0.tar.gz | |
https://github.com/RadeonOpenCompute/lld/archive/roc-2.0.0.tar.gz -> lld-roc-2.0.0.tar.gz" | |
LICENSE="" | |
SLOT="0" | |
KEYWORDS="~amd64" | |
IUSE="" | |
DEPEND="" | |
RDEPEND="virtual/cblas | |
dev-libs/rocr-runtime" | |
src_unpack() { | |
unpack ${A} | |
ln -s "${WORKDIR}/clang-roc-2.0.0" "${WORKDIR}/llvm-roc-2.0.0/tools/clang" | |
ln -s "${WORKDIR}/lld-roc-2.0.0" "${WORKDIR}/llvm-roc-2.0.0/tools/lld" | |
} | |
src_configure() { | |
mkdir "${WORKDIR}/build" | |
cd "${WORKDIR}/build" | |
cmake -DCMAKE_BUILD_TYPE=Debug -DCMAKE_INSTALL_PREFIX=/usr/lib/llvm/roc-2.0.0 -DLLVM_TARGETS_TO_BUILD="AMDGPU;X86" -DCMAKE_C_FLAGS='-O0 -ggdb' -DCMAKE_CXX_FLAGS='-O0 -ggdb' ${S} | |
} | |
src_compile() { | |
cd "${WORKDIR}/build" | |
make VERBOSE=1 ${MAKEOPTS} | |
} | |
src_install() { | |
cd "${WORKDIR}/build" | |
emake DESTDIR="${D}" install | |
} | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment