diff options
Diffstat (limited to 'configure.ac')
-rw-r--r-- | configure.ac | 25 |
1 files changed, 16 insertions, 9 deletions
diff --git a/configure.ac b/configure.ac index 0b3dbd5e42fc..c6e778253ef3 100644 --- a/configure.ac +++ b/configure.ac @@ -1114,11 +1114,13 @@ emscripten) using_x11=no test_openldap=no test_qt5=yes + test_split_debug=yes test_system_freetype=no enable_compiler_plugins=no enable_customtarget_components=yes enable_qt5=yes enable_scripting=no + enable_split_debug=yes enable_wasm_strip=yes with_system_zlib=no with_theme="colibre" @@ -4579,7 +4581,7 @@ printf ("hello world\n"); } USE_LD= if test "$enable_ld" != "no"; then - if test "$GCC" = "yes"; then + if test "$GCC" = "yes" -a "$_os" != "Emscripten"; then if test -n "$enable_ld"; then check_use_ld "$enable_ld" fail_if_error elif test -z "$ENABLE_DEBUG$ENABLE_DBGUTIL"; then @@ -4662,11 +4664,11 @@ printf ("hello world\n"); fi AC_SUBST(LD_GC_SECTIONS) -HAVE_GSPLIT_DWARF= +HAVE_EXTERNAL_DWARF= if test "$enable_split_debug" != no; then use_split_debug= if test -n "$ENABLE_LTO"; then - true # Inherently incompatible, since no debug info is created while compiling, GCC complains. + : # Inherently incompatible, since no debug info is created while compiling, GCC complains. elif test "$enable_split_debug" = yes; then use_split_debug=1 dnl Currently by default enabled only on Linux, feel free to set test_split_debug above also for other platforms. @@ -4674,12 +4676,17 @@ if test "$enable_split_debug" != no; then use_split_debug=1 fi if test -n "$use_split_debug"; then - AC_MSG_CHECKING([whether $CC_BASE supports -gsplit-dwarf]) + if test "$_os" = "Emscripten"; then + TEST_CC_FLAG=-gseparate-dwarf + else + TEST_CC_FLAG=-gsplit-dwarf + fi + AC_MSG_CHECKING([whether $CC_BASE supports $TEST_CC_FLAG]) save_CFLAGS=$CFLAGS - CFLAGS="$CFLAGS -Werror -gsplit-dwarf" - AC_LINK_IFELSE([AC_LANG_PROGRAM([[]], [[ return 0; ]])],[ HAVE_GCC_SPLIT_DWARF=TRUE ],[]) + CFLAGS="$CFLAGS -Werror $TEST_CC_FLAG" + AC_LINK_IFELSE([AC_LANG_PROGRAM([[]], [[ return 0; ]])],[ HAVE_EXTERNAL_DWARF=TRUE ],[]) CFLAGS=$save_CFLAGS - if test "$HAVE_GCC_SPLIT_DWARF" = "TRUE"; then + if test "$HAVE_EXTERNAL_DWARF" = "TRUE"; then AC_MSG_RESULT([yes]) else if test "$enable_split_debug" = yes; then @@ -4689,12 +4696,12 @@ if test "$enable_split_debug" != no; then fi fi fi - if test -z "$HAVE_GCC_SPLIT_DWARF" -a "$test_split_debug" = "yes" -a -n "$use_split_debug"; then + if test -z "$HAVE_EXTERNAL_DWARF" -a "$test_split_debug" = "yes" -a -n "$use_split_debug"; then AC_MSG_WARN([Compiler is not capable of creating split debug info, linking will require more time and disk space.]) add_warning "Compiler is not capable of creating split debug info, linking will require more time and disk space." fi fi -AC_SUBST(HAVE_GCC_SPLIT_DWARF) +AC_SUBST(HAVE_EXTERNAL_DWARF) HAVE_CLANG_DEBUG_INFO_KIND_CONSTRUCTOR= AC_MSG_CHECKING([whether $CC_BASE supports -Xclang -debug-info-kind=constructor]) |