Use linked-libraries to decide what linker to use
Use linked-libraries to decide what linker to use

Sometimes you want to link to a C++ library that exports C API, which
means the linker must link in the C++ stdlib, and we must use a C++
compiler for linking. The same is also applicable for objc/objc++ etc,
so we can keep using clike_langs for the priority order.

Closes https://github.com/mesonbuild/meson/issues/1653

pexip/meson,mesonbuild/meson,mesonbuild/meson,fmuellner/meson,thiblahute/meson,fmuellner/meson,QuLogic/meson,becm/meson,trhd/meson,MathieuDuponchelle/meson,pexip/meson,jeandet/meson,wberrier/meson,ernestask/meson,jeandet/meson,aaronp24/meson,pexip/meson,fmuellner/meson,jeandet/meson,thiblahute/meson,jeandet/meson,trhd/meson,jeandet/meson,wberrier/meson,aaronp24/meson,thiblahute/meson,ernestask/meson,jeandet/meson,thiblahute/meson,QuLogic/meson,wberrier/meson,mesonbuild/meson,aaronp24/meson,MathieuDuponchelle/meson,thiblahute/meson,aaronp24/meson,becm/meson,rhd/meson,thiblahute/meson,QuLogic/meson,trhd/meson,MathieuDuponchelle/meson,fmuellner/meson,ernestask/meson,wberrier/meson,QuLogic/meson,QuLogic/meson,jpakkane/meson,mesonbuild/meson,jpakkane/meson,MathieuDuponchelle/meson,rhd/meson,QuLogic/meson,MathieuDuponchelle/meson,trhd/meson,jeandet/meson,trhd/meson,jpakkane/meson,MathieuDuponchelle/meson,ernestask/meson,wberrier/meson,fmuellner/meson,mesonbuild/meson,fmuellner/meson,rhd/meson,fmuellner/meson,wberrier/meson,pexip/meson,trhd/meson,trhd/meson,becm/meson,fmuellner/meson,aaronp24/meson,rhd/meson,aaronp24/meson,becm/meson,rhd/meson,mesonbuild/meson,jpakkane/meson,wberrier/meson,QuLogic/meson,trhd/meson,jpakkane/meson,aaronp24/meson,QuLogic/meson,aaronp24/meson,mesonbuild/meson,aaronp24/meson,becm/meson,becm/meson,ernestask/meson,fmuellner/meson,mesonbuild/meson,becm/meson,becm/meson,QuLogic/meson,jeandet/meson,MathieuDuponchelle/meson,ernestask/meson,wberrier/meson,jpakkane/meson,rhd/meson,MathieuDuponchelle/meson,trhd/meson,rhd/meson,rhd/meson,jpakkane/meson,mesonbuild/meson,pexip/meson,pexip/meson,becm/meson,jeandet/meson,mesonbuild/meson,pexip/meson,thiblahute/meson,ernestask/meson,ernestask/meson,pexip/meson,ernestask/meson,jpakkane/meson,becm/meson,thiblahute/meson,jpakkane/meson,pexip/meson,MathieuDuponchelle/meson,pexip/meson,thiblahute/meson