[LLVMbugs] [Bug 22952] New: cl::opt + configure --enable-shared is completely broken

bugzilla-daemon at llvm.org bugzilla-daemon at llvm.org
Wed Mar 18 21:57:28 PDT 2015


https://llvm.org/bugs/show_bug.cgi?id=22952

            Bug ID: 22952
           Summary: cl::opt + configure --enable-shared is completely
                    broken
           Product: Build scripts
           Version: trunk
          Hardware: PC
                OS: All
            Status: NEW
          Severity: normal
          Priority: P
         Component: Makefiles
          Assignee: unassignedbugs at nondot.org
          Reporter: llvm-bugs at justinbogner.com
                CC: llvmbugs at cs.uiuc.edu
    Classification: Unclassified

Today I fought with a buildbot all evening, because adding a -color
option to llvm-cov caused it to emit the following error, only on that
bot:

    : CommandLine Error: Option 'color' registered more than once!
    LLVM ERROR: inconsistency in registered CommandLine options

Eventually I figured out that the bot used configure and
--enable-shared, for some reason, and reproduced the failure locally. It
turns out the configure build with shared creates a monolithic llvm lib
and links all the tools to that, and this causes *every tool* to have
*every cl::opt option* from every library in LLVM. This is pretty
broken.

The cmake build with BUILD_SHARED_LIBS doesn't have this problem, since
it builds multiple library and only links the ones the tool asks for.

I've worked around this by renaming my option for now, but that's really
terrible and it makes me sad.

-- 
You are receiving this mail because:
You are on the CC list for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-bugs/attachments/20150319/4ddad22a/attachment.html>


More information about the llvm-bugs mailing list