mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2024-11-25 17:10:23 +00:00
Lagom: Work around gcc codegen bug
Without this, GenerateUnicodeData crashes when run during the build. With this, `serenity.sh run` brings up a running SerenityOS. Since GenerateUnicodeData doesn't take a lot of time to run, just disable optimizations to work around the problem for now. Works around #15449.
This commit is contained in:
parent
e0a6ed4bc0
commit
ffbf5596cd
Notes:
sideshowbarker
2024-07-17 06:23:53 +09:00
Author: https://github.com/nico Commit: https://github.com/SerenityOS/serenity/commit/ffbf5596cd Pull-request: https://github.com/SerenityOS/serenity/pull/15451 Reviewed-by: https://github.com/linusg ✅ Reviewed-by: https://github.com/timschumi ✅
1 changed files with 8 additions and 0 deletions
|
@ -198,6 +198,11 @@ static CodePointRange parse_code_point_range(StringView list)
|
|||
return code_point_range;
|
||||
}
|
||||
|
||||
// gcc-11, gcc-12 have a codegen bug on (at least) intel macOS 10.15, see #15449.
|
||||
#if defined(__GNUC__) && !defined(__clang__) && defined(AK_OS_MACOS)
|
||||
# pragma GCC push_options
|
||||
# pragma GCC optimize("O0")
|
||||
#endif
|
||||
static ErrorOr<void> parse_special_casing(Core::Stream::BufferedFile& file, UnicodeData& unicode_data)
|
||||
{
|
||||
Array<u8, 1024> buffer;
|
||||
|
@ -644,6 +649,9 @@ static ErrorOr<void> parse_unicode_data(Core::Stream::BufferedFile& file, Unicod
|
|||
|
||||
return {};
|
||||
}
|
||||
#if defined(__GNUC__) && !defined(__clang__) && defined(AK_OS_MACOS)
|
||||
# pragma GCC pop_options
|
||||
#endif
|
||||
|
||||
static ErrorOr<void> generate_unicode_data_header(Core::Stream::BufferedFile& file, UnicodeData& unicode_data)
|
||||
{
|
||||
|
|
Loading…
Reference in a new issue