Closed
Bug 1077151
Opened 10 years ago
Closed 10 years ago
Always use expandlibs descriptors when they exist
Categories
(Firefox Build System :: General, defect)
Tracking
(Not tracked)
RESOLVED
FIXED
mozilla35
People
(Reporter: glandium, Assigned: glandium)
References
Details
Attachments
(1 file)
11.81 KB,
patch
|
mshal
:
review+
|
Details | Diff | Splinter Review |
No description provided.
Assignee | ||
Comment 1•10 years ago
|
||
Currently, when there is both an expandlibs descriptor and an actual static
library, expandlibs picks the static library. This has the side effect that
if there are object files in the static library that aren't directly used,
they're dropped when linking, even when they export symbols that would be
exported in the final linked binary.
In most cases in the code base, files are not dropped that way. The most
notable counter-example is xpcomglue, where actually not dropping files
leads to link failure because of missing symbols those files reference
(yes, that would tend to say the glue is broken in some way).
On the opposite side, there is mozglue, which does have both a descriptor
and a static library (the latter being necessary for the SDK), and that
linking as a static library drops files that shouldn't be dropped (like
jemalloc). We're currently relying on -Wl,--whole-archive for those files
not to be dropped, but that won't really be possible without much hassle
in a world where mozglue dependencies live in moz.build land.
Switching expandlibs to use descriptors when they exist, even when there
is a static library (so, the opposite of the current behavior) allows to
drop -Wl,--whole-archive and prepare for a better future. However, as
mentioned, xpcomglue does still require to be linked through the static
library, so we need to make it a static library only.
The way to do it is hackish as hell, but since there is not going to be
other usecases, we can live with it, at least for now, until expandlibs
dies entirely.
Attachment #8499215 -
Flags: review?(mshal)
Comment 2•10 years ago
|
||
Comment on attachment 8499215 [details] [diff] [review]
Always use expandlibs descriptors when they exist
This looks fine as far as I can tell, though I don't totally understand the various ways we have of specifying & linking libraries. Your detailed commit message helped, though :)
Attachment #8499215 -
Flags: review?(mshal) → review+
Assignee | ||
Comment 3•10 years ago
|
||
Comment 4•10 years ago
|
||
Status: NEW → RESOLVED
Closed: 10 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla35
Updated•7 years ago
|
Product: Core → Firefox Build System
You need to log in
before you can comment on or make changes to this bug.
Description
•