Protocol Buffers - Google's data interchange format (grpc依赖)
https://developers.google.com/protocol-buffers/
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
148 lines
4.3 KiB
148 lines
4.3 KiB
3 years ago
|
load(":cc_toolchain_config.bzl", "cc_toolchain_config")
|
||
3 years ago
|
|
||
3 years ago
|
package(default_visibility = ["//visibility:public"])
|
||
|
|
||
|
filegroup(name = "empty")
|
||
|
|
||
3 years ago
|
TOOLCHAINS = {
|
||
3 years ago
|
"osx-x86_64": "cc-compiler-osx-x86_64",
|
||
|
"osx-aarch_64": "cc-compiler-osx-aarch_64",
|
||
3 years ago
|
"linux-aarch_64": "cc-compiler-linux-aarch_64",
|
||
|
"linux-ppcle_64": "cc-compiler-linux-ppcle_64",
|
||
|
"linux-s390_64": "cc-compiler-linux-s390_64",
|
||
3 years ago
|
"linux-x86_32": "cc-compiler-linux-x86_32",
|
||
|
"linux-x86_64": "cc-compiler-linux-x86_64",
|
||
3 years ago
|
"win32": "cc-compiler-windows-x86_32",
|
||
|
"win64": "cc-compiler-windows-x86_64",
|
||
3 years ago
|
"k8": "cc-compiler-k8",
|
||
3 years ago
|
}
|
||
3 years ago
|
|
||
|
cc_toolchain_suite(
|
||
|
name = "clang_suite",
|
||
3 years ago
|
toolchains = TOOLCHAINS
|
||
3 years ago
|
)
|
||
|
|
||
|
[
|
||
|
cc_toolchain(
|
||
3 years ago
|
name = toolchain,
|
||
3 years ago
|
all_files = ":empty",
|
||
|
compiler_files = ":empty",
|
||
|
dwp_files = ":empty",
|
||
|
dynamic_runtime_lib = ":empty",
|
||
|
linker_files = ":empty",
|
||
|
objcopy_files = ":empty",
|
||
|
output_licenses = ["restricted"],
|
||
|
static_runtime_lib = ":empty",
|
||
|
strip_files = ":empty",
|
||
|
toolchain_config = ":" + cpu + "-config",
|
||
3 years ago
|
toolchain_identifier = toolchain,
|
||
3 years ago
|
)
|
||
3 years ago
|
for cpu, toolchain in TOOLCHAINS.items()
|
||
3 years ago
|
]
|
||
|
|
||
3 years ago
|
cc_toolchain_config(
|
||
|
name = "k8-config",
|
||
|
linker_path = "/usr/bin/ld",
|
||
|
sysroot = "/opt/manylinux/2014/x86_64",
|
||
|
target_cpu = "x86_64",
|
||
|
target_full_name = "x86_64-linux-gnu",
|
||
|
)
|
||
|
|
||
3 years ago
|
cc_toolchain_config(
|
||
3 years ago
|
name = "linux-aarch_64-config",
|
||
3 years ago
|
sysroot = "/opt/manylinux/2014/aarch64",
|
||
3 years ago
|
linker_path = "/usr/bin/ld",
|
||
3 years ago
|
target_cpu = "aarch64",
|
||
|
target_full_name = "aarch64-linux-gnu",
|
||
|
)
|
||
|
|
||
|
cc_toolchain_config(
|
||
3 years ago
|
name = "linux-ppcle_64-config",
|
||
3 years ago
|
linker_path = "/usr/bin/ld",
|
||
3 years ago
|
sysroot = "/opt/manylinux/2014/ppc64le",
|
||
3 years ago
|
target_cpu = "ppc64",
|
||
|
target_full_name = "powerpc64le-linux-gnu",
|
||
|
)
|
||
|
|
||
|
cc_toolchain_config(
|
||
3 years ago
|
name = "linux-s390_64-config",
|
||
3 years ago
|
linker_path = "/usr/bin/ld",
|
||
3 years ago
|
sysroot = "/opt/manylinux/2014/s390x",
|
||
3 years ago
|
target_cpu = "systemz",
|
||
|
target_full_name = "s390x-linux-gnu",
|
||
|
)
|
||
|
|
||
|
cc_toolchain_config(
|
||
3 years ago
|
name = "linux-x86_32-config",
|
||
3 years ago
|
linker_path = "/usr/bin/ld",
|
||
3 years ago
|
sysroot = "/opt/manylinux/2014/i686",
|
||
3 years ago
|
target_cpu = "x86_32",
|
||
|
target_full_name = "i386-linux-gnu",
|
||
|
)
|
||
|
|
||
|
cc_toolchain_config(
|
||
3 years ago
|
name = "linux-x86_64-config",
|
||
3 years ago
|
linker_path = "/usr/bin/ld",
|
||
3 years ago
|
sysroot = "/opt/manylinux/2014/x86_64",
|
||
3 years ago
|
target_cpu = "x86_64",
|
||
|
target_full_name = "x86_64-linux-gnu",
|
||
|
)
|
||
3 years ago
|
|
||
|
cc_toolchain_config(
|
||
3 years ago
|
name = "osx-aarch_64-config",
|
||
3 years ago
|
extra_compiler_flags = [
|
||
3 years ago
|
"-I/usr/tools/apple_sdks/xcode_13_0/macosx/usr/include/c++/v1",
|
||
|
"-I/usr/tools/apple_sdks/xcode_13_0/macosx/usr/include"
|
||
3 years ago
|
],
|
||
3 years ago
|
linker_path = "/usr/tools",
|
||
3 years ago
|
sysroot = "/usr/tools/apple_sdks/xcode_13_0/macosx",
|
||
3 years ago
|
target_cpu = "aarch64",
|
||
|
target_full_name = "aarch64-apple-macosx11.3",
|
||
|
)
|
||
|
|
||
|
cc_toolchain_config(
|
||
3 years ago
|
name = "osx-x86_64-config",
|
||
3 years ago
|
extra_compiler_flags = [
|
||
3 years ago
|
"-I/usr/tools/apple_sdks/xcode_13_0/macosx/usr/include/c++/v1",
|
||
|
"-I/usr/tools/apple_sdks/xcode_13_0/macosx/usr/include"
|
||
3 years ago
|
],
|
||
3 years ago
|
linker_path = "/usr/tools",
|
||
3 years ago
|
sysroot = "/usr/tools/apple_sdks/xcode_13_0/macosx",
|
||
3 years ago
|
target_cpu = "x86_64",
|
||
|
target_full_name = "x86_64-apple-macosx11.3",
|
||
|
)
|
||
3 years ago
|
|
||
|
cc_toolchain_config(
|
||
|
name = "win32-config",
|
||
3 years ago
|
extra_compiler_flags = [
|
||
3 years ago
|
"-isystem/usr/lib/gcc/i686-w64-mingw32/8.3-posix/include/c++",
|
||
|
"-isystem/usr/lib/gcc/i686-w64-mingw32/8.3-posix/include/c++/i686-w64-mingw32",
|
||
3 years ago
|
"-fsjlj-exceptions",
|
||
|
],
|
||
3 years ago
|
extra_include = "/usr/lib/gcc/i686-w64-mingw32",
|
||
3 years ago
|
extra_linker_flags = [
|
||
|
"-L/usr/lib/gcc/i686-w64-mingw32/8.3-posix",
|
||
|
"-pthread",
|
||
3 years ago
|
],
|
||
|
linker_path = "/usr/bin/ld",
|
||
3 years ago
|
sysroot = "/usr/i686-w64-mingw32",
|
||
3 years ago
|
target_cpu = "x86_32",
|
||
|
target_full_name = "i686-w64-mingw32",
|
||
|
)
|
||
|
|
||
|
cc_toolchain_config(
|
||
|
name = "win64-config",
|
||
3 years ago
|
extra_compiler_flags = [
|
||
3 years ago
|
"-isystem/usr/lib/gcc/x86_64-w64-mingw32/8.3-posix/include/c++/",
|
||
|
"-isystem/usr/lib/gcc/x86_64-w64-mingw32/8.3-posix/include/c++/x86_64-w64-mingw32",
|
||
3 years ago
|
],
|
||
3 years ago
|
extra_include = "/usr/lib/gcc/x86_64-w64-mingw32/8.3-posix/include",
|
||
|
extra_linker_flags = [
|
||
|
"-L/usr/lib/gcc/x86_64-w64-mingw32/8.3-posix",
|
||
|
],
|
||
3 years ago
|
linker_path = "/usr/bin/ld",
|
||
3 years ago
|
sysroot = "/usr/x86_64-w64-mingw32",
|
||
3 years ago
|
target_cpu = "x86_64",
|
||
|
target_full_name = "x86_64-w64-mingw32",
|
||
|
)
|