<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-link compatibility: reading manifestdpendency from .drectve"
   href="https://bugs.llvm.org/show_bug.cgi?id=38797">38797</a>
          </td>
        </tr>

        <tr>
          <th>Summary</th>
          <td>lld-link compatibility: reading manifestdpendency from .drectve
          </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>enhancement
          </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>mike.winterberg@gmail.com
          </td>
        </tr>

        <tr>
          <th>CC</th>
          <td>llvm-bugs@lists.llvm.org
          </td>
        </tr></table>
      <p>
        <div>
        <pre>Created <span class=""><a href="attachment.cgi?id=20816" name="attach_20816" title="cc file using pragma comment to inject /manifestdependency option to the linker">attachment 20816</a> <a href="attachment.cgi?id=20816&action=edit" title="cc file using pragma comment to inject /manifestdependency option to the linker">[details]</a></span>
cc file using pragma comment to inject /manifestdependency option to the linker

Several of the Visual Studio project templates that produce GUI apps use
#pragma comment(linker, "/manifestdependency:...") directives to add support
for themed controls (WinXP+). lld-link currently errors if it encounters a
/manifestdependency option in the .drectve section.

The project templates place the directive in the PCH file, so multiple .obj
files will include the option.

It's relatively easy enough to workaround, e.g. see
<a href="https://github.com/google/UIforETW/pull/123">https://github.com/google/UIforETW/pull/123</a>, but obviously lld-link supporting
it would be keen.

<span class="quote">>type ManifestDependency.cc</span >
#pragma comment(linker,"/manifestdependency:\"type='win32'
name='Microsoft.Windows.Common-Controls' version='6.0.0.0'
processorArchitecture='*' publicKeyToken='6595b64144ccf1df' language='*'\"")
int main()
{
}

<span class="quote">>clang-cl -m32 ManifestDependency.cc</span >

<span class="quote">>lld-link ManifestDependency.obj</span >
lld-link.exe: error: /manifestdependency: is not allowed in .drectve

<span class="quote">>lld-link --version</span >
LLD 8.0.0

The lld-link binary specifically comes from the installer generated based on
r339039.</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>