[Webkit-unassigned] [Bug 228865] New: Adding missing REFERENCED_FROM_ASM annotations to facilitate LTO

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Fri Aug 6 09:21:06 PDT 2021


https://bugs.webkit.org/show_bug.cgi?id=228865

            Bug ID: 228865
           Summary: Adding missing REFERENCED_FROM_ASM annotations to
                    facilitate LTO
           Product: WebKit
           Version: WebKit Nightly Build
          Hardware: PC
                OS: Linux
            Status: NEW
          Severity: Normal
          Priority: P2
         Component: JavaScriptCore
          Assignee: webkit-unassigned at lists.webkit.org
          Reporter: mcatanzaro at gnome.org
                CC: bugs-noreply at webkitgtk.org, mgorse at suse.com

When investigating why WebKitGTK fails to build with LTO (link-time optimization) enabled, one of the GCC developers noticed that we are missing __attribute__ (("used")) on several C++ functions declared in LLIntSlowPaths.h and WasmSlowPaths.h that are called only from asm. Without this attribute, GCC assumes the functions are unused and drops them, then linking fails because they really are used.

Turns out, this is the *only* problem that prevents building WebKit with LTO, so this patch should allow distros like Fedora and SUSE to drop downstream workarounds to turn off LTO.

To test building with LTO, I used -DCMAKE_C_FLAGS="-flto=auto -ffat-lto-objects" -DCMAKE_CXX_FLAGS="-flto=auto -ffat-lto-objects" with GCC. Note that is GCC-specific. Clang uses "-flto" instead, simpler.

-- 
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.webkit.org/pipermail/webkit-unassigned/attachments/20210806/ebf38fab/attachment.htm>


More information about the webkit-unassigned mailing list