Closed
Bug 1278308
Opened 8 years ago
Closed 3 years ago
GeckoCppUnitTests seem to wait for libxul to finishing linking before starting compilation
Categories
(Firefox Build System :: General, defect, P5)
Firefox Build System
General
Tracking
(Not tracked)
RESOLVED
DUPLICATE
of bug 1573566
People
(Reporter: jrmuizel, Unassigned)
Details
Attachments
(1 file)
1.83 KB,
patch
|
Details | Diff | Splinter Review |
This adds a bunch of latency to a clobber build.
Comment 1•8 years ago
|
||
I think this is because they build as CPP_UNIT_TESTS, which build as SIMPLE_PROGRAMS, which get compiled and linked in a single compiler invocation, and also they link to libxul, so they can't be compiled until they have a libxul to link against.
Reporter | ||
Comment 2•8 years ago
|
||
(In reply to Ted Mielczarek [:ted.mielczarek] from comment #1) > I think this is because they build as CPP_UNIT_TESTS, which build as > SIMPLE_PROGRAMS, which get compiled and linked in a single compiler > invocation, and also they link to libxul, so they can't be compiled until > they have a libxul to link against. Is there any reason we wouldn't want to split out compilation of these from linking so that compilation can happen earlier?
Comment 3•8 years ago
|
||
You'll wind up with two compiler invocations per test instead of one. I don't know what sort of impact that'd have on the build time. I wonder if we could just convert all of these tests to gtests?
Reporter | ||
Comment 4•8 years ago
|
||
(In reply to Ted Mielczarek [:ted.mielczarek] from comment #3) > You'll wind up with two compiler invocations per test instead of one. I > don't know what sort of impact that'd have on the build time. The linker is still being invoked so it's hard for me to imagine that impact of two compiler invocations being noticeable, and being able to do work during libxul linking would help a lot for highly parallel builds. > I wonder if we could just convert all of these tests to gtests? Many of them likely can be.
Comment 5•8 years ago
|
||
(In reply to Jeff Muizelaar [:jrmuizel] from comment #2) > (In reply to Ted Mielczarek [:ted.mielczarek] from comment #1) > > I think this is because they build as CPP_UNIT_TESTS, which build as > > SIMPLE_PROGRAMS, which get compiled and linked in a single compiler > > invocation, and also they link to libxul, so they can't be compiled until > > they have a libxul to link against. > > Is there any reason we wouldn't want to split out compilation of these from > linking so that compilation can happen earlier? It's not worth the effort that would require to do it with the current backend. The compilations for those tests are not taking that long. The only caveat is that they have to wait for libxul, and that's not something that can change.
Comment 6•8 years ago
|
||
When I said, yesterday, that it should be possible to split building libraries and objects easily, I actually didn't expect the patch to be this short. One downside is that it might make things slower in some edge cases (I'm thinking Windows, here, mostly), so I'm not putting this up for review with a proper commit message etc. until I have ruled that out, but please test this with your icecc setup and check whether it makes a significant difference.
Attachment #8763157 -
Flags: feedback?(jmuizelaar)
Attachment #8763157 -
Flags: feedback?(ehsan)
Comment 7•8 years ago
|
||
Comment on attachment 8763157 [details] [diff] [review] PoC I'm not sure how to test this...
Attachment #8763157 -
Flags: feedback?(ehsan)
Updated•6 years ago
|
Product: Core → Firefox Build System
Updated•3 years ago
|
Attachment #8763157 -
Flags: feedback?(jmuizelaar)
Updated•3 years ago
|
Priority: -- → P5
Updated•3 years ago
|
Status: NEW → RESOLVED
Closed: 3 years ago
Resolution: --- → DUPLICATE
You need to log in
before you can comment on or make changes to this bug.
Description
•