differentiate between "need for compilation" and "need for linking" in the compile tier
Categories
(Firefox Build System :: General, task)
Tracking
(firefox70 fixed)
Tracking | Status | |
---|---|---|
firefox70 | --- | fixed |
People
(Reporter: froydnj, Assigned: glandium)
References
(Regressed 1 open bug)
Details
(Keywords: in-triage)
Attachments
(7 files)
47 bytes,
text/x-phabricator-request
|
Details | Review | |
47 bytes,
text/x-phabricator-request
|
Details | Review | |
47 bytes,
text/x-phabricator-request
|
Details | Review | |
47 bytes,
text/x-phabricator-request
|
Details | Review | |
47 bytes,
text/x-phabricator-request
|
Details | Review | |
47 bytes,
text/x-phabricator-request
|
Details | Review | |
47 bytes,
text/x-phabricator-request
|
Details | Review |
I noticed today with a local build that js/src/jsapi-tests spent a lot of time waiting for JS's rust libs to be compiled (and, in turn, libjs.a). But that's somewhat silly: we should be able to compile the files in jsapi-tests without waiting for the rust library to build. The rust library should only block the linking of the jsapi-tests binary.
I guess this is kind of like bug 1278308?
Assignee | ||
Comment 1•6 years ago
|
||
Target split, kind of like bug 1572046?
![]() |
Reporter | |
Comment 2•6 years ago
|
||
(In reply to Mike Hommey [:glandium] from comment #1)
Target split, kind of like bug 1572046?
Almost, except that it needs to go a little bit deeper, IIUC. We currently drop PROGRAM
in target
, which then depends on all the objects. Moving PROGRAM
to target-programs
doesn't actually solve anything, because the objects (or their list file, depending) aren't driven off of being required for target
, but instead off of being required for PROGRAM
.
Assignee | ||
Comment 3•6 years ago
|
||
We need target-objects. Which would replace the changes in bug 1573314.
Assignee | ||
Comment 4•6 years ago
|
||
The current setup, where gtest/libxul uses the static library in
the same directory as the shared libxul, and somehow the backend ignores
gkrust for gtest/libxul, is fragile.
Assignee | ||
Comment 5•6 years ago
|
||
The existing check is no thorough enough: it only checks that multiple
Rust libraries are not directly linked to the same binary, but that's
not enough. In fact, until the change prior to this one, this was
happening to xul-gtest, and without that change, this is what configure
would now have to say:
Cannot link the following Rust libraries into the "xul-gtest" library:
- gkrust-gtest
- gkrust
Only one is allowed.
This only ended up not being a problem because the backend somehow works
around the problem, which it shouldn't have to do.
Assignee | ||
Comment 6•6 years ago
|
||
So that isinstance(foo, StaticLibrary) doesn't end up being true for
HostRustLibrary. Instead, it now inherits from HostLibrary.
Assignee | ||
Comment 7•6 years ago
|
||
Apart from the need to link them last, they don't actually need to be
treated any different from normal static libraries.
Assignee | ||
Comment 8•6 years ago
|
||
HostLibrary is always an expand lib. HostRustLibrary is always a
non-expand lib. But we currently rely on type checking to figure that
out, rather than an attribute, like for StaticLibrary. Doing that
simplifies existing and upcoming code.
Assignee | ||
Comment 9•6 years ago
|
||
With the addition of toolkit/library/build because of the rust
shenanigans, bug 1573314 and bug 1572046 don't do anything useful
anymore. We're going to do something better anyways.
Assignee | ||
Comment 10•6 years ago
|
||
Make the target and host targets depend on those, and flatten the
dependencies.
That is, instead of chains like:
browser/app/target: mozglue/build/target
mozglue/build/target: memory/build/target
we now have:
browser/app/target: browser/app/target-objects
mozglue/build/target-objects
memory/build/target-objects
Which means Make can feel free to build the object files in browser/app
before building other dependencies.
Comment 11•6 years ago
|
||
Comment 12•6 years ago
|
||
bugherder |
https://hg.mozilla.org/mozilla-central/rev/14329e051f16
https://hg.mozilla.org/mozilla-central/rev/295a5e78ed1e
https://hg.mozilla.org/mozilla-central/rev/e4285304b231
https://hg.mozilla.org/mozilla-central/rev/d55d48534b6f
https://hg.mozilla.org/mozilla-central/rev/83033ba2c21f
https://hg.mozilla.org/mozilla-central/rev/8afcc2c2c508
https://hg.mozilla.org/mozilla-central/rev/c51ba76790c0
Description
•