How to correctly generate library dependences using llvm-config

Hi all,

I created a stub backend foo modified from the PTX backend, and made the corresponding modifications in configure.sh, include/ADT/Triple.h and lib/Support/Triple.cpp. However, when compiling using --enable-targets=foo, llc cannot linked properly due to the fact that -lLLVMFOODesc (generated from folder MCTargetDesc) is missing from the command line. I tried to use llvm-config foo --libs and found that -lLLVMFOODesc is not in the library dependences.
I have no idea why this happens. How can this problem be solved? Any help is appreciated! Thanks!

Regards,
Lei Mou