[libc-commits] [PATCH] D80178: [libc] Fix accidental inclusion of system libc headers.
Paula Toth via Phabricator via libc-commits
libc-commits at lists.llvm.org
Mon May 18 22:45:11 PDT 2020
PaulkaToast updated this revision to Diff 264794.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D80178/new/
https://reviews.llvm.org/D80178
Files:
libc/cmake/modules/LLVMLibCObjectRules.cmake
libc/src/.clang-tidy
Index: libc/src/.clang-tidy
===================================================================
--- libc/src/.clang-tidy
+++ libc/src/.clang-tidy
@@ -3,4 +3,4 @@
WarningsAsErrors: 'llvmlibc-*'
CheckOptions:
- key: llvmlibc-restrict-system-libc-headers.Includes
- value: '-*, linux/*, asm/unistd.h'
+ value: '-*, linux/*, asm/*.h, asm-generic/*.h'
Index: libc/cmake/modules/LLVMLibCObjectRules.cmake
===================================================================
--- libc/cmake/modules/LLVMLibCObjectRules.cmake
+++ libc/cmake/modules/LLVMLibCObjectRules.cmake
@@ -144,7 +144,7 @@
${objects_target_name}
BEFORE
PRIVATE
- -fpie ${LLVM_CXX_STD_default}
+ -fpie ${LLVM_CXX_STD_default} -ffreestanding
)
target_include_directories(
${objects_target_name}
@@ -217,7 +217,8 @@
# X warnings generated.
# Until this is fixed upstream, we use -fno-caret-diagnostics to surpress
# these.
- COMMAND $<TARGET_FILE:clang-tidy> "--extra-arg=-fno-caret-diagnostics" --quiet
+ COMMAND $<TARGET_FILE:clang-tidy> --system-headers
+ "--extra-arg=-fno-caret-diagnostics" --quiet
# Path to directory containing compile_commands.json
-p ${PROJECT_BINARY_DIR}
${ADD_ENTRYPOINT_OBJ_SRCS}
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D80178.264794.patch
Type: text/x-patch
Size: 1340 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/libc-commits/attachments/20200519/8db0100a/attachment-0001.bin>
More information about the libc-commits
mailing list