Closed Bug 1562185 Opened 4 months ago Closed 4 months ago

Cranelift: reorganize baldrdash and allow to change flags with an env variable

Categories

(Core :: Javascript: WebAssembly, task)

task
Not set

Tracking

()

RESOLVED FIXED
mozilla69
Tracking Status
firefox69 --- fixed

People

(Reporter: bbouvier, Assigned: bbouvier)

References

(Blocks 1 open bug)

Details

Attachments

(4 files)

No description provided.

This introduces a bindings module in the cranelift bindings directory, to make
the roles of different files clearer:

  • bindings/low_level.rs (formerly known as baldrapi.rs) contains all the
    bindings automatically generated by bindgen.
  • bindings/mod.rs (formerly known as baldrdash.rs) contains all the high-level
    bindings, to be used by the rest of baldrdash.

Some code has been moved to match the roles more consistently; in particular,
nothing in bindings/low_level should be directly used from outer the bindings
directory.

Rustfmt has been run too, which explains a few unrelated changes.

  • rename the cpu.rs file to isa.rs;
  • create a new function for platform-specific flags, and move x86 flags in
    there;

This allows using the CRANELIFT_FLAGS environment variable to control some
flags. To start with, this allows selecting the optimization level (opt_level,
which can be set to fastest/default/best as of this date) and
enabling/disabling jump tables.

Attachment #9074764 - Attachment description: Bug 1562185: Reorganize code in Cranelift bindings; r? → Bug 1562185: Reorganize code in Cranelift bindings; r?lth
Attachment #9074765 - Attachment description: Bug 1562185: Convert Baldrdash to a 2018 Rust edition project; r? → Bug 1562185: Convert Baldrdash to a 2018 Rust edition project; r?lth
Attachment #9074766 - Attachment description: Bug 1562185: Reorganize Cranelift target ISA configuration; r? → Bug 1562185: Reorganize Cranelift target ISA configuration; r?lth
Attachment #9074767 - Attachment description: Bug 1562185: Allow to specify Cranelift flags via an env variable; r? → Bug 1562185: Allow to specify Cranelift flags via an env variable; r?lth
Attachment #9074764 - Attachment description: Bug 1562185: Reorganize code in Cranelift bindings; r?lth → Bug 1562185: Reorganize code in Cranelift bindings; r=lth
Attachment #9074765 - Attachment description: Bug 1562185: Convert Baldrdash to a 2018 Rust edition project; r?lth → Bug 1562185: Convert Baldrdash to a 2018 Rust edition project; r=lth
Attachment #9074766 - Attachment description: Bug 1562185: Reorganize Cranelift target ISA configuration; r?lth → Bug 1562185: Reorganize Cranelift target ISA configuration; r=lth
Attachment #9074767 - Attachment description: Bug 1562185: Allow to specify Cranelift flags via an env variable; r?lth → Bug 1562185: Allow to specify Cranelift flags via an env variable; r=lth
Pushed by bbouvier@mozilla.com:
https://hg.mozilla.org/integration/mozilla-inbound/rev/f3b972e5914e
Reorganize code in Cranelift bindings; r=lth
https://hg.mozilla.org/integration/mozilla-inbound/rev/9d520df46c0b
Convert Baldrdash to a 2018 Rust edition project; r=lth
https://hg.mozilla.org/integration/mozilla-inbound/rev/12fbcca69b4d
Reorganize Cranelift target ISA configuration; r=lth
https://hg.mozilla.org/integration/mozilla-inbound/rev/c4ed2de25e6d
Allow to specify Cranelift flags via an env variable; r=lth
You need to log in before you can comment on or make changes to this bug.