[libc-commits] [libc] [libc] Fix standalone cross compiling build for the GPU (PR #84042)
Nick Desaulniers via libc-commits
libc-commits at lists.llvm.org
Tue Mar 5 10:24:49 PST 2024
================
@@ -39,7 +39,11 @@ set(LIBC_BUILD_DIR ${CMAKE_CURRENT_BINARY_DIR})
set(LIBC_ENABLE_USE_BY_CLANG OFF CACHE BOOL "Whether or not to place libc in a build directory findable by a just built clang")
# Defining a global namespace to enclose all libc functions.
-set(LIBC_NAMESPACE "__llvm_libc_${LLVM_VERSION_MAJOR}_${LLVM_VERSION_MINOR}_${LLVM_VERSION_PATCH}_${LLVM_VERSION_SUFFIX}"
+set(default_namespace "__llvm_libc")
----------------
nickdesaulniers wrote:
I wonder if building via the runtimes directory SHOULD set `LLVM_VERSION_MAJOR`? Otherwise libcxx, compiler-rt, and now llvmlibc wont be able to key off this value.
The non `LIBC_NAMESPACE` changes LGTM, if you want to split this PR in two, I'd accept the second half. For the first, I suspect we may want to fix the runtimes CMake itself.
https://github.com/llvm/llvm-project/pull/84042
More information about the libc-commits
mailing list