| // Copyright 2018 Google Inc. All rights reserved |
| // |
| // 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. |
| |
| filegroup { |
| name: "kythe_protos", |
| srcs: [ |
| "kythe/proto/analysis.proto", |
| "kythe/proto/buildinfo.proto", |
| "kythe/proto/common.proto", |
| "kythe/proto/cxx.proto", |
| "kythe/proto/filecontext.proto", |
| "kythe/proto/metadata.proto", |
| "kythe/proto/storage.proto", |
| ], |
| } |
| |
| java_library_host { |
| name: "javac_extractor", |
| srcs: [ |
| "kythe/java/com/google/devtools/kythe/extractors/java/standalone/AbstractJavacWrapper.java", |
| "kythe/java/com/google/devtools/kythe/extractors/java/standalone/Javac9Wrapper.java", |
| "kythe/java/com/google/devtools/kythe/extractors/java/*.java", |
| "kythe/java/com/google/devtools/kythe/extractors/shared/*.java", |
| "kythe/java/com/google/devtools/kythe/platform/kzip/*.java", |
| "kythe/java/com/google/devtools/kythe/platform/java/JavacOptionsUtils.java", |
| "kythe/java/com/google/devtools/kythe/platform/java/filemanager/ForwardingStandardJavaFileManager.java", |
| "kythe/java/com/google/devtools/kythe/platform/shared/CompilationUnits.java", |
| "kythe/java/com/google/devtools/kythe/util/DeleteRecursively.java", |
| "kythe/java/com/google/devtools/kythe/util/JsonUtil.java", |
| ":kythe_protos", |
| "kythe/proto/java.proto", |
| ], |
| javacflags: [ |
| "-target 1.9", |
| "--add-exports jdk.compiler/com.sun.tools.javac.main=ALL-UNNAMED", |
| "--add-exports jdk.compiler/com.sun.tools.javac.util=ALL-UNNAMED", |
| "--add-exports jdk.compiler/com.sun.tools.javac.file=ALL-UNNAMED", |
| "--add-exports jdk.compiler/com.sun.tools.javac.code=ALL-UNNAMED", |
| "--add-exports jdk.compiler/com.sun.tools.javac.api=ALL-UNNAMED", |
| "--add-modules java.compiler", |
| ], |
| manifest: "javac_extractor_manifest.txt", |
| proto: { |
| include_dirs: [ |
| "external/kythe", |
| "external/protobuf/src", |
| ], |
| type: "full", |
| canonical_path_from_root: false, |
| }, |
| static_libs: [ |
| "gson-prebuilt-jar", |
| "libprotobuf-java-full", |
| "libprotobuf-java-util-full", |
| "guava", |
| "jsr305", |
| ], |
| java_version: "1.9", |
| } |
| |
| cc_defaults { |
| name: "kythe_common_defaults", |
| cflags: [ |
| "-Wall", |
| "-Wextra", |
| "-Wno-deprecated", |
| "-Wno-missing-field-initializers", |
| "-Wno-unused-parameter", |
| "-Wno-unused-private-field", |
| "-Wno-sign-compare", |
| "-Wno-unused-variable", |
| "-fno-exceptions", |
| "-fno-rtti", |
| ], |
| } |
| |
| cc_defaults { |
| name: "kythe_proto_defaults", |
| srcs: [":kythe_protos"], |
| proto: { |
| include_dirs: [ |
| "external/kythe", |
| "external/protobuf/src", |
| ], |
| type: "full", |
| canonical_path_from_root: false, |
| }, |
| shared_libs: [ |
| "libprotobuf-cpp-full", |
| ], |
| } |
| |
| cc_library_host_static { |
| name: "kythe_cxx_glog", |
| defaults: ["kythe_common_defaults"], |
| srcs: ["kythe/cxx/glog/logging.cc"], |
| export_include_dirs: ["kythe/cxx"], |
| shared_libs: ["libbase"], |
| } |
| |
| cc_library_host_static { |
| name: "kythe_cxx_common", |
| defaults: [ |
| "kythe_common_defaults", |
| "kythe_proto_defaults", |
| ], |
| srcs: [ |
| "kythe/cxx/common/file_utils.cc", |
| "kythe/cxx/common/file_vname_generator.cc", |
| "kythe/cxx/common/init.cc", |
| "kythe/cxx/common/json_proto.cc", |
| "kythe/cxx/common/kythe_metadata_file.cc", |
| "kythe/cxx/common/kzip_writer_aosp.cc", |
| "kythe/cxx/common/path_utils.cc", |
| "kythe/cxx/common/status.cc", |
| ], |
| header_libs: [ |
| "libabsl_headers", |
| "rapidjson_headers", |
| ], |
| static_libs: [ |
| "kythe_cxx_glog", |
| "libabsl_strings", |
| "libgflags", |
| "libcrypto", |
| "regex-re2", |
| ], |
| shared_libs: [ |
| "libbase", |
| "libziparchive", |
| ], |
| } |
| |
| cc_binary_host { |
| name: "cxx_extractor", |
| defaults: [ |
| "kythe_common_defaults", |
| "kythe_proto_defaults", |
| ], |
| srcs: [ |
| "kythe/cxx/common/index_writer.cc", |
| "kythe/cxx/common/schema/edges.cc", |
| "kythe/cxx/extractor/CommandLineUtils.cc", |
| "kythe/cxx/extractor/cxx_details.cc", |
| "kythe/cxx/extractor/cxx_extractor.cc", |
| "kythe/cxx/extractor/cxx_extractor_main.cc", |
| "kythe/cxx/extractor/language.cc", |
| "kythe/cxx/extractor/path_utils.cc", |
| "kythe/cxx/indexer/cxx/clang_utils.cc", |
| "kythe/cxx/indexer/cxx/indexed_parent_map.cc", |
| "third_party/llvm/src/cxx_extractor_preprocessor_utils.cc", |
| "third_party/llvm/src/clang_builtin_headers.cc", |
| ], |
| shared_libs: [ |
| "libbase", |
| "libLLVM_host", |
| "libclang_cxx_host", |
| "libziparchive", |
| ], |
| header_libs: [ |
| "libabsl_headers", |
| ], |
| static_libs: [ |
| "kythe_cxx_glog", |
| "kythe_cxx_common", |
| "regex-re2", |
| "libabsl_base", |
| "libabsl_container", |
| "libabsl_debugging", |
| "libabsl_hash", |
| "libabsl_numeric", |
| "libabsl_status", |
| "libabsl_strings", |
| "libabsl_synchronization", |
| "libabsl_time", |
| "libcrypto", |
| ], |
| generated_headers: ["clang_builtin_headers_resources"], |
| target: { |
| darwin: { |
| host_ldlibs: [ |
| "-framework CoreFoundation", |
| ], |
| }, |
| }, |
| } |
| |
| cc_binary_host { |
| name: "protoc_extractor", |
| defaults: [ |
| "kythe_common_defaults", |
| "kythe_proto_defaults", |
| ], |
| srcs: [ |
| "kythe/cxx/extractor/proto/proto_extractor.cc", |
| "kythe/cxx/extractor/proto/proto_extractor_main.cc", |
| "kythe/cxx/indexer/proto/search_path.cc", |
| ], |
| header_libs: [ |
| "libabsl_headers", |
| ], |
| static_libs: [ |
| "kythe_cxx_glog", |
| "kythe_cxx_common", |
| "regex-re2", |
| "libabsl_base", |
| "libabsl_container", |
| "libabsl_debugging", |
| "libabsl_flags", |
| "libabsl_hash", |
| "libabsl_numeric", |
| "libabsl_status", |
| "libabsl_strings", |
| "libabsl_synchronization", |
| "libabsl_time", |
| "libcrypto", |
| ], |
| shared_libs: [ |
| "libbase", |
| "libziparchive", |
| ], |
| target: { |
| darwin: { |
| host_ldlibs: [ |
| "-framework CoreFoundation", |
| ], |
| }, |
| }, |
| } |
| |
| // A plugin for protobuffers compiler (aprotoc) to include metadata descriptor |
| // into the generated header. Extractors and indexers use it to trace the entities in |
| // the generated files back to the protobuffer dec |
| cc_binary_host { |
| name: "proto_metadata_plugin", |
| defaults: [ |
| "kythe_common_defaults", |
| "kythe_proto_defaults", |
| ], |
| srcs: [ |
| "kythe/cxx/tools/proto_metadata_plugin.cc", |
| ], |
| header_libs: [ |
| "libabsl_headers", |
| ], |
| static_libs: [ |
| "kythe_cxx_glog", |
| "kythe_cxx_common", |
| "libabsl_base", |
| "libabsl_container", |
| "libabsl_debugging", |
| "libabsl_hash", |
| "libabsl_numeric", |
| "libabsl_strings", |
| "libabsl_synchronization", |
| "libabsl_time", |
| "libprotoc", |
| ], |
| shared_libs: [ |
| "libbase", |
| "libz", |
| "libziparchive", |
| ], |
| target: { |
| darwin: { |
| host_ldlibs: [ |
| "-framework CoreFoundation", |
| ], |
| }, |
| }, |
| } |
| |
| // Go extractor |
| build = ["Android.gen.bp"] |