Merge pull request #9750 from protocolbuffers/pythonBuilds

Add k8 toolchain
pull/9753/head
deannagarcia 3 years ago committed by GitHub
commit 061dead753
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 9
      toolchain/BUILD
  2. 19
      toolchain/cc_toolchain_config.bzl

@ -14,6 +14,7 @@ TOOLCHAINS = {
"linux-x86_64": "cc-compiler-linux-x86_64",
"win32": "cc-compiler-windows-x86_32",
"win64": "cc-compiler-windows-x86_64",
"k8": "cc-compiler-k8",
}
cc_toolchain_suite(
@ -39,6 +40,14 @@ cc_toolchain_suite(
for cpu, toolchain in TOOLCHAINS.items()
]
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",
)
cc_toolchain_config(
name = "linux-aarch_64-config",
sysroot = "/opt/manylinux/2014/aarch64",

@ -157,6 +157,23 @@ def _impl(ctx):
],
)
features = [linker_flags, compiler_flags, sysroot_flags]
if "mingw" in ctx.attr.target_full_name:
features.append(
feature(
name = "targets_windows",
enabled = True,
)
)
else:
features.append(
feature(
name = "supports_pic",
enabled = True
)
)
return cc_common.create_cc_toolchain_config_info(
abi_libc_version = ctx.attr.abi_version,
abi_version = ctx.attr.abi_version,
@ -169,7 +186,7 @@ def _impl(ctx):
"/usr/local/include",
"/usr/local/lib/clang",
],
features = [linker_flags, compiler_flags, sysroot_flags],
features = features,
host_system_name = "local",
target_cpu = ctx.attr.target_cpu,
target_libc = ctx.attr.target_cpu,

Loading…
Cancel
Save