[LLVMdev] llvm-config --system-libs has newlines in output

NAKAMURA Takumi geek4civic at gmail.com
Thu Feb 27 16:22:04 PST 2014


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
>



More information about the llvm-dev mailing list