You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@nuttx.apache.org by "Jasinsky (via GitHub)" <gi...@apache.org> on 2024/09/09 18:23:55 UTC

[PR] build: fix memory manager compile options for CMake [nuttx]

Jasinsky opened a new pull request, #13347:
URL: https://github.com/apache/nuttx/pull/13347

   ## Summary
   
   This enables CMake based build for sim:ostest. Flags which are set by set_source_files_properties are not reflected in final build. Changing these to target_compile_options makes CMake build runnable.
   
   ## Impact
   
   CMake based build for sim:ostest now runs.
   
   ## Testing
   
   Local build and playing around sim:ostest
   
   


-- 
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


Re: [PR] build: fix memory manager compile options for CMake [nuttx]

Posted by "Jasinsky (via GitHub)" <gi...@apache.org>.
Jasinsky commented on PR #13347:
URL: https://github.com/apache/nuttx/pull/13347#issuecomment-2338802841

   FYI @acassis @xiaoxiang781216 


-- 
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


Re: [PR] build: fix memory manager compile options for CMake [nuttx]

Posted by "xiaoxiang781216 (via GitHub)" <gi...@apache.org>.
xiaoxiang781216 commented on code in PR #13347:
URL: https://github.com/apache/nuttx/pull/13347#discussion_r1751198618


##########
mm/kasan/CMakeLists.txt:
##########
@@ -19,7 +19,11 @@
 # ##############################################################################
 if(CONFIG_MM_KASAN)
   target_sources(mm PRIVATE kasan.c)
-  set_source_files_properties(kasan.c PROPERTIES COMPILE_FLAGS
-                                                 -fno-sanitize=kernel-address)
-  set_source_files_properties(kasan.c PROPERTIES COMPILE_FLAGS -fno-lto)
+
+  target_compile_options(mm PRIVATE -fno-sanitize=kernel-address)
+
+  if(NOT CONFIG_LTO_NONE)

Review Comment:
   ```suggestion
     if(CONFIG_LTO_NONE)
   ```



-- 
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


Re: [PR] build: fix memory manager compile options for CMake [nuttx]

Posted by "Jasinsky (via GitHub)" <gi...@apache.org>.
Jasinsky commented on PR #13347:
URL: https://github.com/apache/nuttx/pull/13347#issuecomment-2338811527

   #13302 will be closed by this issue.


-- 
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


Re: [PR] build: fix memory manager compile options for CMake [nuttx]

Posted by "xiaoxiang781216 (via GitHub)" <gi...@apache.org>.
xiaoxiang781216 merged PR #13347:
URL: https://github.com/apache/nuttx/pull/13347


-- 
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


Re: [PR] build: fix memory manager compile options for CMake [nuttx]

Posted by "Jasinsky (via GitHub)" <gi...@apache.org>.
Jasinsky commented on code in PR #13347:
URL: https://github.com/apache/nuttx/pull/13347#discussion_r1751277257


##########
mm/kasan/CMakeLists.txt:
##########
@@ -19,7 +19,11 @@
 # ##############################################################################
 if(CONFIG_MM_KASAN)
   target_sources(mm PRIVATE kasan.c)
-  set_source_files_properties(kasan.c PROPERTIES COMPILE_FLAGS
-                                                 -fno-sanitize=kernel-address)
-  set_source_files_properties(kasan.c PROPERTIES COMPILE_FLAGS -fno-lto)
+
+  target_compile_options(mm PRIVATE -fno-sanitize=kernel-address)
+
+  if(NOT CONFIG_LTO_NONE)

Review Comment:
   @xiaoxiang781216 - look at the original Make.defs
   https://github.com/apache/nuttx/blob/master/mm/kasan/Make.defs
   Are you sure?
   
   I think the goal is to disable LTO specifically for these files - if it was enabled globally in build.



-- 
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


Re: [PR] build: fix memory manager compile options for CMake [nuttx]

Posted by "Jasinsky (via GitHub)" <gi...@apache.org>.
Jasinsky commented on code in PR #13347:
URL: https://github.com/apache/nuttx/pull/13347#discussion_r1751278168


##########
mm/kasan/CMakeLists.txt:
##########
@@ -19,7 +19,11 @@
 # ##############################################################################
 if(CONFIG_MM_KASAN)
   target_sources(mm PRIVATE kasan.c)
-  set_source_files_properties(kasan.c PROPERTIES COMPILE_FLAGS
-                                                 -fno-sanitize=kernel-address)
-  set_source_files_properties(kasan.c PROPERTIES COMPILE_FLAGS -fno-lto)
+
+  target_compile_options(mm PRIVATE -fno-sanitize=kernel-address)
+
+  if(NOT CONFIG_LTO_NONE)

Review Comment:
   e.g. https://github.com/search?q=repo%3Aapache%2Fnuttx%20CONFIG_LTO_NONE&type=code



-- 
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


Re: [PR] build: fix memory manager compile options for CMake [nuttx]

Posted by "xiaoxiang781216 (via GitHub)" <gi...@apache.org>.
xiaoxiang781216 commented on code in PR #13347:
URL: https://github.com/apache/nuttx/pull/13347#discussion_r1751460455


##########
mm/kasan/CMakeLists.txt:
##########
@@ -19,7 +19,11 @@
 # ##############################################################################
 if(CONFIG_MM_KASAN)
   target_sources(mm PRIVATE kasan.c)
-  set_source_files_properties(kasan.c PROPERTIES COMPILE_FLAGS
-                                                 -fno-sanitize=kernel-address)
-  set_source_files_properties(kasan.c PROPERTIES COMPILE_FLAGS -fno-lto)
+
+  target_compile_options(mm PRIVATE -fno-sanitize=kernel-address)
+
+  if(NOT CONFIG_LTO_NONE)

Review Comment:
   yes, my mistake.



-- 
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