File tree Expand file tree Collapse file tree 1 file changed +11
-0
lines changed
Expand file tree Collapse file tree 1 file changed +11
-0
lines changed Original file line number Diff line number Diff line change @@ -58,6 +58,15 @@ export TARGET_NATIVE_SYSTEMS = $(shell uname -s | tr '[:upper:]' '[:lower:]')
5858 VALGRIND_FREYA := OFF
5959 endif
6060
61+ # Indicate when Valgrind or Valgrind_Freya option is enabled.
62+ VALGRIND_IS_ENABLED ?= OFF
63+
64+ ifneq ($(VALGRIND)$(VALGRIND_FREYA), OFFOFF)
65+ VALGRIND_IS_ENABLED := ON
66+ else
67+ VALGRIND_IS_ENABLED := OFF
68+ endif
69+
6170 # Static checkers
6271 STATIC_CHECK ?= OFF
6372
@@ -213,13 +222,15 @@ $(BUILD_DIRS_NATIVE):
213222
214223.PHONY : $(BUILD_DIRS_STM32F3 )
215224$(BUILD_DIRS_STM32F3 ) : prerequisites
225+ $(Q ) [ " $( VALGRIND_IS_ENABLED) " = " OFF" ] || (echo " Build failed. This target doesn't support build with Valgrind." ; exit 1; )
216226 $(Q ) mkdir -p $@
217227 $(Q ) cd $@ && \
218228 (cmake -DENABLE_VALGRIND=$(VALGRIND) -DENABLE_VALGRIND_FREYA=$(VALGRIND_FREYA) -DENABLE_LTO=$(LTO) -DENABLE_ALL_IN_ONE=$(ALL_IN_ONE) -DCMAKE_TOOLCHAIN_FILE=build/configs/toolchain_mcu_stm32f3.cmake ../../.. 2>&1 | tee cmake.log $(QLOG) ; ( exit $${PIPESTATUS[0]} ) ) || \
219229 (echo "CMake run failed. See "`pwd`"/cmake.log for details."; exit 1;)
220230
221231.PHONY : $(BUILD_DIRS_STM32F4 )
222232$(BUILD_DIRS_STM32F4 ) : prerequisites
233+ $(Q ) [ " $( VALGRIND_IS_ENABLED) " = " OFF" ] || (echo " Build failed. This target doesn't support build with Valgrind." ; exit 1; )
223234 $(Q ) mkdir -p $@
224235 $(Q ) cd $@ && \
225236 (cmake -DENABLE_VALGRIND=$(VALGRIND) -DENABLE_VALGRIND_FREYA=$(VALGRIND_FREYA) -DENABLE_LTO=$(LTO) -DENABLE_ALL_IN_ONE=$(ALL_IN_ONE) -DCMAKE_TOOLCHAIN_FILE=build/configs/toolchain_mcu_stm32f4.cmake ../../.. 2>&1 | tee cmake.log $(QLOG) ; ( exit $${PIPESTATUS[0]} ) ) || \
You can’t perform that action at this time.
0 commit comments