<html>
    <head>
      <base href="http://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 --- - UniversalDriver incorrectly removes the -flavor / -core switches from its command line"
   href="http://llvm.org/bugs/show_bug.cgi?id=20977">20977</a>
          </td>
        </tr>

        <tr>
          <th>Summary</th>
          <td>UniversalDriver incorrectly removes the -flavor / -core switches from its command line
          </td>
        </tr>

        <tr>
          <th>Product</th>
          <td>lld
          </td>
        </tr>

        <tr>
          <th>Version</th>
          <td>unspecified
          </td>
        </tr>

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

        <tr>
          <th>OS</th>
          <td>Linux
          </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>All Bugs
          </td>
        </tr>

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

        <tr>
          <th>Reporter</th>
          <td>llvm.mail.list@gmail.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>UniversalDriver.cpp, the getFlavor function.

When UniversalDriver finds -core or -flavor switch, it tries to remove it from
the command line so that it is not passed to the underlying drivers, such as
the GnuLdDriver. The removal logic is incorrect.

E.g., UniversalDriver does the following to remove -core:
argv++;
argc--;
There are two problems with that:
1) the switch does not necessarily go first in the command line - it can be in
the middle or at the end;
2) this ignores the fact that argv[0] is actually the program name, not a
switch or an option. Program name is skipped instead.</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>