[Webkit-unassigned] [Bug 188986] [CMake] Add support for LTO builds

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Wed May 1 17:57:00 PDT 2019


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

--- Comment #4 from Christopher Reid <chris.reid at sony.com> ---
(In reply to Keith Rollin from comment #3)

Thanks for letting us know what issues you've faced when turning on LTO.

> I ran into some LTO issues when enabling it for Xcode, I want to make sure
> they are accounted for in your patch, too.
> 
> It's been a couple of years since I tried compiling JavaScriptCore with LTO,
> but when I did, I ran into a runtime crash. I don't understand the details,
> but the explanation I was given had something to do with JSC assuming there
> were implicit compiler fences that were abolished when LTO was applied. So
> if you're enabling LTO for JSC, be sure to run a full suite of tests. (If
> they pass, then I should probably try building JSC again under LTO to see if
> the bug I hit has gone away.)
We're focused on enabling LTO without JIT on x86_64. I'm not sure if that fence issue was specific to JIT.
I also just tested jsc tests with jit enabled and haven't seen any new failures when turning on LTO on both clang-7 and clang-8 in my ubuntu environment.


> Also, I had problems building for ARM and got an internal compiler error. I
> don't know if ARM is generally a target outside of Apple, so I don't know if
> I should assume you tested that configuration or not.
I haven't looked at ARM support. Our platforms only target x86_64 but it would be good for Igalia to know if they want to support LTO in WPE.

> 
> Finally, there were some issues with older clangs + lto.dylib's. In
> particular, there was a rare race condition that could lead to crashes at
> build time. I had to wait until Xcode 10.2 before I could actually turn on
> LTO. I don't know what the public versions of clang have on the inside, so I
> don't know how well-distributed the fix is. I could try to dig up some tool
> version information if this turns out to be something you want to account
> for. If you run `clang -v`, I might be able to find out if the fix is in
> there or not.
I didn't seem to hit that race in my builds.
It would be nice to know if it's an issue in llvm 7 or llvm 8 since we're targeting those llvm versions for LTO.

-- 
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/20190502/55f2a574/attachment.html>


More information about the webkit-unassigned mailing list