Skip to content

[lldb][cmake] Use STATUS instead of explicit '--' in message logging #128196

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Feb 21, 2025

Conversation

foxtran
Copy link
Member

@foxtran foxtran commented Feb 21, 2025

Currently, configuring lldb with cmake with separated stdout and stderr gives some unnecessary output in stderr which happens since message statement is used without [mode] (See https://cmake.org/cmake/help/v3.31/command/message.html). This patch adds mode STATUS instead of explicit -- at the beginning of messages.

@llvmbot
Copy link
Member

llvmbot commented Feb 21, 2025

@llvm/pr-subscribers-lldb

Author: None (foxtran)

Changes

Currently, configuring lldb with cmake with separated stdout and stderr gives some unnecessary output in stderr which happens since message statement is used without [mode] (See https://cmake.org/cmake/help/v3.31/command/message.html). This patch adds mode STATUS instead of explicit -- at the beginning of messages.


Full diff: https://github.com/llvm/llvm-project/pull/128196.diff

1 Files Affected:

  • (modified) lldb/source/API/CMakeLists.txt (+4-4)
diff --git a/lldb/source/API/CMakeLists.txt b/lldb/source/API/CMakeLists.txt
index 147b30f3b0026..47b60ef0895a3 100644
--- a/lldb/source/API/CMakeLists.txt
+++ b/lldb/source/API/CMakeLists.txt
@@ -206,23 +206,23 @@ if (NOT CMAKE_SYSTEM_NAME MATCHES "Windows")
     # If we're not exporting all symbols, we'll want to explicitly set
     # the exported symbols here.  This prevents 'log enable --stack ...'
     # from working on some systems but limits the liblldb size.
-    MESSAGE("-- Symbols (liblldb): exporting all symbols from the lldb namespace")
+    MESSAGE(STATUS "Symbols (liblldb): exporting all symbols from the lldb namespace")
     add_llvm_symbol_exports(liblldb ${CMAKE_CURRENT_SOURCE_DIR}/liblldb.exports)
   elseif (NOT LLDB_EXPORT_ALL_SYMBOLS_EXPORTS_FILE)
     # Don't use an explicit export. Instead, tell the linker to export all symbols.
-    MESSAGE("-- Symbols (liblldb): exporting all symbols from the lldb and lldb_private namespaces")
+    MESSAGE(STATUS "Symbols (liblldb): exporting all symbols from the lldb and lldb_private namespaces")
     MESSAGE(WARNING "Private LLDB symbols frequently change and no API stability is guaranteed. "
                     "Only the SB API is guaranteed to be stable.")
     add_llvm_symbol_exports(liblldb ${CMAKE_CURRENT_SOURCE_DIR}/liblldb-private.exports)
   else ()
-    MESSAGE("-- Symbols (liblldb): exporting all symbols specified in the exports "
+    MESSAGE(STATUS "Symbols (liblldb): exporting all symbols specified in the exports "
             " file '${LLDB_EXPORT_ALL_SYMBOLS_EXPORTS_FILE}'")
     MESSAGE(WARNING "Private LLDB symbols frequently change and no API stability is guaranteed. "
                     "Only the SB API is guaranteed to be stable.")
     add_llvm_symbol_exports(liblldb "${LLDB_EXPORT_ALL_SYMBOLS_EXPORTS_FILE}")
   endif()
 elseif (LLDB_EXPORT_ALL_SYMBOLS)
-  MESSAGE("-- Symbols (liblldb): exporting all symbols from the lldb and lldb_private namespaces")
+  MESSAGE(STATUS "Symbols (liblldb): exporting all symbols from the lldb and lldb_private namespaces")
 
   # Pull out the various lldb libraries linked into liblldb, these will be used
   # when looking for symbols to extract. We ignore most plugin libraries here,

Copy link
Member

@JDevlieghere JDevlieghere left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM. Would you mind making the MESSAGE lowercase in this file? I think this is the only place where we use MESSAGE instead of message and it just looks weird. Can be the same or a different PR.

@foxtran
Copy link
Member Author

foxtran commented Feb 21, 2025

@JDevlieghere, I've updated messages :)

@JDevlieghere
Copy link
Member

@JDevlieghere, I've updated messages :)

Lightning fast! Thanks!

@JDevlieghere JDevlieghere merged commit 7c1f679 into llvm:main Feb 21, 2025
10 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants