Join GitHub today
GitHub is home to over 50 million developers working together to host and review code, manage projects, and build software together.
Sign upRun bindgen in build.rs #134
Conversation
|
r? @jdm |
| builder = builder | ||
| .clang_arg("-DJS_GC_ZEAL") | ||
| .clang_arg("-DDEBUG") | ||
| .clang_arg("-DJS_DEBUG"); |
This comment has been minimized.
This comment has been minimized.
jdm
May 10, 2018
Member
These defines are missing from the jsglue compilation if debugmozjs is enabled. We should probably make some kind of common setup to avoid flags going out of sync.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
asajeffrey
May 10, 2018
Author
Member
Rather annoyingly, the flags are set in both makefile.cargo and build.rs, so we're stuck with some duplication. The thing to do eventually is move everything out of makefile.cargo, but I don't think that should be part of this PR.
|
Oh, and credit where credit's due, quite a bit of the build is from @fitzgen thanks! |
|
I'm enjoying these commit messages. |
|
You can spot my level of annoyance with travis and appveyor increasing as the day goes on :) |
|
FWIW, I still don't think we should run bindgen in build.rs and force everyone to have a clang setup etc. There are no particular problems with checking in the bindings, apart from generating them in the first place. |
|
@nox yes, there's an annoying trade-off of checking generated artefacts in vs building them. If this were the only use of libclang, I'd say we should just swallow the pain and check them in, but it looks like osmesaup may require llvm too. |
|
Look at all that green! |
|
Back to red again |
|
Green! Lovely green! |
|
Squashed. |
|
@bors-servo r=jdm |
|
|
Run bindgen in build.rs This PR uses the bindgen crate to generate the Rust bindings for the `mozjs_sys` crate. In its current form, this means requiring llvm to be installed to build `mozjs_sys`. We could check those bindings in if we want to avoid that requirement, but this has its own problems. <!-- Reviewable:start --> --- This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/mozjs/134) <!-- Reviewable:end -->
|
|
Version bump This is the version bump for bindgenup, PR #134 which can land once it does. <!-- Reviewable:start --> --- This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/mozjs/135) <!-- Reviewable:end -->
Get the mozjs crate to work with the mozjs_sys which uses bindgen This is the matching PR to servo/mozjs#134 which runs bindgen on spidermonkey to produce Rust bindings. <!-- Reviewable:start --> --- This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/rust-mozjs/425) <!-- Reviewable:end -->
Get the mozjs crate to work with the mozjs_sys which uses bindgen <!-- Please describe your changes on the following line: --> This is the matching PR to servo/mozjs#134 and servo/rust-mozjs#425 which runs bindgen on spidermonkey to produce Rust bindings. --- <!-- Thank you for contributing to Servo! Please replace each `[ ]` by `[X]` when the step is complete, and replace `__` with appropriate data: --> - [X] `./mach build -d` does not report any errors - [X] `./mach test-tidy` does not report any errors - [X] These changes do not require tests because current tests should catch failures <!-- Also, please make sure that "Allow edits from maintainers" checkbox is checked, so that we can help you if you get stuck somewhere along the way.--> <!-- Pull requests that do not address these steps are welcome, but they will require additional verification as part of the review process. --> <!-- Reviewable:start --> --- This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/20793) <!-- Reviewable:end -->
Get the mozjs crate to work with the mozjs_sys which uses bindgen <!-- Please describe your changes on the following line: --> This is the matching PR to servo/mozjs#134 and servo/rust-mozjs#425 which runs bindgen on spidermonkey to produce Rust bindings. --- <!-- Thank you for contributing to Servo! Please replace each `[ ]` by `[X]` when the step is complete, and replace `__` with appropriate data: --> - [X] `./mach build -d` does not report any errors - [X] `./mach test-tidy` does not report any errors - [X] These changes do not require tests because current tests should catch failures <!-- Also, please make sure that "Allow edits from maintainers" checkbox is checked, so that we can help you if you get stuck somewhere along the way.--> <!-- Pull requests that do not address these steps are welcome, but they will require additional verification as part of the review process. --> <!-- Reviewable:start --> --- This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/20793) <!-- Reviewable:end -->
Get the mozjs crate to work with the mozjs_sys which uses bindgen <!-- Please describe your changes on the following line: --> This is the matching PR to servo/mozjs#134 and servo/rust-mozjs#425 which runs bindgen on spidermonkey to produce Rust bindings. --- <!-- Thank you for contributing to Servo! Please replace each `[ ]` by `[X]` when the step is complete, and replace `__` with appropriate data: --> - [X] `./mach build -d` does not report any errors - [X] `./mach test-tidy` does not report any errors - [X] These changes do not require tests because current tests should catch failures <!-- Also, please make sure that "Allow edits from maintainers" checkbox is checked, so that we can help you if you get stuck somewhere along the way.--> <!-- Pull requests that do not address these steps are welcome, but they will require additional verification as part of the review process. --> <!-- Reviewable:start --> --- This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/20793) <!-- Reviewable:end -->
Get the mozjs crate to work with the mozjs_sys which uses bindgen <!-- Please describe your changes on the following line: --> This is the matching PR to servo/mozjs#134 and servo/rust-mozjs#425 which runs bindgen on spidermonkey to produce Rust bindings. --- <!-- Thank you for contributing to Servo! Please replace each `[ ]` by `[X]` when the step is complete, and replace `__` with appropriate data: --> - [X] `./mach build -d` does not report any errors - [X] `./mach test-tidy` does not report any errors - [X] These changes do not require tests because current tests should catch failures <!-- Also, please make sure that "Allow edits from maintainers" checkbox is checked, so that we can help you if you get stuck somewhere along the way.--> <!-- Pull requests that do not address these steps are welcome, but they will require additional verification as part of the review process. --> <!-- Reviewable:start --> --- This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/20793) <!-- Reviewable:end -->
Get the mozjs crate to work with the mozjs_sys which uses bindgen <!-- Please describe your changes on the following line: --> This is the matching PR to servo/mozjs#134 and servo/rust-mozjs#425 which runs bindgen on spidermonkey to produce Rust bindings. --- <!-- Thank you for contributing to Servo! Please replace each `[ ]` by `[X]` when the step is complete, and replace `__` with appropriate data: --> - [X] `./mach build -d` does not report any errors - [X] `./mach test-tidy` does not report any errors - [X] These changes do not require tests because current tests should catch failures <!-- Also, please make sure that "Allow edits from maintainers" checkbox is checked, so that we can help you if you get stuck somewhere along the way.--> <!-- Pull requests that do not address these steps are welcome, but they will require additional verification as part of the review process. --> <!-- Reviewable:start --> --- This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/20793) <!-- Reviewable:end -->
Get the mozjs crate to work with the mozjs_sys which uses bindgen <!-- Please describe your changes on the following line: --> This is the matching PR to servo/mozjs#134 and servo/rust-mozjs#425 which runs bindgen on spidermonkey to produce Rust bindings. --- <!-- Thank you for contributing to Servo! Please replace each `[ ]` by `[X]` when the step is complete, and replace `__` with appropriate data: --> - [X] `./mach build -d` does not report any errors - [X] `./mach test-tidy` does not report any errors - [X] These changes do not require tests because current tests should catch failures <!-- Also, please make sure that "Allow edits from maintainers" checkbox is checked, so that we can help you if you get stuck somewhere along the way.--> <!-- Pull requests that do not address these steps are welcome, but they will require additional verification as part of the review process. --> <!-- Reviewable:start --> --- This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/20793) <!-- Reviewable:end -->
Get the mozjs crate to work with the mozjs_sys which uses bindgen <!-- Please describe your changes on the following line: --> This is the matching PR to servo/mozjs#134 and servo/rust-mozjs#425 which runs bindgen on spidermonkey to produce Rust bindings. --- <!-- Thank you for contributing to Servo! Please replace each `[ ]` by `[X]` when the step is complete, and replace `__` with appropriate data: --> - [X] `./mach build -d` does not report any errors - [X] `./mach test-tidy` does not report any errors - [X] These changes do not require tests because current tests should catch failures <!-- Also, please make sure that "Allow edits from maintainers" checkbox is checked, so that we can help you if you get stuck somewhere along the way.--> <!-- Pull requests that do not address these steps are welcome, but they will require additional verification as part of the review process. --> <!-- Reviewable:start --> --- This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/20793) <!-- Reviewable:end -->
Get the mozjs crate to work with the mozjs_sys which uses bindgen <!-- Please describe your changes on the following line: --> This is the matching PR to servo/mozjs#134 and servo/rust-mozjs#425 which runs bindgen on spidermonkey to produce Rust bindings. --- <!-- Thank you for contributing to Servo! Please replace each `[ ]` by `[X]` when the step is complete, and replace `__` with appropriate data: --> - [X] `./mach build -d` does not report any errors - [X] `./mach test-tidy` does not report any errors - [X] These changes do not require tests because current tests should catch failures <!-- Also, please make sure that "Allow edits from maintainers" checkbox is checked, so that we can help you if you get stuck somewhere along the way.--> <!-- Pull requests that do not address these steps are welcome, but they will require additional verification as part of the review process. --> <!-- Reviewable:start --> --- This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/20793) <!-- Reviewable:end -->
Get the mozjs crate to work with the mozjs_sys which uses bindgen <!-- Please describe your changes on the following line: --> This is the matching PR to servo/mozjs#134 and servo/rust-mozjs#425 which runs bindgen on spidermonkey to produce Rust bindings. --- <!-- Thank you for contributing to Servo! Please replace each `[ ]` by `[X]` when the step is complete, and replace `__` with appropriate data: --> - [X] `./mach build -d` does not report any errors - [X] `./mach test-tidy` does not report any errors - [X] These changes do not require tests because current tests should catch failures <!-- Also, please make sure that "Allow edits from maintainers" checkbox is checked, so that we can help you if you get stuck somewhere along the way.--> <!-- Pull requests that do not address these steps are welcome, but they will require additional verification as part of the review process. --> <!-- Reviewable:start --> --- This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/20793) <!-- Reviewable:end -->
Get the mozjs crate to work with the mozjs_sys which uses bindgen <!-- Please describe your changes on the following line: --> This is the matching PR to servo/mozjs#134 and servo/rust-mozjs#425 which runs bindgen on spidermonkey to produce Rust bindings. --- <!-- Thank you for contributing to Servo! Please replace each `[ ]` by `[X]` when the step is complete, and replace `__` with appropriate data: --> - [X] `./mach build -d` does not report any errors - [X] `./mach test-tidy` does not report any errors - [X] These changes do not require tests because current tests should catch failures <!-- Also, please make sure that "Allow edits from maintainers" checkbox is checked, so that we can help you if you get stuck somewhere along the way.--> <!-- Pull requests that do not address these steps are welcome, but they will require additional verification as part of the review process. --> <!-- Reviewable:start --> --- This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/20793) <!-- Reviewable:end -->
Get the mozjs crate to work with the mozjs_sys which uses bindgen <!-- Please describe your changes on the following line: --> This is the matching PR to servo/mozjs#134 and servo/rust-mozjs#425 which runs bindgen on spidermonkey to produce Rust bindings. --- <!-- Thank you for contributing to Servo! Please replace each `[ ]` by `[X]` when the step is complete, and replace `__` with appropriate data: --> - [X] `./mach build -d` does not report any errors - [X] `./mach test-tidy` does not report any errors - [X] These changes do not require tests because current tests should catch failures <!-- Also, please make sure that "Allow edits from maintainers" checkbox is checked, so that we can help you if you get stuck somewhere along the way.--> <!-- Pull requests that do not address these steps are welcome, but they will require additional verification as part of the review process. --> <!-- Reviewable:start --> --- This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/20793) <!-- Reviewable:end -->
asajeffrey commentedMay 9, 2018
•
edited by larsbergstrom
This PR uses the bindgen crate to generate the Rust bindings for the
mozjs_syscrate.In its current form, this means requiring llvm to be installed to build
mozjs_sys. We could check those bindings in if we want to avoid that requirement, but this has its own problems.This change is