Skip to content

Commit

Permalink
libc/cmake: don't fail if LLVM_VERSION_SUFFIX isn't defined (#126359)
Browse files Browse the repository at this point in the history
Closes: #126358

cc @samvangysegem

---------

Co-authored-by: Joseph Huber <[email protected]>
(cherry picked from commit c81139f)
  • Loading branch information
sylvestre authored and tstellar committed Feb 14, 2025
1 parent 79da30b commit 17dd52c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion libc/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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}
Expand Down

0 comments on commit 17dd52c

Please sign in to comment.