[libc-commits] [libc] [libc] Enable `-Wunused` and clean up found instances (PR #96949)
via libc-commits
libc-commits at lists.llvm.org
Thu Jun 27 11:44:36 PDT 2024
llvmbot wrote:
<!--LLVM PR SUMMARY COMMENT-->
@llvm/pr-subscribers-libc
Author: Rajveer Singh Bharadwaj (Rajveer100)
<details>
<summary>Changes</summary>
Resolves #<!-- -->96689
Updates `compile_options` in the `LLVMLibCObjectRules` CMake script.
---
Full diff: https://github.com/llvm/llvm-project/pull/96949.diff
1 Files Affected:
- (modified) libc/cmake/modules/LLVMLibCObjectRules.cmake (+5)
``````````diff
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)
``````````
</details>
https://github.com/llvm/llvm-project/pull/96949
More information about the libc-commits
mailing list