[llvm-bugs] [Bug 47940] New: -ffunction_sections not working on LLVM windows...

via llvm-bugs llvm-bugs at lists.llvm.org
Wed Oct 21 21:34:03 PDT 2020


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

            Bug ID: 47940
           Summary: -ffunction_sections not working on LLVM windows...
           Product: libraries
           Version: 11.0
          Hardware: PC
                OS: Windows NT
            Status: NEW
          Severity: enhancement
          Priority: P
         Component: Common Code Generator Code
          Assignee: unassignedbugs at nondot.org
          Reporter: jeffr at radgametools.com
                CC: llvm-bugs at lists.llvm.org

Even with -ffunction-sections on the command line, llvm on windows doesn't
split functions so that they can be independently stripped by the MS linker. 
This is out at the OBJ level, after compiling, you can dissemble the obj, and
the functions aren't split into separate sections.

Easy to test, just add a:

void test()
{
  __asm
  {
    nop
    ... 16K times or whatever
    nop
  }
}

And then build an exe - the exe will grow by 16K...

-- 
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/20201022/cf67c20f/attachment-0001.html>


More information about the llvm-bugs mailing list