[libc-commits] [libc] [libc] Enable `-Wunused` and clean up found instances (PR #96949)
Rajveer Singh Bharadwaj via libc-commits
libc-commits at lists.llvm.org
Thu Jun 27 11:44:01 PDT 2024
https://github.com/Rajveer100 created https://github.com/llvm/llvm-project/pull/96949
Resolves #96689
Updates `compile_options` in the `LLVMLibCObjectRules` CMake script.
>From 699ac5b1eee977fc8bdd8e34c88492dc38968550 Mon Sep 17 00:00:00 2001
From: Rajveer <rajveer.developer at icloud.com>
Date: Thu, 27 Jun 2024 00:14:31 +0530
Subject: [PATCH] [libc] Enable `-Wunused` and clean up found instances
Resolves #96689
Updates `compile_options` in the `LLVMLibCObjectRules` CMake script.
---
libc/cmake/modules/LLVMLibCObjectRules.cmake | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/libc/cmake/modules/LLVMLibCObjectRules.cmake b/libc/cmake/modules/LLVMLibCObjectRules.cmake
index 134c5143d6d61..c53548a1294e4 100644
--- a/libc/cmake/modules/LLVMLibCObjectRules.cmake
+++ b/libc/cmake/modules/LLVMLibCObjectRules.cmake
@@ -50,6 +50,8 @@ function(create_object_library fq_target_name)
_get_common_compile_options(compile_options "${ADD_OBJECT_FLAGS}")
list(APPEND compile_options ${ADD_OBJECT_COMPILE_OPTIONS})
+ list(APPEND compile_options -Wunused)
+
add_library(
${fq_target_name}
EXCLUDE_FROM_ALL
@@ -251,6 +253,9 @@ function(create_entrypoint_object fq_target_name)
endif()
_get_common_compile_options(common_compile_options "${ADD_ENTRYPOINT_OBJ_FLAGS}")
+
+ list(APPEND common_compile_options -Wunused)
+
list(APPEND common_compile_options ${ADD_ENTRYPOINT_OBJ_COMPILE_OPTIONS})
get_fq_deps_list(fq_deps_list ${ADD_ENTRYPOINT_OBJ_DEPENDS})
set(full_deps_list ${fq_deps_list} libc.src.__support.common)
More information about the libc-commits
mailing list