llvm-config --system-libs has newlines in output

With LLVM built from trunk I understand I should now use llvm-config --system-libs to get the system libraries to link against when linking against llvm (as of r197664). If run this then llvm-config outputs a blank line before the system libraries, for example on Linux I get:

$ llvm-config --system-libs

-lz -ltinfo -lrt -ldl -lm

If I use --system-libs together with --libs the LLVM libraries and the system libraries are separated by a newline:

$ ../../tools_llvm_new/obj/Debug+Asserts/bin/llvm-config --libs --system-libs
-lLLVMLTO -lLLVMObjCARCOpts -lLLVMLinker -lLLVMipo -lLLVMVectorize -lLLVMBitWriter ...
-lz -ltinfo -lrt -ldl -lm

Is there any reason for this? It just seems to make it harder to parse the output of llvm-config, but I wanted to check that it wasn't intentional before putting together a patch.



I intended "one logical line per option" there, with "--libs --system-libs".
But I missed the case with "--system-libs".

I supposed it would make its output handle easier, but the behavior
may be changed.

Thanks for the explanation, I've submitted a patch to llvm-commits which keeps the separation when both options are used but avoids a blank line if only --system-libs is specified, see: