prysm-pulse/tools/cross-toolchain/rbe_toolchains_config.bzl
Preston Van Loon 93c11e0e53
Update rules_go (#7202)
* Update rules_go

* go 1.15

* try with v0.24.2

* Update Mac OS X SDK

* gaz

* update SDK in toolchain config

* -I flag

* another -I flag

* Update rules_go, gazelle, bazel version

* regen, update rules_docker

* Revert "another -I flag"

This reverts commit 9255133d99bee1e94560a64316a4a7539a363935.

* Revert "-I flag"

This reverts commit 2954a41d76adc81ccb6281af243f4be1f79152e9.

* giving up

* Use OS X 10.12

* Use OS X 10.12

* Revert "Use OS X 10.12"

This reverts commit 4f60d5cb807b2ccccd484a85a6a7477a5fd13e28.

* Revert "Use OS X 10.12"

This reverts commit a79177fab7182ad792d1cee7fb61214ef8bd73ab.

* osx toolchain tweaks necessary to work with 10.15 mac sdk

* Update docker image, regen

* gaz

* test using custom image

* Revert "test using custom image"

This reverts commit 95b8666810a254f16061c99e2ea0ae4d020b2f2d.

* explicit go version

* Clean up docker image rules with new definitions. gazelle

* please the linter

* Update protobuf compiler to 3.13.0, run gazelle

* Update gazelle to fix empty build files. https://github.com/bazelbuild/bazel-gazelle/pull/926

* update skylib

* fix herumi fuzz build

* remove comment from tools/cross-toolchain/regenerate.sh

Co-authored-by: rkapka <rkapka@wp.pl>
Co-authored-by: SuburbanDad <gts.mobile@gmail.com>
Co-authored-by: prylabs-bulldozer[bot] <58059840+prylabs-bulldozer[bot]@users.noreply.github.com>
2020-11-10 03:01:56 +00:00

103 lines
3.5 KiB
Python

load("@bazel_toolchains//rules:rbe_repo.bzl", "rbe_autoconfig")
load("@prysm//tools/cross-toolchain:configs/versions.bzl", _generated_toolchain_config_suite_autogen_spec = "TOOLCHAIN_CONFIG_AUTOGEN_SPEC")
_PRYSM_BUILD_IMAGE_REGISTRY = "gcr.io"
_PRYSM_BUILD_IMAGE_REPOSITORY = "prysmaticlabs/rbe-worker"
_PRYSM_BUILD_IMAGE_DIGEST = "sha256:d5fa14154811dff0886e4c808dc15f18c4bb8545a1ef3c53805a0db13564bdad"
_PRYSM_BUILD_IMAGE_JAVA_HOME = "/usr/lib/jvm/java-8-openjdk-amd64"
_CONFIGS_OUTPUT_BASE = "tools/cross-toolchain/configs"
_CLANG_ENV = {
"BAZEL_COMPILER": "clang",
"BAZEL_LINKLIBS": "-l%:libstdc++.a",
"BAZEL_LINKOPTS": "-lm:-static-libgcc",
"BAZEL_USE_LLVM_NATIVE_COVERAGE": "1",
"GCOV": "llvm-profdata",
"CC": "clang",
"CXX": "clang++",
}
_GCC_ENV = {
"BAZEL_COMPILER": "gcc",
"BAZEL_LINKLIBS": "-l%:libstdc++.a",
"BAZEL_LINKOPTS": "-lm:-static-libgcc",
"CC": "gcc",
"CXX": "g++",
}
_TOOLCHAIN_CONFIG_SUITE_SPEC = {
"container_registry": _PRYSM_BUILD_IMAGE_REGISTRY,
"container_repo": _PRYSM_BUILD_IMAGE_REPOSITORY,
"output_base": _CONFIGS_OUTPUT_BASE,
"repo_name": "prysm",
"toolchain_config_suite_autogen_spec": _generated_toolchain_config_suite_autogen_spec,
}
def _rbe_toolchains_generator():
rbe_autoconfig(
name = "rbe_ubuntu_clang_gen",
digest = _PRYSM_BUILD_IMAGE_DIGEST,
export_configs = True,
java_home = _PRYSM_BUILD_IMAGE_JAVA_HOME,
registry = _PRYSM_BUILD_IMAGE_REGISTRY,
repository = _PRYSM_BUILD_IMAGE_REPOSITORY,
env = _CLANG_ENV,
toolchain_config_spec_name = "clang",
toolchain_config_suite_spec = _TOOLCHAIN_CONFIG_SUITE_SPEC,
use_checked_in_confs = "False",
config_repos = [
"prysm_toolchains",
],
use_legacy_platform_definition = False,
exec_compatible_with = [
"@bazel_tools//platforms:x86_64",
"@bazel_tools//platforms:linux",
"@bazel_tools//tools/cpp:clang",
],
)
rbe_autoconfig(
name = "rbe_ubuntu_gcc_gen",
digest = _PRYSM_BUILD_IMAGE_DIGEST,
export_configs = True,
java_home = _PRYSM_BUILD_IMAGE_JAVA_HOME,
registry = _PRYSM_BUILD_IMAGE_REGISTRY,
repository = _PRYSM_BUILD_IMAGE_REPOSITORY,
env = _GCC_ENV,
toolchain_config_spec_name = "gcc",
toolchain_config_suite_spec = _TOOLCHAIN_CONFIG_SUITE_SPEC,
use_checked_in_confs = "False",
config_repos = [
"prysm_toolchains",
],
use_legacy_platform_definition = False,
exec_compatible_with = [
"@bazel_tools//platforms:x86_64",
"@bazel_tools//platforms:linux",
"@bazel_tools//tools/cpp:gcc",
],
)
def _generated_rbe_toolchains():
rbe_autoconfig(
name = "rbe_ubuntu_clang",
digest = _PRYSM_BUILD_IMAGE_DIGEST,
export_configs = True,
java_home = _PRYSM_BUILD_IMAGE_JAVA_HOME,
registry = _PRYSM_BUILD_IMAGE_REGISTRY,
repository = _PRYSM_BUILD_IMAGE_REPOSITORY,
toolchain_config_spec_name = "clang",
toolchain_config_suite_spec = _TOOLCHAIN_CONFIG_SUITE_SPEC,
use_checked_in_confs = "Force",
use_legacy_platform_definition = False,
exec_compatible_with = [
"@bazel_tools//platforms:x86_64",
"@bazel_tools//platforms:linux",
"@bazel_tools//tools/cpp:clang",
],
)
def rbe_toolchains_config():
_rbe_toolchains_generator()
_generated_rbe_toolchains()