Older versions of dev-lang/ghc have an llvm USE flag to control whether the llvm code generator will be included. The ebuild for 7.8.3 does not have that flag and contains no references to llvm, yet after emerging it, I can compile with the llvm backend (via the -fllvm switch) without any issues. So either llvm should be included as a hard dependency of ghc or the USE flag should be reintroduced to make it an optional dependency.
ghc-7.6 had a comile-time knob:
GhcWithLlvmCodeGen = YES / NO
which basically enabled -fllvm flag and included
small amount of code into ghc.
It was a serious overhead in rebuilding ghc
just to enable/disable llvm functionality.
ghc-7.8 dropped that conditional dependency
and always builds llvm support in it
(llvm does not need to be present at build time).
Having runtime-only switch is even worse
from rebuilding standpoint.
Unconditionally depend on llvm is infeasible
(and not desired) because:
- ghc's llvm support is experimental:
- some architectures generate broken code with -fllvm
- even amd64 does not pass all tests on llvm
- some arcitectures are not supported by llvm at all (ia64)
- current llvm-3.5 does not work with ghc-7.8.3
- llvm is a big thing to compile for quite
it would be nice to have llvm precisely
expressed as a depend but it needs a
runtime-only USE-flag support from portage.
Which is a bug #424283