Make libxul capable of being a static library and linked into executables

NEW
Unassigned

Status

Firefox Build System
General
8 years ago
2 months ago

People

(Reporter: standard8, Unassigned)

Tracking

(Blocks: 1 bug)

Firefox Tracking Flags

(Not tracked)

Details

(Reporter)

Description

8 years ago
It has been suggested that libxul could be made to be capable of being linked statically, for the following reasons:

* Firefox could potentially link libxul into its own executable, thus reducing the number of libraries by one and potentially gaining performance (Note: I believe this is just an idea at this stage).

* Thunderbird and SeaMonkey could use this arrangement to do libxul style builds without having to go to external API and keeping everything in the executable.

This bug is for the investigations into making libxul a static library.
The patch from bug 525013 might be interesting, since that's exactly what it was doing.
(Reporter)

Updated

8 years ago
Blocks: 585947

Comment 2

8 years ago
(In reply to comment #0)
> * Firefox could potentially link libxul into its own executable, thus reducing
> the number of libraries by one and potentially gaining performance (Note: I
> believe this is just an idea at this stage).

From what I read in tglek's blog, it might actually be faster to load a large libxul from a small app executable than having libxul be a part of a large static app executable.
AIUI that's because having libxul as a shared lib allows the executable image to work around broken dynamic linker behavior, but I'm sure Taras could give a more thorough explanation.

Comment 4

8 years ago
(In reply to comment #3)
> AIUI that's because having libxul as a shared lib allows the executable image
> to work around broken dynamic linker behavior, but I'm sure Taras could give a
> more thorough explanation.

Right. There are a few tradeoffs that need to be measured. On one hand one can do tricks to work around inefficient lib loaders, on the other hand those are turning out to be pretty tricky, so it may be best to do that from a static initializer in the static binary itself. More investigation is needed.

I think having an option of a single-binary executable is a good option to have, but at this point it's hard to quantify that as a win/loss.
(Reporter)

Updated

8 years ago
Blocks: 598646
(Reporter)

Updated

8 years ago
No longer blocks: 585947
(Reporter)

Updated

7 years ago
Assignee: mbanner → nobody

Updated

2 months ago
Product: Core → Firefox Build System
You need to log in before you can comment on or make changes to this bug.