On Wed, Mar 5, 2025 at 3:51 PM Jason E. Hale <[email protected]> wrote:
>
> LLVM_PREFIX is defined whether the 'noexport' argument is passed to
> USES=llvm or not.
> 'noexport' just prevents setting the values of CC, CXX, and CPP.
Right, and Igor was asking for the LLVM_PREFIX variable only, so
noexport fits there.
>
> I think we have a bug in Mk/llvm.mk, then.
>
> LLVM_PREFIX, semi-expanded is defined as:
> ${PREFIX}/llvm${_LLVM_MK_SUFFIX_${_LLVM_MK_VERSION}}, so changing
> PREFIX will affect that and ports using a custom PREFIX will not be
> able to use llvm, unless it was installed into the same custom PREFIX.
> Wouldn't it make more sense if in Mk/llvm.mk (L#125)
>
> _LLVM_MK_PREFIX= ${LOCALBASE}/llvm${_LLVM_MK_SUFFIX_${_LLVM_MK_VERSION}
I'm surprised that no llvm ports have USES=llvm:noexport. If they do,
then this var should use PREFIX for llvm ports and LOCALBASE for
consumers.