Commit Graph

127 Commits

Author SHA1 Message Date
Daniel Dunbar f1ab402ecd llvm-config: Use sys::fs::equivalent instead of string comparison.
- Hopefully fixes PR11600 (untested).

llvm-svn: 156865
2012-05-15 22:07:18 +00:00
Daniel Dunbar c364d68bf2 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.

llvm-svn: 156838
2012-05-15 18:44:17 +00:00
Bob Wilson 7789aae96d Do not install llvm-config-host for cross-builds of clang. rdar://11317847
My previous change to install llvm-config-host for cross-builds resulted
in that file being installed even when the normal llvm-config was not
installed, e.g., when building the install-clang target.  Daniel suggested
this alternative, which solves the immediate problem and also avoids the gunk
in the top-level makefile.

llvm-svn: 156448
2012-05-09 00:07:02 +00:00
Duncan Sands f320be8521 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.

llvm-svn: 151244
2012-02-23 08:25:25 +00:00
Peter Collingbourne 76e1c8c9ae llvm-config: Add support for CMake build trees in which the build
mode does not form part of the path.

llvm-svn: 149010
2012-01-26 01:31:38 +00:00
Daniel Dunbar 30a8976127 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.

llvm-svn: 146711
2011-12-16 00:04:43 +00:00
Daniel Dunbar c7037f3f81 llvm-config: Update help text for removal of "backend" pseudo component.
llvm-svn: 146708
2011-12-15 23:43:17 +00:00
Daniel Dunbar fbc6a892a7 llvm-config: Default to "all" if no components are specified.
- Fixes PR11530.

llvm-svn: 146388
2011-12-12 18:22:04 +00:00
Daniel Dunbar ab0ad4ed1e llvm-config: Replace with C++ version (was llvm-config-2).
- Another reapply of r144300, with hopefully one last fix.

llvm-svn: 145623
2011-12-01 20:18:09 +00:00
Duncan Sands b8e6cee9ca 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.

llvm-svn: 145582
2011-12-01 10:50:19 +00:00
Daniel Dunbar 8d5cc33ad8 llvm-config: Replace with C++ version (was llvm-config-2).
- Reapply of r144300, with lots of fixes/migration easement in between.

llvm-svn: 145449
2011-11-29 22:56:31 +00:00
Daniel Dunbar 933b43f188 Revert r144300 "llvm-config: Replace with C++ version (was llvm-config-2).",
which didn't appear ready for prime time.

llvm-svn: 144309
2011-11-10 19:59:35 +00:00
Daniel Dunbar 166c804893 llvm-config: Replace with C++ version (was llvm-config-2).
llvm-svn: 144300
2011-11-10 18:49:59 +00:00
Daniel Dunbar 5d9ae5ca23 llvm-config: Drop 'backend' pseudo-component. We don't support/qualify the CBE
enough to have this be useful.

llvm-svn: 144202
2011-11-09 19:23:15 +00:00
Chandler Carruth 76f9e57145 Add back the top-level target for 'llvm-config' and the dependency edge
to force it to build after all library targets so it has complete
dependency information. This should fix broken 'make install' with
CMake.

This is a partial revert of r143540, but it doesn't revert the most
important part of that change: removing the dependency edge from LLVM
tools to the llvm-config script.

llvm-svn: 143548
2011-11-02 17:22:57 +00:00
Daniel Dunbar bcafe5f84d build/Make: Get rid of llvm-config-perobj, which isn't used anymore.
llvm-svn: 143541
2011-11-02 15:56:52 +00:00
Daniel Dunbar ab527acc09 build/CMake: Remove llvm-config.target used to serialize tool builds on
llvm-config build, there is no longer a point to this after Chandler's work.

llvm-svn: 143540
2011-11-02 15:56:38 +00:00
Peter Collingbourne 16dab1bada Have llvm-config --cppflags print correct flags when in CMake build directory
Previously, if invoked from a CMake build directory, 'llvm-config
--cppflags' and friends would only print a -I flag for the build
directory's header search path, because it would assume that it was
already installed, not recognising its parent directory as being the
build directory.  Teach llvm-config about CMake build directories
so that it prints a -I for both the source and build directory's
search paths.

llvm-svn: 143171
2011-10-28 01:02:16 +00:00
Daniel Dunbar 5a96e6f9ed llvm-config: Add an all-targets pseudo-component.
llvm-svn: 142399
2011-10-18 19:27:08 +00:00
Chandler Carruth 9d7feab3e0 Rewrite the CMake build to use explicit dependencies between libraries,
specified in the same file that the library itself is created. This is
more idiomatic for CMake builds, and also allows us to correctly specify
dependencies that are missed due to bugs in the GenLibDeps perl script,
or change from compiler to compiler. On Linux, this returns CMake to
a place where it can relably rebuild several targets of LLVM.

I have tried not to change the dependencies from the ones in the current
auto-generated file. The only places I've really diverged are in places
where I was seeing link failures, and added a dependency. The goal of
this patch is not to start changing the dependencies, merely to move
them into the correct location, and an explicit form that we can control
and change when necessary.

This also removes a serialization point in the build because we don't
have to scan all the libraries before we begin building various tools.
We no longer have a step of the build that regenerates a file inside the
source tree. A few other associated cleanups fall out of this.

This isn't really finished yet though. After talking to dgregor he urged
switching to a single CMake macro to construct libraries with both
sources and dependencies in the arguments. Migrating from the two macros
to that style will be a follow-up patch.

Also, llvm-config is still generated with GenLibDeps.pl, which means it
still has slightly buggy dependencies. The internal CMake
'llvm-config-like' macro uses the correct explicitly specified
dependencies however. A future patch will switch llvm-config generation
(when using CMake) to be based on these deps as well.

This may well break Windows. I'm getting a machine set up now to dig
into any failures there. If anyone can chime in with problems they see
or ideas of how to solve them for Windows, much appreciated.

llvm-svn: 136433
2011-07-29 00:14:25 +00:00
Oscar Fuentes d8a6dd6c99 Rename LLVMConfig.cmake to LLVM-Config.cmake. The *Config.cmake naming
scheme is used by the functionality related to find_package.

llvm-svn: 128889
2011-04-05 17:02:48 +00:00
Oscar Fuentes 25ec0d38e1 CMake: remove debug code from previous commit.
llvm-svn: 128740
2011-04-01 21:39:38 +00:00
Oscar Fuentes cde00a55c8 Fix assignment of -fPIC to CMAKE_C_FLAGS. Configure llvm-config.in.in
with the contents of CMAKE_C(XX)_FLAGS too, else `llvm-config
--c(xx)flags' doesn't tell the absolute truth.

This comes from PR9603 and is based on a patch by Ryuta Suzuki!

llvm-svn: 128727
2011-04-01 19:36:06 +00:00
Oscar Fuentes cae1b90915 Make llvm-config.in configuration more MSYS-friendly.
Some of those POSIX <-> Windows command line conversions ended on
failure.

llvm-svn: 127958
2011-03-19 22:52:33 +00:00
Oscar Fuentes 916fb1a62b CMake: store TARGET_TRIPLE on llvm-config.in.
llvm-svn: 127957
2011-03-19 22:52:25 +00:00
Oscar Fuentes ab0465020b CMake: remove unnecessary variable.
llvm-svn: 126224
2011-02-22 15:40:20 +00:00
Oscar Fuentes 5ed962656c Move library stuff out of the toplevel CMakeLists.txt file.
llvm-svn: 125968
2011-02-18 22:06:14 +00:00
Oscar Fuentes 632ad9bfe6 Don't show -pedantic, -W and -Wall on the output of
llvm-config --cflags --cxxflags --cppflags

We shouldn't impose those flags on people who use llvm-config for
building their own projects.

llvm-svn: 124399
2011-01-27 19:29:48 +00:00
Chris Lattner 287766075f fix the autoconf script to detect "has asmprinter"ness of a target by
looking for lib/Target/*AsmPrinter.cpp.  Fix llvm-config to handle targets
that don't have an explicit AsmPrinter library.

llvm-svn: 119057
2010-11-14 19:10:47 +00:00
Oscar Fuentes 6e0637994a Stop the build if cyclic library dependecies found.
llvm-svn: 115405
2010-10-02 03:04:49 +00:00
Duncan Sands e9da6db67f Convert a bunch of uses of 'bytecode' into 'bitcode'. This
is not everything, but the remaining cases are less trivial.

llvm-svn: 115080
2010-09-29 20:09:55 +00:00
Michael J. Spencer 93c9b2ea93 Revert "CMake: Get rid of LLVMLibDeps.cmake and export the libraries normally."
This reverts commit r113632

Conflicts:

	cmake/modules/AddLLVM.cmake

llvm-svn: 113819
2010-09-13 23:59:48 +00:00
Michael J. Spencer dc38d36ccb CMake: Get rid of LLVMLibDeps.cmake and export the libraries normally.
llvm-svn: 113632
2010-09-10 21:14:25 +00:00
Oscar Fuentes 5b823e0821 CMake: Improved COMMENT on a custom command
llvm-svn: 111111
2010-08-15 22:14:36 +00:00
Erick Tryzelaar 444c0955af Rewrite makefiles to explicitly reference DESTDIR to fix bug 3153.
We need this so can not bake DESTDIR into the O'Caml symlinks.

llvm-svn: 97743
2010-03-04 20:56:19 +00:00
Daniel Dunbar e67ebdc60a Kill off LLVMGCCARCH and LLVMGCC_VERSION make variables.
llvm-svn: 96909
2010-02-23 07:56:31 +00:00
Daniel Dunbar e7d4f92cfa Kill off LLVMGCC_MAJVERS make variable.
llvm-svn: 96907
2010-02-23 07:56:22 +00:00
Torok Edwin 372c7d5f93 New flag for GenLibDeps, and llvm-config-perobjincl.
This allows to show the explicit files that need to be built/linked to get an
LLVM component.

llvm-svn: 95300
2010-02-04 09:31:35 +00:00
Chris Lattner 7ba0661f27 Stop building RTTI information for *most* llvm libraries. Notable
missing ones are libsupport, libsystem and libvmcore.  libvmcore is
currently blocked on bugpoint, which uses EH.  Once it stops using
EH, we can switch it off.

This #if 0's out 3 unit tests, because gtest requires RTTI information.
Suggestions welcome on how to fix this.

llvm-svn: 94164
2010-01-22 06:49:46 +00:00
Chris Lattner 6b4f73ea94 make llvm-config more portable to windows versions of perl,
patch by Michael Beck!

llvm-svn: 93793
2010-01-18 22:27:43 +00:00
Daniel Dunbar e8b8ccefcb Add the rest of the build system logic for optional target disassemblers
llvm-svn: 89841
2009-11-25 04:46:58 +00:00
Daniel Dunbar c0fd8a4360 Stop running get_target_triple more than we need to.
llvm-svn: 86418
2009-11-07 23:52:20 +00:00
Oscar Fuentes cfd4ec0226 CMake: remove .so file extension from library names when building
dependency info.

Patch by Peter Collingbourne!

llvm-svn: 83275
2009-10-04 06:24:57 +00:00
Daniel Dunbar a249c42e8c Fix llvm-config --src-root and --obj-root for CMake builds.
llvm-svn: 82529
2009-09-22 06:09:31 +00:00
Daniel Dunbar af890eb82f llvm-config: Remove unused variables.
llvm-svn: 82528
2009-09-22 06:09:22 +00:00
Xerxes Ranby a0f1088134 Make cmake generated llvm-config output correct JIT backend for non X86 targets.
llvm-svn: 82049
2009-09-16 14:36:35 +00:00
Oscar Fuentes 1ea4b3a4b5 CMake: Automatic regeneration of the library dependencies file.
It doesn't stop or reconfigure the build, though, so the user will see
a broken build that magically succeeds at the next attempt. It is
technically possible to halt the build with a helpful message, and
even to automatically restart the build using the new dependencies as
it we did when llvm-config was used by cmake for learning
dependencies. This is left on the TODO list.

llvm-svn: 79004
2009-08-14 16:59:41 +00:00
Oscar Fuentes 5444cb13ab CMake: propagate to the parent scope LLVM_COMMON_DEPENDS. This is
necessary for the changes being effective on the successive targets

llvm-svn: 78989
2009-08-14 04:29:33 +00:00
Oscar Fuentes 9082c71057 CMake: build llvm-config before the other tools.
llvm-svn: 78975
2009-08-14 01:55:05 +00:00
Oscar Fuentes 06eef1c2fe CMake: Localized dependency on Perl.
llvm-svn: 78788
2009-08-12 04:16:19 +00:00