-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[#16891] ccmd: a command-line tool utilizing the compilation database…
… file Summary: `ccmd` (`bin/ccmd`) is a new tool that allows to perform various actions based on the compilation database file (compile_commands.json). Currently the most useful feature of this new tool is the ability to run clang-tidy in parallel. Changes to how the compilation database is generated: - Add two new CMake variables: YB_RESOLVED_C_COMPILER and YB_RESOLVED_CXX_COMPILER, for the actual C and C++ compiler executables, and use them instead of compiler wrapper scripts in the compilation database. Changes to the build system: - Remove unused support for a clang executable that lives inside the third-party directory (previously used up to Clang version 7). - Create the `toolchain` symlink in the build root directory pointing to the LLVM toolchain directory even in case YB_LLVM_TOOLCHAIN_DIR is predefined and there is no need to download and extract the LLVM tarball. Skip it during build and test jobs, because it is needed mostly for local development. Test Plan: Jenkins Reviewers: bogdan, steve.varnau Reviewed By: steve.varnau Subscribers: anijhawan, ybase Differential Revision: https://phabricator.dev.yugabyte.com/D24333
- Loading branch information
Showing
29 changed files
with
2,235 additions
and
289 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
--- | ||
# Copyright (c) Yugabyte, Inc. | ||
# | ||
# Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except | ||
# in compliance with the License. You may obtain a copy of the License at | ||
# | ||
# http://www.apache.org/licenses/LICENSE-2.0 | ||
# | ||
# Unless required by applicable law or agreed to in writing, software distributed under the License | ||
# is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express | ||
# or implied. See the License for the specific language governing permissions and limitations | ||
# under the License. | ||
|
||
# We don't specify the list of checks here, we just turn off all of them by default. | ||
# When we invoke clang-tidy, we specify the checks on the command line. | ||
|
||
# For the list of clang-tidy checks, see | ||
# https://clang.llvm.org/extra/clang-tidy/checks/list.html | ||
|
||
Checks: '-*' | ||
CheckOptions: | ||
- key: bugprone-argument-comment.StrictMode | ||
value: true | ||
- key: bugprone-argument-comment.IgnoreSingleArgument | ||
value: true | ||
- key: bugprone-argument-comment.CommentBoolLiterals | ||
value: true | ||
- key: bugprone-argument-comment.CommentNullPtrs | ||
value: true |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
#!/usr/bin/env bash | ||
|
||
set -euo pipefail | ||
. "${BASH_SOURCE%/*}/../build-support/common-build-env.sh" | ||
|
||
activate_virtualenv | ||
set_pythonpath | ||
|
||
python3 "${YB_SRC_ROOT}/python/yb/ccmd_tool.py" "$@" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.