[libc-commits] [libc] [libc] Remove unused build flag (PR #92026)
Robin Caloudis via libc-commits
libc-commits at lists.llvm.org
Mon May 13 13:32:30 PDT 2024
https://github.com/robincaloudis created https://github.com/llvm/llvm-project/pull/92026
None
>From 66f4ea96da9f8479da243a0fbbb4aeb08b0cd04f Mon Sep 17 00:00:00 2001
From: Robin Caloudis <robin.caloudis at gmx.de>
Date: Mon, 13 May 2024 22:31:23 +0200
Subject: [PATCH] [libc] Remove unused build flag
---
.../modules/LLVMLibCCompileOptionRules.cmake | 6 ------
libc/src/errno/CMakeLists.txt | 15 +--------------
2 files changed, 1 insertion(+), 20 deletions(-)
diff --git a/libc/cmake/modules/LLVMLibCCompileOptionRules.cmake b/libc/cmake/modules/LLVMLibCCompileOptionRules.cmake
index 5b3a10d55fed3..cd7bb35c4c4a1 100644
--- a/libc/cmake/modules/LLVMLibCCompileOptionRules.cmake
+++ b/libc/cmake/modules/LLVMLibCCompileOptionRules.cmake
@@ -43,7 +43,6 @@ function(_get_common_compile_options output_var flags)
list(APPEND compile_options "-fpie")
if(LLVM_LIBC_FULL_BUILD)
- list(APPEND compile_options "-DLIBC_FULL_BUILD")
# Only add -ffreestanding flag in full build mode.
list(APPEND compile_options "-ffreestanding")
endif()
@@ -127,7 +126,6 @@ function(_get_common_test_compile_options output_var c_test flags)
list(APPEND compile_options "-fpie")
if(LLVM_LIBC_FULL_BUILD)
- list(APPEND compile_options "-DLIBC_FULL_BUILD")
# Only add -ffreestanding flag in full build mode.
list(APPEND compile_options "-ffreestanding")
list(APPEND compile_options "-fno-exceptions")
@@ -181,9 +179,5 @@ function(_get_hermetic_test_compile_options output_var flags)
-nogpulib -march=${LIBC_GPU_TARGET_ARCHITECTURE} -fno-use-cxa-atexit)
endif()
- if(LLVM_LIBC_FULL_BUILD)
- list(APPEND compile_options "-DLIBC_FULL_BUILD")
- endif()
-
set(${output_var} ${compile_options} PARENT_SCOPE)
endfunction()
diff --git a/libc/src/errno/CMakeLists.txt b/libc/src/errno/CMakeLists.txt
index d9b8d9957c170..70a7c107acbf2 100644
--- a/libc/src/errno/CMakeLists.txt
+++ b/libc/src/errno/CMakeLists.txt
@@ -1,22 +1,9 @@
-# If we are in full build mode, we will provide the errno definition ourselves,
-# and if we are in overlay mode, we will just re-use the system's errno.
-# We are passing LIBC_FULL_BUILD flag in full build mode so that the
-# implementation of libc_errno will know if we are in full build mode or not.
-
-# TODO: Move LIBC_FULL_BUILD flag to _get_common_compile_options.
-set(full_build_flag "")
-if(LLVM_LIBC_FULL_BUILD)
- set(full_build_flag "-DLIBC_FULL_BUILD")
-endif()
-
add_entrypoint_object(
errno
SRCS
libc_errno.cpp
HDRS
- libc_errno.h # Include this
- COMPILE_OPTIONS
- ${full_build_flag}
+ libc_errno.h
DEPENDS
libc.include.errno
libc.src.__support.common
More information about the libc-commits
mailing list