[clang] [llvm] [libc] remove references to LIBC_HDRGEN_ONLY (PR #118670)
Nick Desaulniers via cfe-commits
cfe-commits at lists.llvm.org
Wed Dec 4 09:46:32 PST 2024
https://github.com/nickdesaulniers updated https://github.com/llvm/llvm-project/pull/118670
>From ebb64d56b04182104f90783b86cf30e74ab00c3c Mon Sep 17 00:00:00 2001
From: Nick Desaulniers <ndesaulniers at google.com>
Date: Wed, 4 Dec 2024 09:20:01 -0800
Subject: [PATCH 1/2] [libc] remove references to LIBC_HDRGEN_ONLY
Further cleanups from old hdrgen removal. I didn't realize there were cmake
variables related to old hdrgen spread out throughout more of the source tree.
Link: #117220
Link: #117208
---
clang/cmake/caches/Fuchsia-stage2.cmake | 1 -
clang/cmake/caches/Fuchsia.cmake | 1 -
llvm/cmake/modules/CrossCompile.cmake | 4 ++--
3 files changed, 2 insertions(+), 4 deletions(-)
diff --git a/clang/cmake/caches/Fuchsia-stage2.cmake b/clang/cmake/caches/Fuchsia-stage2.cmake
index 304e7833699a78..f6463d92cdd035 100644
--- a/clang/cmake/caches/Fuchsia-stage2.cmake
+++ b/clang/cmake/caches/Fuchsia-stage2.cmake
@@ -26,7 +26,6 @@ set(LLVM_FORCE_BUILD_RUNTIME ON CACHE BOOL "")
set(LLVM_INCLUDE_DOCS OFF CACHE BOOL "")
set(LLVM_INCLUDE_EXAMPLES OFF CACHE BOOL "")
set(LLVM_LIBC_FULL_BUILD ON CACHE BOOL "")
-set(LIBC_HDRGEN_ONLY ON CACHE BOOL "")
set(LLVM_STATIC_LINK_CXX_STDLIB ON CACHE BOOL "")
set(LLVM_USE_RELATIVE_PATHS_IN_FILES ON CACHE BOOL "")
set(LLDB_ENABLE_CURSES OFF CACHE BOOL "")
diff --git a/clang/cmake/caches/Fuchsia.cmake b/clang/cmake/caches/Fuchsia.cmake
index 2d2dcb9ae6798d..3118b5369298f4 100644
--- a/clang/cmake/caches/Fuchsia.cmake
+++ b/clang/cmake/caches/Fuchsia.cmake
@@ -17,7 +17,6 @@ set(LLVM_ENABLE_Z3_SOLVER OFF CACHE BOOL "")
set(LLVM_ENABLE_ZLIB OFF CACHE BOOL "")
set(LLVM_INCLUDE_DOCS OFF CACHE BOOL "")
set(LLVM_INCLUDE_EXAMPLES OFF CACHE BOOL "")
-set(LIBC_HDRGEN_ONLY ON CACHE BOOL "")
set(LLVM_USE_RELATIVE_PATHS_IN_FILES ON CACHE BOOL "")
set(LLDB_ENABLE_CURSES OFF CACHE BOOL "")
set(LLDB_ENABLE_LIBEDIT OFF CACHE BOOL "")
diff --git a/llvm/cmake/modules/CrossCompile.cmake b/llvm/cmake/modules/CrossCompile.cmake
index c22d185349dcc5..b0d36d8dbf4eb0 100644
--- a/llvm/cmake/modules/CrossCompile.cmake
+++ b/llvm/cmake/modules/CrossCompile.cmake
@@ -69,8 +69,8 @@ function(llvm_create_cross_target project_name target_name toolchain buildtype)
"-DLLVM_EXTERNAL_${name}_SOURCE_DIR=${LLVM_EXTERNAL_${name}_SOURCE_DIR}")
endforeach()
- if("libc" IN_LIST LLVM_ENABLE_PROJECTS AND NOT LIBC_HDRGEN_EXE)
- set(libc_flags -DLLVM_LIBC_FULL_BUILD=ON -DLIBC_HDRGEN_ONLY=ON)
+ if("libc" IN_LIST LLVM_ENABLE_PROJECTS)
+ set(libc_flags -DLLVM_LIBC_FULL_BUILD=ON)
if(MSVC)
# Due to some issues mentioned in llvm/projects/CMakeLists.txt, libc build is disabled by
# default in the cross target when building with MSVC compatible compilers on Windows. Add
>From ba6005980c078bea3dad800deb40a5968c1dd7a2 Mon Sep 17 00:00:00 2001
From: Nick Desaulniers <ndesaulniers at google.com>
Date: Wed, 4 Dec 2024 09:46:17 -0800
Subject: [PATCH 2/2] remove block from b348126
---
llvm/cmake/modules/CrossCompile.cmake | 11 +----------
1 file changed, 1 insertion(+), 10 deletions(-)
diff --git a/llvm/cmake/modules/CrossCompile.cmake b/llvm/cmake/modules/CrossCompile.cmake
index b0d36d8dbf4eb0..c2cc84bec15217 100644
--- a/llvm/cmake/modules/CrossCompile.cmake
+++ b/llvm/cmake/modules/CrossCompile.cmake
@@ -69,17 +69,8 @@ function(llvm_create_cross_target project_name target_name toolchain buildtype)
"-DLLVM_EXTERNAL_${name}_SOURCE_DIR=${LLVM_EXTERNAL_${name}_SOURCE_DIR}")
endforeach()
- if("libc" IN_LIST LLVM_ENABLE_PROJECTS)
- set(libc_flags -DLLVM_LIBC_FULL_BUILD=ON)
- if(MSVC)
- # Due to some issues mentioned in llvm/projects/CMakeLists.txt, libc build is disabled by
- # default in the cross target when building with MSVC compatible compilers on Windows. Add
- # LLVM_FORCE_BUILD_RUNTIME to bypass this issue and force its building on Windows.
- list(APPEND libc_flags -DLLVM_FORCE_BUILD_RUNTIME=ON)
- endif()
- endif()
if(LLVM_LIBC_GPU_BUILD)
- list(APPEND libc_flags -DLLVM_LIBC_GPU_BUILD=ON)
+ set(libc_flags -DLLVM_LIBC_GPU_BUILD=ON)
endif()
add_custom_command(OUTPUT ${${project_name}_${target_name}_BUILD}/CMakeCache.txt
More information about the cfe-commits
mailing list