[llvm-bugs] [Bug 48393] New: ld64.lld.darwinnew doesn't dedupe frameworks

via llvm-bugs llvm-bugs at lists.llvm.org
Fri Dec 4 11:51:14 PST 2020


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

            Bug ID: 48393
           Summary: ld64.lld.darwinnew doesn't dedupe frameworks
           Product: lld
           Version: unspecified
          Hardware: PC
                OS: All
            Status: NEW
          Severity: enhancement
          Priority: P
         Component: MachO
          Assignee: unassignedbugs at nondot.org
          Reporter: nicolasweber at gmx.de
                CC: llvm-bugs at lists.llvm.org

% cat main.c
int main() {}

% out/gn/bin/clang main.c -framework CoreFoundation -framework CoreFoundation
-framework CoreFoundation

% otool -L a.out
a.out:
       
/System/Library/Frameworks/CoreFoundation.framework/Versions/A/CoreFoundation
(compatibility version 150.0.0, current version 1677.104.0)
        /usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current
version 1281.100.1)

% out/gn/bin/clang -fuse-ld=lld.darwinnew main.c -framework CoreFoundation
-framework CoreFoundation -framework CoreFoundation
lld: warning: Option `-no_deduplicate' is not yet implemented. Stay tuned...
% otool -L a.out
a.out:
       
/System/Library/Frameworks/CoreFoundation.framework/Versions/A/CoreFoundation
(compatibility version 0.0.0, current version 0.0.0)
       
/System/Library/Frameworks/CoreFoundation.framework/Versions/A/CoreFoundation
(compatibility version 0.0.0, current version 0.0.0)
       
/System/Library/Frameworks/CoreFoundation.framework/Versions/A/CoreFoundation
(compatibility version 0.0.0, current version 0.0.0)
        /usr/lib/libSystem.B.dylib (compatibility version 0.0.0, current
version 0.0.0)


Old lld/mach-o gets this right too.

Especially pronounced after the new LC_LINKER_COMMAND support.


I'll take a look at this.

-- 
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/20201204/0dec5450/attachment.html>


More information about the llvm-bugs mailing list