| 1 |
#!/bin/bash |
| 2 |
# Copyright 2015 gRPC authors. |
| 3 |
# |
| 4 |
# Licensed under the Apache License, Version 2.0 (the "License"); |
| 5 |
# you may not use this file except in compliance with the License. |
| 6 |
# You may obtain a copy of the License at |
| 7 |
# |
| 8 |
# http://www.apache.org/licenses/LICENSE-2.0 |
| 9 |
# |
| 10 |
# Unless required by applicable law or agreed to in writing, software |
| 11 |
# distributed under the License is distributed on an "AS IS" BASIS, |
| 12 |
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| 13 |
# See the License for the specific language governing permissions and |
| 14 |
# limitations under the License. |
| 15 |
|
| 16 |
# change to root directory |
| 17 |
cd $(dirname $0)/../.. |
| 18 |
REPO_ROOT=$(pwd) |
| 19 |
|
| 20 |
# grep targets with manual tag, which is not included in a result of bazel build using ... |
| 21 |
# let's get a list of them using query command and pass it to gen_compilation_database.py |
| 22 |
export MANUAL_TARGETS=$(bazel query 'attr("tags", "manual", tests(//test/cpp/...))' | grep -v _on_ios) |
| 23 |
|
| 24 |
# generate a clang compilation database for all C/C++ sources in the repo. |
| 25 |
tools/distrib/gen_compilation_database.py \ |
| 26 |
--include_headers \ |
| 27 |
--ignore_system_headers \ |
| 28 |
--dedup_targets \ |
| 29 |
"//:*" \ |
| 30 |
"//src/core/..." \ |
| 31 |
"//src/compiler/..." \ |
| 32 |
"//test/core/..." \ |
| 33 |
"//test/cpp/..." \ |
| 34 |
$MANUAL_TARGETS |