llvm-config: Introduce --system-libs to print SYSTEM_LIBS, and deprecate SYSTEM_LIBS...
authorNAKAMURA Takumi <geek4civic@gmail.com>
Thu, 19 Dec 2013 08:46:36 +0000 (08:46 +0000)
committerNAKAMURA Takumi <geek4civic@gmail.com>
Thu, 19 Dec 2013 08:46:36 +0000 (08:46 +0000)
commitcbce286fb9021afc1fb7f25e96c64233bf490262
tree9f7ffedc9c7928b34364135c5cec75f3bff8eda2
parent722f58c6b338284cd6a9f88543b7f7984b3c2da9
llvm-config: Introduce --system-libs to print SYSTEM_LIBS, and deprecate SYSTEM_LIBS in --ldflags.

Although --system-libs is expected to use after --libs, it can be used alone.

  $ bin/llvm-config --ldflags
  -L/path/to/llvm/objroot/lib

  $ bin/llvm-config --libs object
  -lLLVMObject -lLLVMSupport

  $ bin/llvm-config --system-libs
    (Blank line. "all" is assumed but nothing is printed.)
  -lrt -ldl -ltinfo -lpthread -lz

  $ bin/llvm-config --ldflags --libs --system-libs object
  -L/path/to/llvm/objroot/lib
  -lLLVMObject -lLLVMSupport
  -lrt -ldl -ltinfo -lpthread -lz

It is reimplementation of r197380, and workaround for PR3347 and PR8449.

FIXME: Each LLVM component may have its dependent system libs.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@197664 91177308-0d34-0410-b5e6-96231b3b80d8
tools/llvm-config/llvm-config.cpp