mkdir -p $(OUT_DIR); \
$(MCS) -debug $(TEST_CS) -out:$(TEST_EXE)
-check: all
+check: test-local
+
+AOT_SUPPORTED = $(shell $(MONO) --aot 2>&1 | grep -q "AOT compilation is not supported" && echo 0 || echo 1)
+
+test-local: all
$(BUILD_TEST_EXE)
@echo "Checking $(PROGRAM) without AOT"
$(CHECK_DIFF)
+ifeq ($(AOT_SUPPORTED), 1)
@echo "Checking $(PROGRAM) with AOT"
@MONO_DEBUG=gen-compact-seq-points $(MONO) --aot $(TEST_EXE) > /dev/null
$(CHECK_DIFF)
$(BUILD_TEST_EXE)
@MONO_DEBUG=gen-compact-seq-points $(MONO) --aot=gen-seq-points-file $(TEST_EXE) > /dev/null
$(CHECK_DIFF)
+endif