You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@nuttx.apache.org by GitBox <gi...@apache.org> on 2022/09/13 06:50:59 UTC

[GitHub] [incubator-nuttx] xiaoxiang781216 commented on a diff in pull request #7076: Remove duplicate calls and optimize compilation speed

xiaoxiang781216 commented on code in PR #7076:
URL: https://github.com/apache/incubator-nuttx/pull/7076#discussion_r969216410


##########
tools/Config.mk:
##########
@@ -555,26 +555,34 @@ endef
 
 # ARCHxxx means the predefined setting(either toolchain, arch, or system specific)
 
-ARCHDEFINES += ${shell $(DEFINE) "$(CC)" __NuttX__}
+ifndef DEFINE_PREFIX
+export DEFINE_PREFIX:= $(subst __DEF__,,${shell $(DEFINE) "$(CC)" "__DEF__"})

Review Comment:
   let's modify DEFINE/INCDIR directly and replace all places?



##########
tools/Config.mk:
##########
@@ -555,26 +555,34 @@ endef
 
 # ARCHxxx means the predefined setting(either toolchain, arch, or system specific)
 
-ARCHDEFINES += ${shell $(DEFINE) "$(CC)" __NuttX__}
+ifndef DEFINE_PREFIX
+export DEFINE_PREFIX:= $(subst __DEF__,,${shell $(DEFINE) "$(CC)" "__DEF__"})
+endif
+
+ARCHDEFINES += ${DEFINE_PREFIX}__NuttX__
 ifeq ($(CONFIG_NDEBUG),y)
-  ARCHDEFINES += ${shell $(DEFINE) "$(CC)" NDEBUG}
+  ARCHDEFINES += ${DEFINE_PREFIX}NDEBUG
 endif
 
 # The default C/C++ search path
 
-ARCHINCLUDES += ${shell $(INCDIR) -s "$(CC)" $(TOPDIR)$(DELIM)include}
+ifndef INCDIR_SYSTEM
+export INCDIR_SYSTEM = ${shell $(INCDIR) -s "$(CC)" $(TOPDIR)$(DELIM)include}
+endif
+
+ARCHINCLUDES += ${INCDIR_SYSTEM}
 
 ifeq ($(CONFIG_LIBCXX),y)
-  ARCHXXINCLUDES += ${shell $(INCDIR) -s "$(CC)" $(TOPDIR)$(DELIM)include$(DELIM)libcxx}
+  ARCHXXINCLUDES += ${INCDIR_SYSTEM}$(DELIM)libcxx

Review Comment:
   let's replace all places which use `${INCDIR}` and `${DEFINE}`



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@nuttx.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org