Kadir Çetinkaya | 0769200 | 2024-02-28 07:10:05 +0000 | [diff] [blame] | 1 | /* |
| 2 | * Copyright (C) 2024 The Android Open Source Project |
| 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 | |
| 17 | package { |
| 18 | default_applicable_licenses: ["Android-Apache-2.0"], |
| 19 | } |
| 20 | |
| 21 | cc_defaults { |
| 22 | name: "ide_query_cc_analyzer_defaults", |
| 23 | compile_multilib: "64", |
| 24 | defaults: [ |
| 25 | "llvm-build-host-tools-defaults", |
| 26 | ], |
| 27 | cflags: [ |
| 28 | // LLVM Sources do have unused parameters :( |
| 29 | "-Wno-unused-parameter", |
| 30 | ], |
| 31 | target: { |
| 32 | host: { |
| 33 | cppflags: [ |
| 34 | "-fno-rtti", |
| 35 | ], |
| 36 | }, |
| 37 | }, |
| 38 | } |
| 39 | |
| 40 | cc_library_host_static { |
| 41 | name: "builtin_headers", |
| 42 | srcs: ["builtin_headers.cc"], |
| 43 | generated_headers: ["clang_builtin_headers_resources"], |
| 44 | defaults: ["ide_query_cc_analyzer_defaults"], |
| 45 | } |
| 46 | |
| 47 | cc_library_host_static { |
| 48 | name: "include_scanner", |
| 49 | srcs: ["include_scanner.cc"], |
| 50 | shared_libs: ["libclang-cpp_host"], |
| 51 | static_libs: ["builtin_headers"], |
| 52 | defaults: ["ide_query_cc_analyzer_defaults"], |
| 53 | } |
| 54 | |
| 55 | cc_library_host_static { |
| 56 | name: "analyzer", |
| 57 | srcs: ["analyzer.cc"], |
| 58 | shared_libs: ["libclang-cpp_host"], |
| 59 | static_libs: [ |
| 60 | "include_scanner", |
Michael Merg | 86cca74 | 2024-06-11 15:24:05 +0000 | [diff] [blame^] | 61 | "cc_analyzer_proto", |
Kadir Çetinkaya | 0769200 | 2024-02-28 07:10:05 +0000 | [diff] [blame] | 62 | ], |
| 63 | defaults: ["ide_query_cc_analyzer_defaults"], |
| 64 | } |
| 65 | |
| 66 | cc_binary_host { |
| 67 | name: "ide_query_cc_analyzer", |
| 68 | defaults: ["ide_query_cc_analyzer_defaults"], |
| 69 | srcs: ["main.cc"], |
| 70 | shared_libs: [ |
| 71 | "libclang-cpp_host", |
| 72 | "libprotobuf-cpp-full", |
| 73 | ], |
| 74 | static_libs: [ |
Michael Merg | 86cca74 | 2024-06-11 15:24:05 +0000 | [diff] [blame^] | 75 | "cc_analyzer_proto", |
Kadir Çetinkaya | 0769200 | 2024-02-28 07:10:05 +0000 | [diff] [blame] | 76 | "builtin_headers", |
| 77 | "include_scanner", |
| 78 | "analyzer", |
| 79 | ], |
| 80 | } |