blob: 0238866b6211b8cab07111b1239039443e698820 [file] [log] [blame]
// 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/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/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_library_host_static {
name: "kythe_cxx_glog",
srcs: ["kythe/cxx/glog/logging.cc"],
export_include_dirs: ["kythe/cxx"],
defaults: ["kythe_common_defaults"],
shared_libs: ["libbase"],
}
cc_binary_host {
name: "cxx_extractor",
defaults: [
"kythe_common_defaults",
],
srcs: [
"kythe/cxx/common/file_utils.cc",
"kythe/cxx/common/file_vname_generator.cc",
"kythe/cxx/common/index_writer.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/protobuf_metadata_file.cc",
"kythe/cxx/common/schema/edges.cc",
"kythe/cxx/common/status.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/index_pack.cc",
"kythe/cxx/extractor/language.cc",
"kythe/cxx/extractor/path_utils.cc",
"kythe/cxx/indexer/cxx/clang_utils.cc",
"third_party/llvm/src/cxx_extractor_preprocessor_utils.cc",
"third_party/llvm/src/clang_builtin_headers.cc",
":kythe_protos",
],
shared_libs: [
"libbase",
"libLLVM_host",
"libclang_cxx_host",
"libprotobuf-cpp-full",
"libziparchive",
],
proto: {
include_dirs: [
"external/kythe",
"external/protobuf/src",
],
type: "full",
canonical_path_from_root: false,
},
header_libs: [
"libabsl_headers",
"rapidjson_headers",
],
static_libs: [
"kythe_cxx_glog",
"regex-re2",
"libabsl_strings",
"libabsl_base",
"libabsl_numeric",
"libcrypto",
"libgflags",
],
generated_headers: ["clang_builtin_headers_resources"],
}