Commit Graph

27 Commits

Author SHA1 Message Date
Richard Osborne
7bc65d0ad7 Don't emit a blank line when running llvm-config --system-libs.
Summary:
Previously llvm-config --system-libs would print something like:

$ llvm-config --system-libs

-lz -ltinfo -lrt -ldl -lm

Now we don't emit blank line. Functionality is unchanged otherwise, in
particular llvm-config --libs --system-libs still emits the LLVM libraries
and the system libraries on different lines.

Reviewers: chapuni

Reviewed By: chapuni

CC: llvm-commits

Differential Revision: http://llvm-reviews.chandlerc.com/D2901

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@202719 91177308-0d34-0410-b5e6-96231b3b80d8
2014-03-03 15:06:14 +00:00
NAKAMURA Takumi
77a3598ecd llvm-config: Fix typo in help message introduced with r197664.
Thanks, Vinson Lee!

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@197996 91177308-0d34-0410-b5e6-96231b3b80d8
2013-12-25 02:24:32 +00:00
NAKAMURA Takumi
7c0eb96c8a llvm-config: Show OBJROOT rather than OBJROOT/BUILD_MODE in MakefileStyle.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@197818 91177308-0d34-0410-b5e6-96231b3b80d8
2013-12-20 17:35:52 +00:00
NAKAMURA Takumi
247ea104f1 llvm-config: Use build_mode instead of LLVM_BUILDMODE. It should be equivalent in MakefileStyle.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@197817 91177308-0d34-0410-b5e6-96231b3b80d8
2013-12-20 17:35:46 +00:00
NAKAMURA Takumi
d4cf97ba51 llvm-config: Don't show build tree with --obj-root for installed llvm-config. Show $(prefix) instead.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@197684 91177308-0d34-0410-b5e6-96231b3b80d8
2013-12-19 16:02:28 +00:00
NAKAMURA Takumi
af224d7584 llvm-config: Show build root instead of parent path in build tree with --obj-root for CMake multiconfig.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@197683 91177308-0d34-0410-b5e6-96231b3b80d8
2013-12-19 16:02:23 +00:00
NAKAMURA Takumi
cbce286fb9 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
2013-12-19 08:46:36 +00:00
NAKAMURA Takumi
010a40c080 Revert r197380, "llvm-config: Print SYSTEM_LIBS with --libs, instead of --ldflags."
I will introduce another flag, like --system-libs, later.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@197583 91177308-0d34-0410-b5e6-96231b3b80d8
2013-12-18 16:21:16 +00:00
NAKAMURA Takumi
16d0e126aa llvm-config: Let directories aware of CMAKE_CFG_INTDIR.
With llvm-config.exe --bindir --libdir --build-mode, on Visual Studio 2010,

In build tree:
  (OBJ_ROOT)/bin/MinSizeRel
  (OBJ_ROOT)/lib/MinSizeRel
  MinSizeRel

In installed tree:
  (INSTALL_PREFIX)/bin
  (INSTALL_PREFIX)/lib
  MinSizeRel

This is enhancements since r196283.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@197467 91177308-0d34-0410-b5e6-96231b3b80d8
2013-12-17 05:48:37 +00:00
NAKAMURA Takumi
56c390e709 llvm-config: Print SYSTEM_LIBS with --libs, instead of --ldflags.
LLVM libs are printed in the first line, and system libs are printed in the next line.

  $ bin/llvm-config --libs object
  -lLLVMObject -lLLVMSupport
  -lrt -ldl -ltinfo -lpthread -lz

It is workaround for PR3347 and PR8449.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@197380 91177308-0d34-0410-b5e6-96231b3b80d8
2013-12-16 11:22:22 +00:00
NAKAMURA Takumi
042795734d check-llvm: Ask llvm-config about assertion mode, instead of llc.
Add --assertion-mode to llvm-config. It emits ON or OFF according to NDEBUG.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@196329 91177308-0d34-0410-b5e6-96231b3b80d8
2013-12-03 23:22:25 +00:00
NAKAMURA Takumi
94f5a677f6 llvm-config: With --build-mode, show ${CMAKE_CFG_INTDIR} on multiconfig builder.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@196283 91177308-0d34-0410-b5e6-96231b3b80d8
2013-12-03 14:35:17 +00:00
Rafael Espindola
df0f525cc4 Remove unused includes.
llvm itself is now PathV1 clean.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@184947 91177308-0d34-0410-b5e6-96231b3b80d8
2013-06-26 13:54:34 +00:00
Rafael Espindola
50188c1f42 Port GetMainExecutable over to PathV2.
I will remove the V1 version as soon as I change clang in the next commit.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@184914 91177308-0d34-0410-b5e6-96231b3b80d8
2013-06-26 05:01:35 +00:00
Rafael Espindola
f3e397eb17 Include PathV1.h in files that use it.
This is preparation for replacing Path.h with PathV2.h.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@183782 91177308-0d34-0410-b5e6-96231b3b80d8
2013-06-11 20:00:56 +00:00
Daniel Dunbar
40d65dc305 llvm-config: Use sys::fs::equivalent instead of string comparison.
- Hopefully fixes PR11600 (untested).

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@156865 91177308-0d34-0410-b5e6-96231b3b80d8
2012-05-15 22:07:18 +00:00
Daniel Dunbar
b5cd41e26f llvm-build: Add support for non-installed libraries (e.g., gtest).
- These libraries are only reported by llvm-config when run from a development
   tree.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@156838 91177308-0d34-0410-b5e6-96231b3b80d8
2012-05-15 18:44:17 +00:00
Duncan Sands
9778ad51ee An easy case where GCC should really be able to work out that the value is only
used if IsInDevelopmentTree is 'true'.  But it doesn't, so help it out.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@151244 91177308-0d34-0410-b5e6-96231b3b80d8
2012-02-23 08:25:25 +00:00
Peter Collingbourne
b56900aa86 llvm-config: Add support for CMake build trees in which the build
mode does not form part of the path.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@149010 91177308-0d34-0410-b5e6-96231b3b80d8
2012-01-26 01:31:38 +00:00
Daniel Dunbar
275dd94afe llvm-config: Fix --targets-built, I changed this to use the registry but wasn't
properly initializing the target infos. I decided it wasn't worth linking them
in for this, so just switched back to using the Makefile variable for now. We
can reconsider later if we ever get pluggable targets.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@146711 91177308-0d34-0410-b5e6-96231b3b80d8
2011-12-16 00:04:43 +00:00
Daniel Dunbar
bcf14bbd57 llvm-config: Update help text for removal of "backend" pseudo component.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@146708 91177308-0d34-0410-b5e6-96231b3b80d8
2011-12-15 23:43:17 +00:00
Daniel Dunbar
8033f6197c llvm-config: Default to "all" if no components are specified.
- Fixes PR11530.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@146388 91177308-0d34-0410-b5e6-96231b3b80d8
2011-12-12 18:22:04 +00:00
Daniel Dunbar
cb497b888a llvm-config: Replace with C++ version (was llvm-config-2).
- Another reapply of r144300, with hopefully one last fix.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@145623 91177308-0d34-0410-b5e6-96231b3b80d8
2011-12-01 20:18:09 +00:00
Duncan Sands
f6ace19243 Revert commit 145449 (ddunbar) since it is breaking the dragonegg buildbots.
Original commit message:
llvm-config: Replace with C++ version (was llvm-config-2).
 - Reapply of r144300, with lots of fixes/migration easement in between.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@145582 91177308-0d34-0410-b5e6-96231b3b80d8
2011-12-01 10:50:19 +00:00
Daniel Dunbar
2662c83a59 llvm-config: Replace with C++ version (was llvm-config-2).
- Reapply of r144300, with lots of fixes/migration easement in between.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@145449 91177308-0d34-0410-b5e6-96231b3b80d8
2011-11-29 22:56:31 +00:00
Daniel Dunbar
1ad92131ab Revert r144300 "llvm-config: Replace with C++ version (was llvm-config-2).",
which didn't appear ready for prime time.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@144309 91177308-0d34-0410-b5e6-96231b3b80d8
2011-11-10 19:59:35 +00:00
Daniel Dunbar
a6f5a81285 llvm-config: Replace with C++ version (was llvm-config-2).
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@144300 91177308-0d34-0410-b5e6-96231b3b80d8
2011-11-10 18:49:59 +00:00