lang/rust: resurrect PORT_LLVM as a non-default OPTION
Rust uses LLVM for code generation [0] and bundles their own copy
of a release that they fully support in relation to the rest of
rustc. This however adds to an already intensive build process. For
the benefit of those building from source, resurrect the PORT_LLVM
option, allowing to link with an existing devel/llvm port of the
user's choosing within Rust compatibility ranges. This remains unset
by default.
PORT_LLVM was removed during an era when Rust tracked LLVM trunk,
during the LLVM 7.0 development cycle. Starting with LLVM 8.0, Rust
tracks LLVM releases with upstream cherry-picks, similar to our
base system LLVM process. [1] Additionally, instead of making changes
directly in their bundled LLVM, llvm-wrapper takes care of anything
needed in that area. [2] Issues stemming from this option have since
been resolved or overcome.
[0] https://rustc-dev-guide.rust-lang.org/backend/codegen.html
[1] https://rustc-dev-guide.rust-lang.org/backend/updating-llvm.html
[2] https://github.com/rust-lang/rust/tree/master/compiler/rustc_llvm/llvm-wrapper
Co-authored-by: Evgeniy Khramtsov <2khramtsov_gmail.com>
Approved by: tobik (rust)
Differential Revision: https://reviews.freebsd.org/D32654