Fix `llvm-config` to emit the linker flag for the combined shared object built by...
authorJF Bastien <jfb@google.com>
Mon, 27 Jul 2015 18:26:30 +0000 (18:26 +0000)
committerJF Bastien <jfb@google.com>
Mon, 27 Jul 2015 18:26:30 +0000 (18:26 +0000)
commit6a829ed9d4011f64e9c23866ab78a753eae8b3f0
treefde666f9359773f010c47fdc1ac8dd3fcaf8a813
parentdbd8d4f0567b33821e184231584aada79a15375b
Fix `llvm-config` to emit the linker flag for the combined shared object built by autoconfig/make instead of the individual components.

Summary:
When LLVM is configured to build shared libraries, CMake builds each component as it's own shared object, while autoconfig/make builds them statically and then links them all together to create a single shared object. This change adds compile time config flags to `llvm-config` so it can know whether LLVM's components are separated or not and act accordingly.

This fixes `llvm-config` instead of fixing the makefiles to behave like CMake because, AIUI, LLVM's autoconfig/make build system is on the way out anyway.

This change only affects `llvm-config` from builds that use autoconfig/make.

Reviewers: jfb

Subscribers: echristo, dschuff, llvm-commits

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@243297 91177308-0d34-0410-b5e6-96231b3b80d8
bindings/ocaml/Makefile.ocaml
tools/llvm-config/BuildVariables.inc.in
tools/llvm-config/CMakeLists.txt
tools/llvm-config/Makefile
tools/llvm-config/llvm-config.cpp