Richard Osborne
2014-Feb-27 19:05 UTC
[LLVMdev] 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. Thanks, Richard -- Richard Osborne | XMOS http://www.xmos.com
NAKAMURA Takumi
2014-Feb-28 00:22 UTC
[LLVMdev] llvm-config --system-libs has newlines in output
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. 2014-02-28 4:05 GMT+09:00 Richard Osborne <richard at xmos.com>:> 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. > > Thanks, > > Richard > > -- > Richard Osborne | XMOS > http://www.xmos.com >
Richard Osborne
2014-Feb-28 11:58 UTC
[LLVMdev] llvm-config --system-libs has newlines in output
On 28/02/14 00:22, NAKAMURA Takumi wrote:> 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: http://lists.cs.uiuc.edu/pipermail/llvm-commits/Week-of-Mon-20140224/206699.html -- Richard Osborne | XMOS http://www.xmos.com