xiaoxiang781216 commented on code in PR #14327:
URL: https://github.com/apache/nuttx/pull/14327#discussion_r1820998961


##########
libs/libbuiltin/compiler-rt/InstrProfilingPlatformNX.c:
##########
@@ -0,0 +1,129 @@
+/****************************************************************************
+ * libs/libbuiltin/compiler-rt/InstrProfilingPlatformNX.c

Review Comment:
   InstrProfilingPlatform.c



##########
boards/arm/mps/mps3-an547/configs/clang/defconfig:
##########
@@ -43,16 +44,18 @@ CONFIG_FS_PROCFS=y
 CONFIG_FS_ROMFS=y
 CONFIG_FS_TMPFS=y
 CONFIG_HAVE_CXX=y
-CONFIG_HAVE_CXXINITIALIZE=y

Review Comment:
   why remove



##########
libs/libbuiltin/compiler-rt/CMakeLists.txt:
##########
@@ -406,6 +406,47 @@ if(CONFIG_BUILTIN_COMPILER_RT)
     list(APPEND RT_BUILTIN_SRCS floatundidf.c floatundisf.c floatundixf.c)
   endif()
 
+  if(CONFIG_COMPILER_RT_PROFILE)
+
+    target_include_directories(
+      compiler-rt PRIVATE ${CMAKE_CURRENT_LIST_DIR}/compiler-rt/lib/profile)
+
+    target_compile_options(
+      compiler-rt
+      PRIVATE -Wno-strict-prototypes
+              -Wno-shadow
+              -Wno-cleardeprecated-pragma
+              -Wno-deprecated-pragma
+              -Wno-undef
+              -Wno-incompatible-pointer-types
+              -Wno-unknown-warning-option
+              -Wno-deprecated-pragma

Review Comment:
   remove and sort



##########
libs/libbuiltin/compiler-rt/Make.defs:
##########
@@ -149,6 +149,31 @@ else
   CSRCS += floatundidf.c floatundisf.c floatundixf.c
 endif
 
+ifeq ($(CONFIG_COMPILER_RT_PROFILE),y)
+
+FLAGS += ${INCDIR_PREFIX}$(CURDIR)/compiler-rt/compiler-rt/lib/profile
+FLAGS += -Wno-strict-prototypes -Wno-shadow -Wno-cleardeprecated-pragma
+FLAGS += -Wno-deprecated-pragma -Wno-undef -Wno-incompatible-pointer-types
+FLAGS += -Wno-unknown-warning-option -Wno-deprecated-pragma

Review Comment:
   sort and remove the dup item(e.g. -Wno-deprecated-pragma)



##########
boards/arm/mps/mps3-an547/configs/clang/defconfig:
##########
@@ -43,16 +44,18 @@ CONFIG_FS_PROCFS=y
 CONFIG_FS_ROMFS=y
 CONFIG_FS_TMPFS=y
 CONFIG_HAVE_CXX=y
-CONFIG_HAVE_CXXINITIALIZE=y
 CONFIG_IDLETHREAD_STACKSIZE=4096
 CONFIG_INIT_ENTRYPOINT="nsh_main"
 CONFIG_INTELHEX_BINARY=y
+CONFIG_LIBC_GCOV=y

Review Comment:
   why enable both



##########
libs/libbuiltin/compiler-rt/Make.defs:
##########
@@ -149,6 +149,31 @@ else
   CSRCS += floatundidf.c floatundisf.c floatundixf.c
 endif
 
+ifeq ($(CONFIG_COMPILER_RT_PROFILE),y)
+
+FLAGS += ${INCDIR_PREFIX}$(CURDIR)/compiler-rt/compiler-rt/lib/profile
+FLAGS += -Wno-strict-prototypes -Wno-shadow -Wno-cleardeprecated-pragma
+FLAGS += -Wno-deprecated-pragma -Wno-undef -Wno-incompatible-pointer-types
+FLAGS += -Wno-unknown-warning-option -Wno-deprecated-pragma
+FLAGS += -DCOMPILER_RT_HAS_UNAME
+
+# No code coverage analysis of the library is required
+FLAGS += -fno-profile-generate
+
+# profile support
+CSRCS += GCDAProfiling.c InstrProfilingBuffer.c InstrProfiling.c 
InstrProfilingFile.c InstrProfilingInternal.c

Review Comment:
   sort too 



##########
libs/libbuiltin/compiler-rt/CMakeLists.txt:
##########
@@ -406,6 +406,47 @@ if(CONFIG_BUILTIN_COMPILER_RT)
     list(APPEND RT_BUILTIN_SRCS floatundidf.c floatundisf.c floatundixf.c)
   endif()
 
+  if(CONFIG_COMPILER_RT_PROFILE)
+
+    target_include_directories(
+      compiler-rt PRIVATE ${CMAKE_CURRENT_LIST_DIR}/compiler-rt/lib/profile)
+
+    target_compile_options(
+      compiler-rt
+      PRIVATE -Wno-strict-prototypes
+              -Wno-shadow
+              -Wno-cleardeprecated-pragma
+              -Wno-deprecated-pragma
+              -Wno-undef
+              -Wno-incompatible-pointer-types
+              -Wno-unknown-warning-option
+              -Wno-deprecated-pragma
+              -DCOMPILER_RT_HAS_UNAME)
+
+    set(RT_PROFILE_SRCS
+        GCDAProfiling.c
+        InstrProfilingBuffer.c

Review Comment:
   sort too



-- 
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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to