From 549193cb1fa015c2eb3cfb7011cd2261909ee839 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=88=98=E7=9A=93?= Date: Sat, 8 Mar 2025 14:21:08 -0500 Subject: [PATCH] Remove `-fno-optimize-sibling-calls` from Ruby in libretro builds The only reason why WABT suggests this flag be used is because it guarantees that infinite recursion will crash the program instead of running in an infinite loop. Honestly, who cares? It's not like either of these things are supposed to happen, so from the viewpoint of the end user, they're basically the same thing. I think we can afford to deviate from the WebAssembly Specification here if it means allowing the compiler to do more optimizations. --- meson.build | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/meson.build b/meson.build index 1febf702..0e95ddc9 100644 --- a/meson.build +++ b/meson.build @@ -38,8 +38,8 @@ if is_libretro libretro_stage1_path = get_option('libretro_stage1_path') libretro_link_args = [] - libretro_cflags = ['-Wno-unused-command-line-argument'] - libretro_cppflags = ['-Wno-unused-command-line-argument'] + libretro_cflags = [] + libretro_cppflags = [] libretro_ruby_cflags = [] if core_is_static and not is_emscripten and get_option('b_lto') @@ -494,14 +494,12 @@ if is_libretro link_with: static_library( 'ruby', c_args: libretro_cflags + libretro_ruby_cflags + libretro_defines + [ - '-fno-optimize-sibling-calls', '-frounding-math', '-fsignaling-nans', '-Wno-unused-function', '-Wno-unused-value', '-Wno-unused-variable', '-Wno-unused-but-set-variable', - '-Wno-ignored-optimization-argument', ], include_directories: [ include_directories('binding-sandbox'),