Closed Bug 1524396 Opened 8 months ago Closed 6 months ago

Unify how target/host linker/flags are passed to rust

Categories

(Firefox Build System :: General, defect)

defect
Not set

Tracking

(firefox68 fixed)

RESOLVED FIXED
mozilla68
Tracking Status
firefox68 --- fixed

People

(Reporter: glandium, Assigned: glandium)

References

(Blocks 1 open bug)

Details

Attachments

(2 files)

Windows builds use one method, unix builds another. They could use some unification.

Depends on: 1522609, 1522614, 1523540
Depends on: 1524429
Blocks: 1535177
Duplicate of this bug: 1535177
Blocks: 1537639
Depends on: 1537644
No longer depends on: 1537644

While the substitution pattern is kind of awful in make, it will allow
to more straightforwardly deal with the difference between target and
host.

The current setup uses different ways for different platforms, with
different workarounds, even using extra configuration items for Windows.

Now that there can't be a difference between the host per the build
system and the host per rust, we can get rid of those configuration
items, and use a more common infrastructure.

We cannot, however, avoid using wrapper scripts, because per-target rust
link-arg flags don't work up great.

The downside is that multiplies the number of wrappers, as we now have
to have a different one for host and target, and then we have .bat files
and shell scripts for, respectively, Windows hosts, and other hosts.

Depends on D24321

Pushed by mh@glandium.org:
https://hg.mozilla.org/integration/autoland/rev/0480bca0d680
Replace RUST_TARGET_ENV_NAME with make substitutions. r=chmanchester
https://hg.mozilla.org/integration/autoland/rev/3a444460cb6c
Unify how target/host linker/flags are passed to rust. r=chmanchester

Hit by https://github.com/mystor/phlay/issues/46 again :(

I'll have to wait for the backout to be merged around and will land manually on inbound...

Flags: needinfo?(mh+mozilla)

I fixed phlay instead.

Pushed by mh@glandium.org:
https://hg.mozilla.org/integration/autoland/rev/fca0ca0f03fe
Replace RUST_TARGET_ENV_NAME with make substitutions. r=chmanchester
https://hg.mozilla.org/integration/autoland/rev/fc6f661f4113
Unify how target/host linker/flags are passed to rust. r=chmanchester
Status: NEW → RESOLVED
Closed: 6 months ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla68

Noticed some big reductions on build times, on some Windows platforms! \0/

== Change summary for alert #20070 (as of Fri, 22 Mar 2019 14:09:22 GMT) ==

Improvements:

33% build times windows2012-64 debug rusttests taskcluster-c4.4xlarge 850.91 -> 568.88
33% build times windows2012-64 debug rusttests taskcluster-c5.4xlarge 654.28 -> 438.88

For up to date results, see: https://treeherder.mozilla.org/perf.html#/alerts?id=20070

Blocks: 1512723
You need to log in before you can comment on or make changes to this bug.