From db1ada85dc6cdd268a61b521ac238a3080f5efb6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Emilio=20Cobos=20=C3=81lvarez?= Date: Mon, 22 May 2023 14:37:44 +0200 Subject: [PATCH] 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 --- components/style/values/computed/font.rs | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/components/style/values/computed/font.rs b/components/style/values/computed/font.rs index a477af5e68b..e2b29f61d5e 100644 --- a/components/style/values/computed/font.rs +++ b/components/style/values/computed/font.rs @@ -398,6 +398,10 @@ fn system_ui_enabled(_: &ParserContext) -> bool { /// The order here is important, if you change it make sure that /// `gfxPlatformFontList.h`s ranged array and `gfxFontFamilyList`'s /// 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( Clone, Copy, @@ -413,7 +417,7 @@ fn system_ui_enabled(_: &ParserContext) -> bool { ToShmem, )] #[cfg_attr(feature = "servo", derive(Deserialize, Serialize))] -#[repr(u8)] +#[repr(u32)] #[allow(missing_docs)] pub enum GenericFontFamily { /// No generic family specified, only for internal usage.