Enable Identical Code Folding when supported by the linker

RESOLVED FIXED in mozilla8

Status

()

Core
Build Config
RESOLVED FIXED
6 years ago
6 years ago

People

(Reporter: glandium, Assigned: glandium)

Tracking

Trunk
mozilla8
All
Linux
Points:
---

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(1 attachment)

Comment hidden (empty)
(Assignee)

Updated

6 years ago
Assignee: nobody → mh+mozilla
(Assignee)

Comment 1

6 years ago
Created attachment 550060 [details] [diff] [review]
Enable Identical Code Folding when supported by the linker

This is quite bothering. The latest released version of gold (2.21.1), which supports ICF, crashes when building our code, but not when building the small test case. I tried to reduce some source code that triggers the crash, but it's still more than a thousand lines of code...
I'm tempted to default to disable icf and enable it with mozconfig when we have a toolchain that supports ICF and doesn't crash, but it means linux distros will have to be aware of the option...

On the other hand, it only seems to crash when targetting ARM, so maybe the risk is pretty limited.
Attachment #550060 - Flags: review?(ted.mielczarek)
Comment on attachment 550060 [details] [diff] [review]
Enable Identical Code Folding when supported by the linker

Review of attachment 550060 [details] [diff] [review]:
-----------------------------------------------------------------

Is there a particular reason you need to sanity-check that the functions actually got folded, and you can't just trust that the linker does the right thing when you pass that option?
Attachment #550060 - Flags: review?(ted.mielczarek) → review+
(Assignee)

Comment 3

6 years ago
(In reply to Ted Mielczarek [:ted, :luser] from comment #2)
> Is there a particular reason you need to sanity-check that the functions
> actually got folded, and you can't just trust that the linker does the right
> thing when you pass that option?

Android NDK's ld 2.19 accepts the option but does nothing. It's better to avoid surprises as to why -Wl,--icf is used but has no effect...
(Assignee)

Comment 4

6 years ago
http://hg.mozilla.org/integration/mozilla-inbound/rev/4c3bcc010d85
Whiteboard: [inbound]
http://hg.mozilla.org/mozilla-central/rev/4c3bcc010d85
Status: NEW → RESOLVED
Last Resolved: 6 years ago
Resolution: --- → FIXED
Whiteboard: [inbound]
Target Milestone: --- → mozilla8
You need to log in before you can comment on or make changes to this bug.