Skip to content

Commit

Permalink
servo: Merge #14244 - Use build script to generate binding files (fro…
Browse files Browse the repository at this point in the history
…m upsuper:buildtime-bindgen); r=emilio

<!-- Please describe your changes on the following line: -->
This is a WIP patch to make rust-bindgen a build time dependency of style component for stylo. This should make things more automatic. I convert majority of `regen.py` to `build_gecko.rs`.

It currently doesn't work on Windows, because of rust-lang/rust-bindgen#271 (it works when I fix the generated file manually, though). I haven't tested other platforms.

It would break servo's CI for geckolib, because:
1. it needs libclang (which is probably easy to solve)
2. it needs `MOZ_OBJDIR` to be passed in so that it can generate bindings

Manishearth emilio Do you agree with this change? Do you have suggestion for the issues above?

---
<!-- Thank you for contributing to Servo! Please replace each `[ ]` by `[X]` when the step is complete, and replace `__` with appropriate data: -->
- [ ] `./mach build -d` does not report any errors
- [ ] `./mach test-tidy` does not report any errors
- [ ] These changes fix #__ (github issue number if applicable).

<!-- Either: -->
- [ ] There are tests for these changes OR
- [ ] These changes do not require tests because _____

<!-- Pull requests that do not address these steps are welcome, but they will require additional verification as part of the review process. -->

Source-Repo: https://github.com/servo/servo
Source-Revision: 872ec89a9c546eb05246b5047aabfc032d140eff

UltraBlame original commit: 78635ebabfc9e63971829a549388d1b61a75a503
  • Loading branch information
marco-c committed Oct 1, 2019
1 parent 75c00a3 commit 39efbc8
Show file tree
Hide file tree
Showing 12 changed files with 5,878 additions and 6,700 deletions.
1,856 changes: 1,550 additions & 306 deletions servo/Cargo.lock

Large diffs are not rendered by default.

47 changes: 47 additions & 0 deletions servo/components/style/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,16 @@ rayon
unstable
"
]
bindgen
=
[
"
libbindgen
"
"
regex
"
]
servo
=
[
Expand Down Expand Up @@ -538,6 +548,29 @@ build
-
dependencies
]
lazy_static
=
"
0
.
2
"
libbindgen
=
{
version
=
"
0
.
1
.
1
"
optional
=
true
}
phf_codegen
=
"
Expand All @@ -547,6 +580,20 @@ phf_codegen
.
20
"
regex
=
{
version
=
"
0
.
1
"
optional
=
true
}
walkdir
=
"
Expand Down
50 changes: 0 additions & 50 deletions servo/components/style/binding_tools/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -69,53 +69,3 @@ the
Rust
bindings
.
#
#
regen
.
sh
This
will
regenerate
the
bindings
for
the
ServoBindings
.
h
file
in
your
gecko
build
.
The
generated
bindings
live
in
components
/
style
/
gecko_bindings
/
bindings
.
rs
.
For
structs
the
bindings
are
in
components
/
style
/
gecko_bindings
/
structs_
*
Loading

0 comments on commit 39efbc8

Please sign in to comment.