-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
stylo failed to build #16
Comments
layout/style/moz.build CbindgenHeader(
"ServoStyleConsts.h",
inputs=["/servo/ports/geckolib", "/servo/components/style"],
) build/templates.mozbuild @template
def CbindgenHeader(name, inputs):
"""Add one GENERATED_FILES by running RunCbindgen.py"""
inputs = ['!/config/cbindgen-metadata.json'] + inputs
GeneratedFile(name, script='/build/RunCbindgen.py',
entry_point='generate', inputs=inputs) |
OK, work around on RunCBindgen.py was not good. this emit WARNs to stderr, this workaround captures it into generated header files. |
I'd struggled with this for some days, but it doesn't work subprocess+pty code well on Haiku. I'll try to build patched cargo or request doing it the package's owner. It seems cross-compiling is required for rust_bin package rebuild. |
|
SyleContain::SIZE
indeed, these files don't contain 'SIZE' |
StyleContain from ServoBindings.toml # All cbindgen-types are in mod "structs::root::mozilla".
# FIXME(emilio): We probably want to automate this somehow...
cbindgen-types = [
# (snip)
{ gecko = "StyleContain", servo = "crate::values::computed::Contain" }, pub use'd from box::Contain in style/values/computed/mod.rs pub use self::box_::{AnimationIterationCount, AnimationName, AnimationTimeline, Contain, ContainerName, ContainerType}; so should be defined in box.rs as this: bitflags! {
#[derive(MallocSizeOf, Parse, SpecifiedValueInfo, ToComputedValue, ToCss, ToResolvedValue, ToShmem)]
#[css(bitflags(single = "none,strict,content", mixed="size,layout,paint,inline-size", overlapping_bits))]
#[repr(C)]
/// Constants for contain: https://drafts.csswg.org/css-contain/#contain-property
pub struct Contain: u8 {
/// `none` variant, just for convenience.
const NONE = 0;
/// `inline-size` variant, turns on single-axis inline size containment
const INLINE_SIZE = 1 << 0;
/// `block-size` variant, turns on single-axis block size containment, internal only
const BLOCK_SIZE = 1 << 1;
/// `layout` variant, turns on layout containment
const LAYOUT = 1 << 2;
/// `paint` variant, turns on paint containment
const PAINT = 1 << 3;
/// 'size' variant, turns on size containment
const SIZE = 1 << 4 | Contain::INLINE_SIZE.bits | Contain::BLOCK_SIZE.bits; |
but didn't generate SIZE, CONTENT, STRICT in ServoStyleConsts.h /// Constants for contain: https://drafts.csswg.org/css-contain/#contain-property
struct StyleContain {
// (snip)
static const StyleContain NONE;
static const StyleContain INLINE_SIZE;
static const StyleContain BLOCK_SIZE;
static const StyleContain LAYOUT;
static const StyleContain PAINT;
};
/// `none` variant, just for convenience.
inline const StyleContain StyleContain::NONE = StyleContain{ /* .bits = */ (uint8_t)0 };
/// `inline-size` variant, turns on single-axis inline size containment
inline const StyleContain StyleContain::INLINE_SIZE = StyleContain{ /* .bits = */ (uint8_t)(1 << 0) };
/// `block-size` variant, turns on single-axis block size containment, internal only
inline const StyleContain StyleContain::BLOCK_SIZE = StyleContain{ /* .bits = */ (uint8_t)(1 << 1) };
/// `layout` variant, turns on layout containment
inline const StyleContain StyleContain::LAYOUT = StyleContain{ /* .bits = */ (uint8_t)(1 << 2) };
/// `paint` variant, turns on paint containment
inline const StyleContain StyleContain::PAINT = StyleContain{ /* .bits = */ (uint8_t)(1 << 3) };
from box.rs bitflags! {
#[derive(MallocSizeOf, Parse, SpecifiedValueInfo, ToComputedValue, ToCss, ToResolvedValue, ToShmem)]
#[css(bitflags(single = "none,strict,content", mixed="size,layout,paint,inline-size", overlapping_bits))]
#[repr(C)]
/// Constants for contain: https://drafts.csswg.org/css-contain/#contain-property
pub struct Contain: u8 {
/// `none` variant, just for convenience.
const NONE = 0;
/// `inline-size` variant, turns on single-axis inline size containment
const INLINE_SIZE = 1 << 0;
/// `block-size` variant, turns on single-axis block size containment, internal only
const BLOCK_SIZE = 1 << 1;
/// `layout` variant, turns on layout containment
const LAYOUT = 1 << 2;
/// `paint` variant, turns on paint containment
const PAINT = 1 << 3;
/// 'size' variant, turns on size containment
const SIZE = 1 << 4 | Contain::INLINE_SIZE.bits | Contain::BLOCK_SIZE.bits;
/// `content` variant, turns on layout and paint containment
const CONTENT = 1 << 5 | Contain::LAYOUT.bits | Contain::PAINT.bits;
/// `strict` variant, turns on all types of containment
const STRICT = 1 << 6 | Contain::LAYOUT.bits | Contain::PAINT.bits | Contain::SIZE.bits;
}
} I guess cbindgen couldn't generate these constants because it can't evaluate it as constexprs because llvm, cbindgen or any dependencies were too old to support ths. |
We didn't meet cbindgen requiement >0.23. So this may be cause. Check difference cbindgen 0.20 vs 0.23 and try building newer cbindgen myself if needed. cbindgen 0.23 looks improved constexpr |
requiement 0.22 to 0.23 is from bugzilla https://bugzilla.mozilla.org/show_bug.cgi?id=1765746 but this is perf issue. 0.19 to 0.22 is from following bug https://bugzilla.mozilla.org/show_bug.cgi?id=1765291 yes, we need 0.22+ version of cbindgen. try fixing #4 now |
|
|
UnrestrictedDoubleOrString is defined here. AnimationEffectBinding.h class UnrestrictedDoubleOrString
{
friend class UnrestrictedDoubleOrStringArgument;
enum Type
{
eUninitialized,
eUnrestrictedDouble,
eString
}; |
Max parallel build jobs can be specified with https://doc.rust-lang.org/cargo/reference/config.html#buildjobs |
|
The text was updated successfully, but these errors were encountered: