<html>
    <head>
      <base href="https://bugs.llvm.org/">
    </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 - lld ignores /subsystem argument"
   href="https://bugs.llvm.org/show_bug.cgi?id=38397">38397</a>
          </td>
        </tr>

        <tr>
          <th>Summary</th>
          <td>lld ignores /subsystem argument
          </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>Windows NT
          </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>COFF
          </td>
        </tr>

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

        <tr>
          <th>Reporter</th>
          <td>brucedawson@chromium.org
          </td>
        </tr>

        <tr>
          <th>CC</th>
          <td>llvm-bugs@lists.llvm.org
          </td>
        </tr></table>
      <p>
        <div>
        <pre>When building test_process.exe in chrome (as of
ec4400b28a913290681684212c9dfccb5ea103ed, July 31, 2018) the command-line
passed to the linker contains /SUBSYSTEM:CONSOLE,5.02 but test_process_main.cc
contains this entry point:

int APIENTRY wWinMain(HINSTANCE, HINSTANCE, wchar_t*, int)

link.exe honors the command-line switch and gives a link error. lld seems to
ignore the command-line switch and generates a binary. It is not clear whether
it looks at the Windows version information in the /SUBSYSTEM switch.

This was reported in crbug.com/869503.

The consequences of this difference of behavior is that binaries that build
with lld-link.exe may fail to link with link.exe and these failures will be
mysterious. It also suggests that if two entry points are compiled in and one
is chosen using the /SUBSYSTEM flag then that may fail with lld.

This is not a critical bug but it should be fixed in order to avoid confusing
incompatibilities.</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>