[llvm-bugs] [Bug 38797] New: lld-link compatibility: reading manifestdpendency from .drectve

via llvm-bugs llvm-bugs at lists.llvm.org
Fri Aug 31 14:32:42 PDT 2018


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

            Bug ID: 38797
           Summary: lld-link compatibility: reading manifestdpendency from
                    .drectve
           Product: lld
           Version: unspecified
          Hardware: PC
                OS: Windows NT
            Status: NEW
          Severity: enhancement
          Priority: P
         Component: COFF
          Assignee: unassignedbugs at nondot.org
          Reporter: mike.winterberg at gmail.com
                CC: llvm-bugs at lists.llvm.org

Created attachment 20816
  --> https://bugs.llvm.org/attachment.cgi?id=20816&action=edit
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
https://github.com/google/UIforETW/pull/123, but obviously lld-link supporting
it would be keen.

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

>clang-cl -m32 ManifestDependency.cc

>lld-link ManifestDependency.obj
lld-link.exe: error: /manifestdependency: is not allowed in .drectve

>lld-link --version
LLD 8.0.0

The lld-link binary specifically comes from the installer generated based on
r339039.

-- 
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/20180831/4d78ee9e/attachment.html>


More information about the llvm-bugs mailing list