<html>
    <head>
      <base href="https://llvm.org/bugs/" />
    </head>
    <body><table border="1" cellspacing="0" cellpadding="8">
        <tr>
          <th>Bug ID</th>
          <td><a class="bz_bug_link 
          bz_status_NEW "
   title="NEW --- - cl::opt + configure --enable-shared is completely broken"
   href="https://llvm.org/bugs/show_bug.cgi?id=22952">22952</a>
          </td>
        </tr>

        <tr>
          <th>Summary</th>
          <td>cl::opt + configure --enable-shared is completely broken
          </td>
        </tr>

        <tr>
          <th>Product</th>
          <td>Build scripts
          </td>
        </tr>

        <tr>
          <th>Version</th>
          <td>trunk
          </td>
        </tr>

        <tr>
          <th>Hardware</th>
          <td>PC
          </td>
        </tr>

        <tr>
          <th>OS</th>
          <td>All
          </td>
        </tr>

        <tr>
          <th>Status</th>
          <td>NEW
          </td>
        </tr>

        <tr>
          <th>Severity</th>
          <td>normal
          </td>
        </tr>

        <tr>
          <th>Priority</th>
          <td>P
          </td>
        </tr>

        <tr>
          <th>Component</th>
          <td>Makefiles
          </td>
        </tr>

        <tr>
          <th>Assignee</th>
          <td>unassignedbugs@nondot.org
          </td>
        </tr>

        <tr>
          <th>Reporter</th>
          <td>llvm-bugs@justinbogner.com
          </td>
        </tr>

        <tr>
          <th>CC</th>
          <td>llvmbugs@cs.uiuc.edu
          </td>
        </tr>

        <tr>
          <th>Classification</th>
          <td>Unclassified
          </td>
        </tr></table>
      <p>
        <div>
        <pre>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.</pre>
        </div>
      </p>
      <hr>
      <span>You are receiving this mail because:</span>
      
      <ul>
          <li>You are on the CC list for the bug.</li>
      </ul>
    </body>
</html>