style: Workaround GCC-calling-into-LLVM ABI issue by making GenericFontFamily larger

This enum being a bit larger doesn't cause many common data structures
to grow, so this should be fine.

Differential Revision: https://phabricator.services.mozilla.com/D123146
This commit is contained in:
Emilio Cobos Álvarez 2023-05-22 14:37:44 +02:00 committed by Oriol Brufau
parent 79893116e7
commit db1ada85dc

View file

@ -398,6 +398,10 @@ fn system_ui_enabled(_: &ParserContext) -> bool {
/// The order here is important, if you change it make sure that /// The order here is important, if you change it make sure that
/// `gfxPlatformFontList.h`s ranged array and `gfxFontFamilyList`'s /// `gfxPlatformFontList.h`s ranged array and `gfxFontFamilyList`'s
/// sSingleGenerics are updated as well. /// sSingleGenerics are updated as well.
///
/// NOTE(emilio): Should be u8, but it's a u32 because of ABI issues between GCC
/// and LLVM see https://bugs.llvm.org/show_bug.cgi?id=44228 / bug 1600735 /
/// bug 1726515.
#[derive( #[derive(
Clone, Clone,
Copy, Copy,
@ -413,7 +417,7 @@ fn system_ui_enabled(_: &ParserContext) -> bool {
ToShmem, ToShmem,
)] )]
#[cfg_attr(feature = "servo", derive(Deserialize, Serialize))] #[cfg_attr(feature = "servo", derive(Deserialize, Serialize))]
#[repr(u8)] #[repr(u32)]
#[allow(missing_docs)] #[allow(missing_docs)]
pub enum GenericFontFamily { pub enum GenericFontFamily {
/// No generic family specified, only for internal usage. /// No generic family specified, only for internal usage.