LICENSE="UoI-NCSA"
SLOT="0"
KEYWORDS=""
-IUSE="test"
+IUSE="hwloc test"
+RDEPEND="hwloc? ( sys-apps/hwloc:0= )"
# tests:
# - dev-python/lit provides the test runner
# - sys-devel/llvm provide test utils (e.g. FileCheck)
# - sys-devel/clang provides the compiler to run tests
-DEPEND="dev-lang/perl
+DEPEND="${RDEPEND}
+ dev-lang/perl
test? (
$(python_gen_any_dep 'dev-python/lit[${PYTHON_USEDEP}]')
sys-devel/llvm
local libdir="$(get_libdir)"
local mycmakeargs=(
-DLIBOMP_LIBDIR_SUFFIX="${libdir#lib}"
+ -DLIBOMP_USE_HWLOC=$(usex hwloc)
# do not install libgomp.so & libiomp5.so aliases
-DLIBOMP_INSTALL_ALIASES=OFF
# disable unnecessary hack copying stuff back to srcdir
<maintainer type="project">
<email>llvm@gentoo.org</email>
</maintainer>
+ <use>
+ <flag name='hwloc'>Enable CPU affinity support via hwloc</flag>
+ </use>
<longdescription>The OpenMP subproject of LLVM is intended to contain all of the components required to build an executing OpenMP program that are outside the compiler itself.</longdescription>
</pkgmetadata>