[libc-commits] [libc] 97e3f62 - Revert "[libc] support fully OOT build (#101287)"
Joseph Huber via libc-commits
libc-commits at lists.llvm.org
Wed Nov 20 16:25:53 PST 2024
Author: Joseph Huber
Date: 2024-11-20T18:21:10-06:00
New Revision: 97e3f62fc5cecbda3cc0337aceb6ee3178f62934
URL: https://github.com/llvm/llvm-project/commit/97e3f62fc5cecbda3cc0337aceb6ee3178f62934
DIFF: https://github.com/llvm/llvm-project/commit/97e3f62fc5cecbda3cc0337aceb6ee3178f62934.diff
LOG: Revert "[libc] support fully OOT build (#101287)"
This reverts commit c0efcc08e67325dc813d9acb7cc3560fd444fc8f.
Added:
Modified:
libc/CMakeLists.txt
libc/newhdrgen/yaml_to_classes.py
Removed:
################################################################################
diff --git a/libc/CMakeLists.txt b/libc/CMakeLists.txt
index d416e1eb69e194..77b659b2ef2322 100644
--- a/libc/CMakeLists.txt
+++ b/libc/CMakeLists.txt
@@ -1,8 +1,6 @@
cmake_minimum_required(VERSION 3.20.0)
set(LLVM_SUBPROJECT_TITLE "libc")
-include(CheckCXXCompilerFlag)
-
# Include LLVM's cmake policies.
if(NOT DEFINED LLVM_COMMON_CMAKE_UTILS)
set(LLVM_COMMON_CMAKE_UTILS ${CMAKE_CURRENT_SOURCE_DIR}/../cmake)
@@ -55,19 +53,18 @@ set(LIBC_NAMESPACE ${default_namespace}
add_subdirectory(newhdrgen)
-if(NOT LIBC_USE_NEW_HEADER_GEN)
- if(LLVM_LIBC_FULL_BUILD OR LLVM_LIBC_GPU_BUILD)
- if(NOT LIBC_HDRGEN_EXE)
- # We need to set up hdrgen first since other targets depend on it.
- add_subdirectory(utils/LibcTableGenUtil)
- add_subdirectory(utils/HdrGen)
- # Calling add_tablegen sets variables like LIBC_TABLEGEN_EXE in
- # PARENT_SCOPE which get lost until saved in the cache.
- set(LIBC_TABLEGEN_EXE "${LIBC_TABLEGEN_EXE}" CACHE INTERNAL "")
- set(LIBC_TABLEGEN_TARGET "${LIBC_TABLEGEN_TARGET}" CACHE INTERNAL "")
- else()
- message(STATUS "Will use ${LIBC_HDRGEN_EXE} for libc header generation.")
- endif()
+
+if(LLVM_LIBC_FULL_BUILD OR LLVM_LIBC_GPU_BUILD)
+ if(NOT LIBC_HDRGEN_EXE)
+ # We need to set up hdrgen first since other targets depend on it.
+ add_subdirectory(utils/LibcTableGenUtil)
+ add_subdirectory(utils/HdrGen)
+ # Calling add_tablegen sets variables like LIBC_TABLEGEN_EXE in
+ # PARENT_SCOPE which get lost until saved in the cache.
+ set(LIBC_TABLEGEN_EXE "${LIBC_TABLEGEN_EXE}" CACHE INTERNAL "")
+ set(LIBC_TABLEGEN_TARGET "${LIBC_TABLEGEN_TARGET}" CACHE INTERNAL "")
+ else()
+ message(STATUS "Will use ${LIBC_HDRGEN_EXE} for libc header generation.")
endif()
endif()
# We will build the GPU utilities if we are not doing a runtimes build.
@@ -356,9 +353,7 @@ endif()
option(LLVM_LIBC_INCLUDE_SCUDO "Include the SCUDO standalone as the allocator for LLVM libc" OFF)
if(LLVM_LIBC_INCLUDE_SCUDO)
- if (LLVM_LIBC_COMPILER_RT_PATH)
- add_subdirectory(${LLVM_LIBC_COMPILER_RT_PATH} ${CMAKE_CURRENT_BINARY_DIR}/compiler-rt)
- elseif(NOT ("compiler-rt" IN_LIST LLVM_ENABLE_PROJECTS OR "compiler-rt" IN_LIST LLVM_ENABLE_RUNTIMES))
+ if (NOT ("compiler-rt" IN_LIST LLVM_ENABLE_PROJECTS OR "compiler-rt" IN_LIST LLVM_ENABLE_RUNTIMES))
message(FATAL_ERROR "SCUDO cannot be included without adding compiler-rt to LLVM_ENABLE_PROJECTS or LLVM_ENABLE_RUNTIMES")
endif()
endif()
diff --git a/libc/newhdrgen/yaml_to_classes.py b/libc/newhdrgen/yaml_to_classes.py
old mode 100755
new mode 100644
More information about the libc-commits
mailing list