Kaydet (Commit) 14979241 authored tarafından Miklos Vajna's avatar Miklos Vajna

android: add a check for the installed memory in the machine

... and just error out with < 16G and all symbols. Should help newcomers
who have e.g. 8GB of memory, build with dbgutil, but then unable to
complete the build as the linker never finishes.

Change-Id: I9f3ad5c6d76a18d6aa5b0b2d61aa115ed441b8e3
üst 718143b5
......@@ -3858,6 +3858,18 @@ else
fi
AC_SUBST(ENABLE_SYMBOLS)
if test -n "$with_android_ndk" -a \( -n "$ENABLE_SYMBOLS" -o -n "$ENABLE_DEBUG" -o -n "$ENABLE_DBGUTIL" \) -a "$ENABLE_DEBUGINFO_FOR" = "all"; then
# Building on Android with full symbols: without enough memory the linker never finishes currently.
AC_MSG_CHECKING([whether enough memory is available for linking])
mem_size=$(grep -o 'MemTotal: *.\+ kB' /proc/meminfo | sed 's/MemTotal: *\(.\+\) kB/\1/')
# Check for 15GB, as Linux reports a bit less than the physical memory size.
if test -n "$mem_size" -a $mem_size -lt 15728640; then
AC_MSG_ERROR([building with full symbols and less than 16GB of memory is not supported])
else
AC_MSG_RESULT([yes])
fi
fi
# Debug information format for iOS. Running dsymutil takes a long time... you really need a separate
# .dSYM only if running Instruments, I think. (Not for normal debugging in Xcode.) To enable a
# separate .dSYM, either use --enable-release-build or change manually to "DWARF with DSYM" in Xcode.
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment