about summary refs log tree commit diff homepage
path: root/runtime
diff options
context:
space:
mode:
Diffstat (limited to 'runtime')
-rw-r--r--runtime/Makefile.cmake.bitcode.rules6
1 files changed, 6 insertions, 0 deletions
diff --git a/runtime/Makefile.cmake.bitcode.rules b/runtime/Makefile.cmake.bitcode.rules
index 472c979b..6ad23aed 100644
--- a/runtime/Makefile.cmake.bitcode.rules
+++ b/runtime/Makefile.cmake.bitcode.rules
@@ -82,6 +82,12 @@ endif
 LOCAL_BUILD_DIR := $(abspath $(ROOT_OBJ)/$(DIR_SUFFIX))
 
 C_SRCS := $(sort $(shell echo $(SRC_DIR)/*.c))
+
+# Sanity check: Make sure at least one source file was found
+ifneq ($(strip $(filter %*.c,$(C_SRCS))),)
+$(error Failed to find C source files in $(SRC_DIR))
+endif
+
 C_SRCS_NO_DIR := $(notdir $(C_SRCS))
 BC_FILES_NO_DIR := $(C_SRCS_NO_DIR:.c=.bc)
 BC_FILES := $(addprefix $(LOCAL_BUILD_DIR)/,$(BC_FILES_NO_DIR))