Currently, adding linker dependencies and other flags are split between the XRayArgs class and the various drivers for different front-ends (FreeBSD, NetBSD, Gnu, etc.). We really ought to consolidate those into a single place, so that we don't have to replicate the same flag processing routines in different front-ends.
Fixed in https://reviews.llvm.org/rL329372.