Skip to content

release/20.x: fix: removes invalid token from LLVM_VERSION_SUFFIX in LIBC namespace (#126193) #126284

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 1 commit into from
Feb 7, 2025

Conversation

llvmbot
Copy link
Member

@llvmbot llvmbot commented Feb 7, 2025

Backport 51759ff

Requested by: @jhuber6

@llvmbot llvmbot added this to the LLVM 20.X Release milestone Feb 7, 2025
@llvmbot
Copy link
Member Author

llvmbot commented Feb 7, 2025

@nickdesaulniers What do you think about merging this PR to the release branch?

@llvmbot
Copy link
Member Author

llvmbot commented Feb 7, 2025

@llvm/pr-subscribers-libc

Author: None (llvmbot)

Changes

Backport 51759ff

Requested by: @jhuber6


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

1 Files Affected:

  • (modified) libc/CMakeLists.txt (+2-1)
diff --git a/libc/CMakeLists.txt b/libc/CMakeLists.txt
index c061e2a05ebd8f5..1c4c0cd5aa22ba7 100644
--- a/libc/CMakeLists.txt
+++ b/libc/CMakeLists.txt
@@ -51,7 +51,8 @@ set(LIBC_KERNEL_HEADERS "/usr/include" CACHE STRING "Path to Linux kernel header
 # Defining a global namespace to enclose all libc functions.
 set(default_namespace "__llvm_libc")
 if(LLVM_VERSION_MAJOR)
-  set(default_namespace "__llvm_libc_${LLVM_VERSION_MAJOR}_${LLVM_VERSION_MINOR}_${LLVM_VERSION_PATCH}_${LLVM_VERSION_SUFFIX}")
+  string(REPLACE "-" "" NS_LLVM_VERSION_SUFFIX ${LLVM_VERSION_SUFFIX})
+  set(default_namespace "__llvm_libc_${LLVM_VERSION_MAJOR}_${LLVM_VERSION_MINOR}_${LLVM_VERSION_PATCH}_${NS_LLVM_VERSION_SUFFIX}")
 endif()
 set(LIBC_NAMESPACE ${default_namespace}
   CACHE STRING "The namespace to use to enclose internal implementations. Must start with '__llvm_libc'."

Copy link

github-actions bot commented Feb 7, 2025

⚠️ We detected that you are using a GitHub private e-mail address to contribute to the repo.
Please turn off Keep my email addresses private setting in your account.
See LLVM Discourse for more information.

@tstellar tstellar merged commit 3a3a323 into llvm:release/20.x Feb 7, 2025
10 of 11 checks passed
Copy link

github-actions bot commented Feb 7, 2025

@jhuber6 (or anyone else). If you would like to add a note about this fix in the release notes (completely optional). Please reply to this comment with a one or two sentence description of the fix. When you are done, please add the release:note label to this PR.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
Development

Successfully merging this pull request may close these issues.

4 participants