am 565b95fb: am ec8f9731: Merge "Show error message when resource limit too low for USE_GOMA=true"

* commit '565b95fbb8363652955ef3ecdd1bf122c3f0afbd':
  Show error message when resource limit too low for USE_GOMA=true
This commit is contained in:
Shinichiro Hamaji 2015-09-01 16:43:50 +00:00 committed by Android Git Automerger
commit fd69b5582e
1 changed files with 10 additions and 0 deletions

View File

@ -25,6 +25,16 @@ ifneq ($(USE_GOMA),)
$(error USE_GOMA=true works only with USE_NINJA=true)
endif
# Goma requires a lot of processes and file descriptors.
ifeq ($(shell echo $$(($$(ulimit -u) < 2500 || $$(ulimit -n) < 16000))),1)
$(warning Max user processes and/or open files are insufficient)
ifeq ($(shell uname),Darwin)
$(error See go/ma/how-to-use-goma/how-to-use-goma-for-android to relax the limit)
else
$(error Adjust the limit by ulimit -u and ulimit -n)
endif
endif
ifdef GOMA_DIR
goma_dir := $(GOMA_DIR)
else