[Driver] Add --ld-path= and deprecate -fuse-ld=/abs/path and -fuse-ld=rel/pathSupersedes D80225. Add --ld-path= to avoid strange target specificprefixes and make -fuse-ld= focus on its intended jo
[Driver] Add --ld-path= and deprecate -fuse-ld=/abs/path and -fuse-ld=rel/pathSupersedes D80225. Add --ld-path= to avoid strange target specificprefixes and make -fuse-ld= focus on its intended job: "linker flavor".(-f* affects generated code or language features. --ld-path does notaffect codegen, so it is not named -f*)The way --ld-path= works is similar to "Command Search and Execution" in POSIX.1-2017 2.9.1 Simple Commands.If --ld-path= specifies* an absolute path, the value specifies the linker.* a relative path without a path component separator (/), the value is searched using the -B, COMPILER_PATH, then PATH.* a relative path with a path component separator, the linker is found relative to the current working directory.-fuse-ld= and --ld-path= can be composed, e.g. `-fuse-ld=lld --ld-path=/usr/bin/ld.lld`The driver can base its linker option decision on the flavor -fuse-ld=, but it should not do fragileflavor checking with --ld-path=.Reviewed By: whitequark, keithDifferential Revision: https://reviews.llvm.org/D83015
show more ...