mirror of
https://github.com/apache/nuttx.git
synced 2026-05-31 23:40:19 +08:00
Added Kconfig option for ccache.
This commit is contained in:
committed by
Alan Carvalho de Assis
parent
24129e4ba7
commit
63d00a5fb1
@@ -1999,6 +1999,14 @@ config DEBUG_LINK_MAP
|
|||||||
and debugging magic section games, and for seeing which
|
and debugging magic section games, and for seeing which
|
||||||
pieces of code get eliminated with DEBUG_OPT_UNUSED_SECTIONS.
|
pieces of code get eliminated with DEBUG_OPT_UNUSED_SECTIONS.
|
||||||
|
|
||||||
|
config CCACHE
|
||||||
|
bool "Use ccache"
|
||||||
|
default n
|
||||||
|
---help---
|
||||||
|
If enabled, ccache will be used during the build.
|
||||||
|
Build artifacts will be cached to a local storage, considerably
|
||||||
|
reducing build times.
|
||||||
|
|
||||||
endmenu # Build Setup
|
endmenu # Build Setup
|
||||||
|
|
||||||
menu "System Type"
|
menu "System Type"
|
||||||
|
|||||||
+9
-3
@@ -53,6 +53,12 @@ MODULECC ?= $(CC)
|
|||||||
MODULELD ?= $(LD)
|
MODULELD ?= $(LD)
|
||||||
MODULESTRIP ?= $(STRIP)
|
MODULESTRIP ?= $(STRIP)
|
||||||
|
|
||||||
|
# ccache configuration.
|
||||||
|
|
||||||
|
ifeq ($(CONFIG_CCACHE),y)
|
||||||
|
CCACHE ?= ccache
|
||||||
|
endif
|
||||||
|
|
||||||
# Define HOSTCC on the make command line if it differs from these defaults
|
# Define HOSTCC on the make command line if it differs from these defaults
|
||||||
# Define HOSTCFLAGS with -g on the make command line to build debug versions
|
# Define HOSTCFLAGS with -g on the make command line to build debug versions
|
||||||
|
|
||||||
@@ -273,7 +279,7 @@ endef
|
|||||||
|
|
||||||
define COMPILE
|
define COMPILE
|
||||||
@echo "CC: $1"
|
@echo "CC: $1"
|
||||||
$(Q) $(CC) -c $(CFLAGS) $($(strip $1)_CFLAGS) $1 -o $2
|
$(Q) $(CCACHE) $(CC) -c $(CFLAGS) $($(strip $1)_CFLAGS) $1 -o $2
|
||||||
endef
|
endef
|
||||||
|
|
||||||
# COMPILEXX - Default macro to compile one C++ file
|
# COMPILEXX - Default macro to compile one C++ file
|
||||||
@@ -291,7 +297,7 @@ endef
|
|||||||
|
|
||||||
define COMPILEXX
|
define COMPILEXX
|
||||||
@echo "CXX: $1"
|
@echo "CXX: $1"
|
||||||
$(Q) $(CXX) -c $(CXXFLAGS) $($(strip $1)_CXXFLAGS) $1 -o $2
|
$(Q) $(CCACHE) $(CXX) -c $(CXXFLAGS) $($(strip $1)_CXXFLAGS) $1 -o $2
|
||||||
endef
|
endef
|
||||||
|
|
||||||
# COMPILERUST - Default macro to compile one Rust file
|
# COMPILERUST - Default macro to compile one Rust file
|
||||||
@@ -352,7 +358,7 @@ endef
|
|||||||
|
|
||||||
define ASSEMBLE
|
define ASSEMBLE
|
||||||
@echo "AS: $1"
|
@echo "AS: $1"
|
||||||
$(Q) $(CC) -c $(AFLAGS) $1 $($(strip $1)_AFLAGS) -o $2
|
$(Q) $(CCACHE) $(CC) -c $(AFLAGS) $1 $($(strip $1)_AFLAGS) -o $2
|
||||||
endef
|
endef
|
||||||
|
|
||||||
# INSTALL_LIB - Install a library $1 into target $2
|
# INSTALL_LIB - Install a library $1 into target $2
|
||||||
|
|||||||
Reference in New Issue
Block a user