diff options
Diffstat (limited to 'configure.ac')
-rw-r--r-- | configure.ac | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/configure.ac b/configure.ac index adffb1efc630..b1fcf6fd795d 100644 --- a/configure.ac +++ b/configure.ac @@ -1506,7 +1506,8 @@ libo_FUZZ_ARG_ENABLE(optimized, [Whether to compile with optimization flags. By default, disabled for --enable-debug and --enable-dbgutil, enabled otherwise. Using 'debug' will try to use only optimizations that should - not interfere with debugging.])) + not interfere with debugging. For Emscripten we default to optimized (-O1) + debug build, as otherwise biaries become too large.])) libo_FUZZ_ARG_ENABLE(runtime-optimizations, AS_HELP_STRING([--disable-runtime-optimizations], @@ -4379,6 +4380,10 @@ if test -n "$ENABLE_DBGUTIL" -o \( -n "$enable_debug" -a "$enable_debug" != "no" else AC_MSG_RESULT([yes]) fi + if test "$_os" = "Emscripten" -a -z "$enable_optimized"; then + # Otherwise binaries simply become too large (linker OOM + browser fails to load) + enable_optimized=debug + fi else ENABLE_DEBUG="" AC_MSG_RESULT([no]) @@ -4656,7 +4661,7 @@ elif test "$enable_optimized" = debug; then ENABLE_OPTIMIZED_DEBUG=TRUE AC_MSG_RESULT([yes (debug)]) HAVE_GCC_OG= - if test "$GCC" = "yes"; then + if test "$GCC" = "yes" -a "$_os" != "Emscripten"; then AC_MSG_CHECKING([whether $CC_BASE supports -Og]) save_CFLAGS=$CFLAGS CFLAGS="$CFLAGS -Werror -Og" @@ -4668,7 +4673,7 @@ elif test "$enable_optimized" = debug; then AC_MSG_RESULT([no]) fi fi - if test -z "$HAVE_GCC_OG"; then + if test -z "$HAVE_GCC_OG" -a "$_os" != "Emscripten"; then AC_MSG_ERROR([The compiler does not support optimizations suitable for debugging.]) fi else |