llvm/cmake
Andrew Wilkins 93083d4986 tools/llvm-config: improve shared library support
Summary:

This is a re-commit of r257003, which was reverted,
along with the fixes from http://reviews.llvm.org/D15986.

r252532 added support for reporting the monolithic library
when LLVM_BUILD_LLVM_DYLIB is used. This would only be done
if the individual components were not found, and the dynamic
library is found.

This diff extends this as follows:
 - If LLVM_LINK_LLVM_DYLIB is set, then prefer the shared
   library, even if all component libraries exist.
 - Two flags, --link-shared and --link-static are introduced
   to provide explicit guidance. If --link-shared is passed
   and the shared library does not exist, an error results.

Additionally, changed the expected shared library names from
(e.g.) LLVM-3.8.0 to LLVM-3.8. The former exists only in an
installation (and then only in CMake builds I think?), and not
in the build tree; this breaks usage of llvm-config during
builds, e.g. by llvm-go.

Reviewers: DiamondLovesYou, beanz

Subscribers: llvm-commits

Differential Revision: http://reviews.llvm.org/D15986



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@258283 91177308-0d34-0410-b5e6-96231b3b80d8
2016-01-20 04:03:09 +00:00
..
modules tools/llvm-config: improve shared library support 2016-01-20 04:03:09 +00:00
platforms Doing some cleanup to the iOS toolchain. 2015-03-12 16:19:16 +00:00
config-ix.cmake Fix non-PIC build after 253959 2015-11-24 09:46:01 +00:00
dummy.cpp [CMake] Fix Xcode build with LLVM_ENABLE_OBJLIB. 2015-09-10 17:18:51 +00:00
Makefile Provide CMake package modules in install tree 2014-02-09 16:37:02 +00:00
nsis_icon.ico Win installer: provide a pretty icon 2014-03-27 20:48:37 +00:00
nsis_logo.bmp CMake: polish the Windows packaging rules 2013-08-15 23:44:31 +00:00
README CMake: Added notes pointing to the LLVM CMake documentation. 2009-04-04 22:52:02 +00:00

See docs/CMake.html for instructions on how to build LLVM with CMake.