Although I don't think it'd be *the right way* but more practical than ever.
In trunk, --ldflags prints out -L <dir> and system libs, for example -lpthread.
This behavior is useless and sometimes reported to bugs. (Seek llvm-config in bugs)
I suggest to print system libs after --libs. In fact, almost all system_libs are required from LLVMSupport.
Printing system libs at tail would satisfy most cases.
For example on mingw,
$ bin/llvm-config.exe --ldflags --libs object
-LX:/llvm_objroot/lib
-lLLVMObject -lLLVMSupport -limagehlp -lpsapi -lshell32
My patch affects neither --libnames and --libfiles.