Skip to content
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

release/20.x: libc/cmake: don't fail if LLVM_VERSION_SUFFIX isn't defined (#126359) #127099

Merged
merged 1 commit into from
Feb 14, 2025

Conversation

llvmbot
Copy link
Member

@llvmbot llvmbot commented Feb 13, 2025

Backport c81139f

Requested by: @jhuber6

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

llvmbot commented Feb 13, 2025

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

@llvmbot
Copy link
Member Author

llvmbot commented Feb 13, 2025

@llvm/pr-subscribers-libc

Author: None (llvmbot)

Changes

Backport c81139f

Requested by: @jhuber6


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

1 Files Affected:

  • (modified) libc/CMakeLists.txt (+1-1)
diff --git a/libc/CMakeLists.txt b/libc/CMakeLists.txt
index 1c4c0cd5aa22b..47708c2267818 100644
--- a/libc/CMakeLists.txt
+++ b/libc/CMakeLists.txt
@@ -51,7 +51,7 @@ 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)
-  string(REPLACE "-" "" NS_LLVM_VERSION_SUFFIX ${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}

)

Closes: llvm#126358

cc @samvangysegem

---------

Co-authored-by: Joseph Huber <[email protected]>
(cherry picked from commit c81139f)
@tstellar tstellar merged commit 17dd52c into llvm:release/20.x Feb 14, 2025
6 of 9 checks passed
Copy link

@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