I'd like to refer to this bug which seems to be still open and still present in all versions of LLVM since LLVM 4.0 (my guess, I did not track that down exactly).
Since this severe problem has not been solved even for LLVM 7.0, the issue not being able to use an ICD for multiple platforms available on FreeBSD in cases the OpenCL backends (lang/pocl (See https://github.com/pocl/pocl/issues/474), devel/beignet, lang/clover) are all compiled dynamically against the same LLVM backend. The issue disapperas were the backend is compiled against a different version of LLVM or statically linked. Both is inacceptable.
I'd like to refer to this LLVM bug:
Bug 30587 - Inconsistency in commandline options with multiple OpenCL vendor libraries installed :
How to reproduce:
Compile lang/clover, lang/beignet, lang/pocl against the same LLVM backend (devel/llvm60 or devel/llvm70) and use /devel/clinfo for checking. You should be presented with:
CommandLine Error: Option 'enable-value-profiling' registered more than once!
LLVM ERROR: inconsistency in registered CommandLine options
The same problem occurs for several ports on which OpenCL support might be an option and enabled, like graphics/blender (PR 223879), graphics/ImageMagick6 (PR 232357).
The message "Inconsistency in commandline options" is just a symptom of the fact that libLLVM can't be dlopen'd twice. My suspicion is that if libOpenCL had a direct dependency on libLLVM.so that the right thing would happen, but I'm not sure.
Until upstream LLVM makes changes to support this, I don't consider this a bug in the LLVM ports. OpenCL ports want to use LLVM in a way that isn't supported.
*** Bug 231228 has been marked as a duplicate of this bug. ***