re-enable compile time option checking and make it conditional
When building a sinle application, use the compiler option checking macro, disable macro if running sanity checks to speed up build time. Change-Id: I63b17f4bd9fdff9030f1b2550ec8b05ee0bc2df2 Signed-off-by: Anas Nashif <anas.nashif@intel.com>
This commit is contained in:
parent
2ce8d30892
commit
6f8d628d77
2 changed files with 12 additions and 9 deletions
|
@ -86,17 +86,19 @@ TMPOUT := $(if $(KBUILD_EXTMOD),$(firstword $(KBUILD_EXTMOD))/)
|
|||
# Usage: option = $(call try-run, $(CC)...-o "$$TMP",option-ok,otherwise)
|
||||
# Exit code chooses option. "$$TMP" is can be used as temporary file and
|
||||
# is automatically cleaned up.
|
||||
# try-run = $(shell set -e; \
|
||||
# TMP="$(TMPOUT).$$$$.tmp"; \
|
||||
# TMPO="$(TMPOUT).$$$$.o"; \
|
||||
# if ($(1)) >/dev/null 2>&1; \
|
||||
# then echo "$(2)"; \
|
||||
# else echo "$(3)"; \
|
||||
# fi; \
|
||||
# rm -f "$$TMP" "$$TMPO")
|
||||
ifndef DISABLE_TRYRUN
|
||||
try-run = $(shell set -e; \
|
||||
TMP="$(TMPOUT).$$$$.tmp"; \
|
||||
TMPO="$(TMPOUT).$$$$.o"; \
|
||||
if ($(1)) >/dev/null 2>&1; \
|
||||
then echo "$(2)"; \
|
||||
else echo "$(3)"; \
|
||||
fi; \
|
||||
rm -f "$$TMP" "$$TMPO")
|
||||
else
|
||||
try-run = $(shell set -e; \
|
||||
echo "$(2)";)
|
||||
|
||||
endif
|
||||
|
||||
# as-option
|
||||
# Usage: cflags-y += $(call as-option,-Wa$(comma)-isa=foo,)
|
||||
|
|
|
@ -100,6 +100,7 @@ import time
|
|||
import csv
|
||||
import glob
|
||||
|
||||
os.environ["DISABLE_TRYRUN"] = "1"
|
||||
if "ZEPHYR_BASE" not in os.environ:
|
||||
sys.stderr.write("$ZEPHYR_BASE environment variable undefined.\n")
|
||||
exit(1)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue