[llvm-bugs] [Bug 41236] New: Functions with __attribute__((used)) in static libraries are not linked with -flto=thin

via llvm-bugs llvm-bugs at lists.llvm.org
Tue Mar 26 03:26:20 PDT 2019


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

            Bug ID: 41236
           Summary: Functions with __attribute__((used)) in static
                    libraries are not linked with -flto=thin
           Product: clang
           Version: 8.0
          Hardware: Macintosh
                OS: MacOS X
            Status: NEW
          Severity: normal
          Priority: P
         Component: -New Bugs
          Assignee: unassignedclangbugs at nondot.org
          Reporter: erik at olofsson.info
                CC: htmldeveloper at gmail.com, llvm-bugs at lists.llvm.org,
                    neeilans at live.com, richard-llvm at metafoo.co.uk

Moving from llvm 7.0 to 8.0 functions marked `__attribute__((used))
__attribute__ ((__visibility__("default")))` are not linked into final
executable under these circumstances:
* Function is in static library
* `-flto=thin` is used (`-flto` or no lto works as expected)
* Function is not referenced from other functions that are alive
* Target: `x86_64-apple-darwin11`

-- 
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/20190326/b3a7521d/attachment-0001.html>


More information about the llvm-bugs mailing list