-
Notifications
You must be signed in to change notification settings - Fork 14.5k
Open
Labels
code-cleanuplibcmetaissueIssue to collect references to a group of similar or related issues.Issue to collect references to a group of similar or related issues.
Description
After https://reviews.llvm.org/D144705, it is possible to run linting on the libc source code again. Because of the long time since we last did any formal lint checking, the source tree has regressed in a number of places with respect to code style. Also, the new LIBC_INLINE
tag is missing in a number of places. This issue is about making the libc source lint clean so that we can start running linting on a CI builder.
Addressing this bug has to be a team effort as a large part of the source tree is affected. The best way to start doing the cleanup is this:
- Build Clang and Clang-Tidy from head and install it into a special directory, say
~/libc-lint-tools/
. You will have to install the following targets:install-clang
,install-clang-tidy
,install-core-resource-headers
,install-clang-resource-headers
,install-builtins
. - Configure libc with:
cmake -G Ninja ../llvm -DLLVM_ENABLE_PROJECTS="libc" -DCMAKE_BUILD_TYPE=Debug -DLLVM_LIBC_FULL_BUILD=ON -DCMAKE_CXX_COMPILER=~/libc-lint-tools/bin/clang++ -DCMAKE_C_COMPILER=~/libc-lint-tools/bin/clang -DLLVM_LIBC_CLANG_TIDY=~/libc-lint-tools/bin/clang-tidy
- Build any lint target, for example,
libc.src.string.strlen.__lint__
or just execute thelibc-lint
target. They should you a large number of lint problems. - Send patches to problems identified in step 3.
Metadata
Metadata
Assignees
Labels
code-cleanuplibcmetaissueIssue to collect references to a group of similar or related issues.Issue to collect references to a group of similar or related issues.