Patch to enable LLVM to build successfully with shared library support disabled

I checked out llvm/trunk today and found that it failed to build successfully on Linux when 'configure' was invoked with '--disable-shared' and CFLAGS included '-static'. The attached patch modifies a few Makefiles to prevent attempts to build shared libraries when ENABLE_SHARED is not set to 1.

Apply the patch in the LLVM root directory with 'patch -p1 ...'

This patch contains a change to tools/Makefile that changes behavior for Cygwin and MingW platforms. The previous logic would filter out 'bugpoint-passes' from the list of modules to build if the host platform is Cygwin or MingW and support for shared libraries was not enabled. However, this conflicted with comments there. The logic and the comment both appeared wrong to me. The logic now simply filters out 'bugpoint-passes' (and other modules) if shared library support is not enabled. Someone more familiar with this may want to look at this regarding the desired Cygwin and MingW behavior.


llvm-enable_shared.patch (1.75 KB)

Tom, ENABLE_SHARED means "To build the big".
plugins are assumed to be built regardless of ENABLE_SHARED on elf/macho hosts.

To satisfy your issue, we would need to implement "--disable-plugins", IMO.