mirror of
https://github.com/servo/servo.git
synced 2025-08-12 08:55:32 +01:00
Do build-time bindgen
Majority of build_gecko.rs is just the straightforward conversion from regen.py. There are two differences that: 1. Side in whitelist is changed to mozilla::Side 2. std::atomic__My_base is added to opaque types for Windows
This commit is contained in:
parent
6dd4b4822f
commit
1cefd1bef0
8 changed files with 739 additions and 835 deletions
|
@ -3,22 +3,23 @@
|
|||
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
||||
|
||||
#[allow(dead_code, improper_ctypes, non_camel_case_types)]
|
||||
pub mod bindings;
|
||||
pub mod bindings {
|
||||
include!(concat!(env!("OUT_DIR"), "/gecko/bindings.rs"));
|
||||
}
|
||||
|
||||
// FIXME: We allow `improper_ctypes` (for now), because the lint doesn't allow
|
||||
// foreign structs to have `PhantomData`. We should remove this once the lint
|
||||
// ignores this case.
|
||||
|
||||
#[cfg(debug_assertions)]
|
||||
#[allow(dead_code, improper_ctypes, non_camel_case_types, non_snake_case, non_upper_case_globals)]
|
||||
pub mod structs {
|
||||
include!("structs_debug.rs");
|
||||
}
|
||||
|
||||
#[cfg(not(debug_assertions))]
|
||||
#[allow(dead_code, improper_ctypes, non_camel_case_types, non_snake_case, non_upper_case_globals)]
|
||||
pub mod structs {
|
||||
include!("structs_release.rs");
|
||||
cfg_if! {
|
||||
if #[cfg(debug_assertions)] {
|
||||
include!(concat!(env!("OUT_DIR"), "/gecko/structs_debug.rs"));
|
||||
} else {
|
||||
include!(concat!(env!("OUT_DIR"), "/gecko/structs_release.rs"));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
pub mod sugar;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue