This patch introduce a set of LTO plugin types required by various
linkers (i.e. gold and lld) and accompanying plugin option forwarding
forms. The appropriate option passing form can then be queried at the
point we forward options to pass on LTO.
We use these new interfaces in an lto plugin option creation function
we use to refactor addLTOOptions and helper functions so it is mostly
invariant to option form in use and introducing a new plugin option type
is possible (which we will do for AIX ld in a sub-sequent patch).
As part of the common-ing, some opt remarks cases are slightly adjusted
to use a single dash form of -plugin-opt (gold and lld accept both).
We also remove -fuse-ld=dummy from a test as this is not a valid or
documented option and causes failures after the refactor.
co-authored-by: Ettore Tiotto <etiotto@ca.ibm.com>
co-authored-by: Wai Hung Tsang <whitneyt@ca.ibm.com>
Looks like Seperator is either nullptr or -, is there a reason why it is not simply a boolean to see if a dash is needed?