From aa86c94a91decc82ae9c81c330aefa01ee6d7be3 Mon Sep 17 00:00:00 2001 From: Preston Van Loon Date: Mon, 14 Mar 2022 10:05:08 -0500 Subject: [PATCH] Update bazel to 5.0.0 (#10352) * Update to bazel 5 * Add new bazel 5 experimental flags to improve remote caching * regen cross compile for bazel 5 * gazelle * remove some old flags * use heremtic builds sandbox * minimal downloads for better disk usage * Restore manual tags for darwin builds --- .bazelversion | 2 +- .buildkite-bazelrc | 14 +- BUILD.bazel | 2 +- WORKSPACE | 7 - deps.bzl | 6 +- tools/cross-toolchain/configs/.latest.bazelrc | 14 +- .../{bazel_4.2.1 => bazel_5.0.0}/cc/BUILD | 9 +- .../cc/armeabi_cc_toolchain_config.bzl | 0 .../cc/builtin_include_directory_paths | 3 +- .../cc/cc_toolchain_config.bzl | 30 ++- .../cc/cc_wrapper.sh | 2 +- .../cc/module.modulemap | 175 ++++++++++++++++++ .../{bazel_4.2.1 => bazel_5.0.0}/config/BUILD | 2 +- .../{bazel_4.2.1 => bazel_5.0.0}/java/BUILD | 0 .../prysm_toolchains/BUILD.bazel | 10 + .../prysm_toolchains/WORKSPACE | 0 .../cc_toolchain_config_linux_arm64.bzl | 0 .../cc_toolchain_config_osx.bzl | 0 .../cc_toolchain_config_windows.bzl | 0 tools/cross-toolchain/configs/versions.bzl | 2 +- 20 files changed, 243 insertions(+), 35 deletions(-) rename tools/cross-toolchain/configs/clang/{bazel_4.2.1 => bazel_5.0.0}/cc/BUILD (97%) rename tools/cross-toolchain/configs/clang/{bazel_4.2.1 => bazel_5.0.0}/cc/armeabi_cc_toolchain_config.bzl (100%) rename tools/cross-toolchain/configs/clang/{bazel_4.2.1 => bazel_5.0.0}/cc/builtin_include_directory_paths (81%) rename tools/cross-toolchain/configs/clang/{bazel_4.2.1 => bazel_5.0.0}/cc/cc_toolchain_config.bzl (97%) rename tools/cross-toolchain/configs/clang/{bazel_4.2.1 => bazel_5.0.0}/cc/cc_wrapper.sh (96%) rename tools/cross-toolchain/configs/clang/{bazel_4.2.1 => bazel_5.0.0}/cc/module.modulemap (97%) rename tools/cross-toolchain/configs/clang/{bazel_4.2.1 => bazel_5.0.0}/config/BUILD (94%) rename tools/cross-toolchain/configs/clang/{bazel_4.2.1 => bazel_5.0.0}/java/BUILD (100%) rename tools/cross-toolchain/configs/clang/{bazel_4.2.1 => bazel_5.0.0}/prysm_toolchains/BUILD.bazel (94%) rename tools/cross-toolchain/configs/clang/{bazel_4.2.1 => bazel_5.0.0}/prysm_toolchains/WORKSPACE (100%) rename tools/cross-toolchain/configs/clang/{bazel_4.2.1 => bazel_5.0.0}/prysm_toolchains/cc_toolchain_config_linux_arm64.bzl (100%) rename tools/cross-toolchain/configs/clang/{bazel_4.2.1 => bazel_5.0.0}/prysm_toolchains/cc_toolchain_config_osx.bzl (100%) rename tools/cross-toolchain/configs/clang/{bazel_4.2.1 => bazel_5.0.0}/prysm_toolchains/cc_toolchain_config_windows.bzl (100%) diff --git a/.bazelversion b/.bazelversion index af8c8ec7c..0062ac971 100644 --- a/.bazelversion +++ b/.bazelversion @@ -1 +1 @@ -4.2.2 +5.0.0 diff --git a/.buildkite-bazelrc b/.buildkite-bazelrc index c496e2c65..55748441f 100644 --- a/.buildkite-bazelrc +++ b/.buildkite-bazelrc @@ -10,26 +10,26 @@ # Prysm specific remote-cache properties. #build:remote-cache --disk_cache= -build:remote-cache --remote_download_toplevel +build:remote-cache --remote_download_minimal build:remote-cache --remote_cache=grpc://bazel-remote-cache:9092 build:remote-cache --experimental_remote_downloader=grpc://bazel-remote-cache:9092 build:remote-cache --remote_local_fallback +build:remote-cache --experimental_remote_cache_async +build:remote-cache --experimental_remote_merkle_tree_cache +build:remote-cache --experimental_action_cache_store_output_metadata +build:remote-cache --experimental_remote_cache_compression # Enforce stricter environment rules, which eliminates some non-hermetic # behavior and therefore improves both the remote cache hit rate and the # correctness and repeatability of the build. build:remote-cache --incompatible_strict_action_env=true +build --experimental_use_hermetic_linux_sandbox + # Import workspace options. import %workspace%/.bazelrc startup --host_jvm_args=-Xmx2g --host_jvm_args=-Xms2g -query --repository_cache=/tmp/repositorycache -query --experimental_repository_cache_hardlinks -build --repository_cache=/tmp/repositorycache -build --experimental_repository_cache_hardlinks build --experimental_strict_action_env -build --disk_cache=/tmp/bazelbuilds -build --experimental_multi_threaded_digest build --sandbox_tmpfs_path=/tmp build --verbose_failures build --announce_rc diff --git a/BUILD.bazel b/BUILD.bazel index 419322ce4..9fc079a46 100644 --- a/BUILD.bazel +++ b/BUILD.bazel @@ -3,7 +3,7 @@ load("@com_github_atlassian_bazel_tools//gometalinter:def.bzl", "gometalinter") load("@com_github_atlassian_bazel_tools//goimports:def.bzl", "goimports") load("@io_kubernetes_build//defs:run_in_workspace.bzl", "workspace_binary") load("@io_bazel_rules_go//go:def.bzl", "nogo") -load("@graknlabs_bazel_distribution//common:rules.bzl", "assemble_targz", "assemble_versioned") +load("@vaticle_bazel_distribution//common:rules.bzl", "assemble_targz", "assemble_versioned") load("@bazel_skylib//rules:common_settings.bzl", "string_setting") prefix = "github.com/prysmaticlabs/prysm" diff --git a/WORKSPACE b/WORKSPACE index 667566fc0..5b0768b26 100644 --- a/WORKSPACE +++ b/WORKSPACE @@ -117,13 +117,6 @@ http_archive( urls = ["https://github.com/fuzzitdev/fuzzit/releases/download/v2.4.76/fuzzit_Linux_x86_64.zip"], ) -git_repository( - name = "graknlabs_bazel_distribution", - commit = "962f3a7e56942430c0ec120c24f9e9f2a9c2ce1a", - remote = "https://github.com/graknlabs/bazel-distribution", - shallow_since = "1569509514 +0300", -) - load( "@io_bazel_rules_docker//repositories:repositories.bzl", container_repositories = "repositories", diff --git a/deps.bzl b/deps.bzl index 8faa17165..a3a7fc766 100644 --- a/deps.bzl +++ b/deps.bzl @@ -3867,9 +3867,9 @@ def prysm_deps(): # Note: go_repository is already wrapped with maybe! maybe( git_repository, - name = "graknlabs_bazel_distribution", - commit = "962f3a7e56942430c0ec120c24f9e9f2a9c2ce1a", - remote = "https://github.com/graknlabs/bazel-distribution", + name = "vaticle_bazel_distribution", + commit = "96424c85195a97dad81f69fdbbef2e1574bf8801", + remote = "https://github.com/vaticle/bazel-distribution", shallow_since = "1569509514 +0300", ) diff --git a/tools/cross-toolchain/configs/.latest.bazelrc b/tools/cross-toolchain/configs/.latest.bazelrc index 7cc88c9df..cd5888b61 100644 --- a/tools/cross-toolchain/configs/.latest.bazelrc +++ b/tools/cross-toolchain/configs/.latest.bazelrc @@ -19,13 +19,13 @@ # Specifically, it includes all toolchain/platform flags # This file is used for testing purposes. -build:remote --host_javabase=//tools/cross-toolchain/configs/clang/bazel_4.2.1/java:jdk -build:remote --javabase=//tools/cross-toolchain/configs/clang/bazel_4.2.1/java:jdk -build:remote --crosstool_top=//tools/cross-toolchain/configs/clang/bazel_4.2.1/cc:toolchain -build:remote --extra_toolchains=//tools/cross-toolchain/configs/clang/bazel_4.2.1/config:cc-toolchain -build:remote --extra_execution_platforms=//tools/cross-toolchain/configs/clang/bazel_4.2.1/config:platform -build:remote --host_platform=//tools/cross-toolchain/configs/clang/bazel_4.2.1/config:platform -build:remote --platforms=//tools/cross-toolchain/configs/clang/bazel_4.2.1/config:platform +build:remote --host_javabase=//tools/cross-toolchain/configs/clang/bazel_5.0.0/java:jdk +build:remote --javabase=//tools/cross-toolchain/configs/clang/bazel_5.0.0/java:jdk +build:remote --crosstool_top=//tools/cross-toolchain/configs/clang/bazel_5.0.0/cc:toolchain +build:remote --extra_toolchains=//tools/cross-toolchain/configs/clang/bazel_5.0.0/config:cc-toolchain +build:remote --extra_execution_platforms=//tools/cross-toolchain/configs/clang/bazel_5.0.0/config:platform +build:remote --host_platform=//tools/cross-toolchain/configs/clang/bazel_5.0.0/config:platform +build:remote --platforms=//tools/cross-toolchain/configs/clang/bazel_5.0.0/config:platform # Import the default bazelrc file in bazel-toolchains repo. # This will only work for tests executed from bazel-toolchains diff --git a/tools/cross-toolchain/configs/clang/bazel_4.2.1/cc/BUILD b/tools/cross-toolchain/configs/clang/bazel_5.0.0/cc/BUILD similarity index 97% rename from tools/cross-toolchain/configs/clang/bazel_4.2.1/cc/BUILD rename to tools/cross-toolchain/configs/clang/bazel_5.0.0/cc/BUILD index 718caba4d..ef73c02d5 100755 --- a/tools/cross-toolchain/configs/clang/bazel_4.2.1/cc/BUILD +++ b/tools/cross-toolchain/configs/clang/bazel_5.0.0/cc/BUILD @@ -14,12 +14,12 @@ # This becomes the BUILD file for @local_config_cc// under non-BSD unixes. -package(default_visibility = ["//visibility:public"]) - load(":cc_toolchain_config.bzl", "cc_toolchain_config") load(":armeabi_cc_toolchain_config.bzl", "armeabi_cc_toolchain_config") load("@rules_cc//cc:defs.bzl", "cc_toolchain", "cc_toolchain_suite") +package(default_visibility = ["//visibility:public"]) + licenses(["notice"]) # Apache 2.0 cc_library( @@ -108,12 +108,13 @@ cc_toolchain_config( "/usr/include/c++/8", "/usr/include/x86_64-linux-gnu/c++/8", "/usr/include/c++/8/backward", + "/usr/include/c++/v1", ], cxx_flags = ["-std=c++0x"], dbg_compile_flags = ["-g"], host_system_name = "local", link_flags = [ - "-fuse-ld=/usr/bin/ld.gold", + "-fuse-ld=/usr/bin/ld.lld", "-Wl,-no-as-needed", "-Wl,-z,relro,-z,now", "-B/usr/bin", @@ -139,7 +140,7 @@ cc_toolchain_config( "ld": "/usr/bin/ld", "llvm-cov": "/usr/bin/llvm-cov", "cpp": "/usr/bin/cpp", - "gcc": "/usr/bin/clang", + "gcc": "/usr/bin/clang-10", "dwp": "/usr/bin/dwp", "gcov": "/usr/bin/llvm-profdata", "nm": "/usr/bin/nm", diff --git a/tools/cross-toolchain/configs/clang/bazel_4.2.1/cc/armeabi_cc_toolchain_config.bzl b/tools/cross-toolchain/configs/clang/bazel_5.0.0/cc/armeabi_cc_toolchain_config.bzl similarity index 100% rename from tools/cross-toolchain/configs/clang/bazel_4.2.1/cc/armeabi_cc_toolchain_config.bzl rename to tools/cross-toolchain/configs/clang/bazel_5.0.0/cc/armeabi_cc_toolchain_config.bzl diff --git a/tools/cross-toolchain/configs/clang/bazel_4.2.1/cc/builtin_include_directory_paths b/tools/cross-toolchain/configs/clang/bazel_5.0.0/cc/builtin_include_directory_paths similarity index 81% rename from tools/cross-toolchain/configs/clang/bazel_4.2.1/cc/builtin_include_directory_paths rename to tools/cross-toolchain/configs/clang/bazel_5.0.0/cc/builtin_include_directory_paths index 01dbc7741..5c0b10ff0 100755 --- a/tools/cross-toolchain/configs/clang/bazel_4.2.1/cc/builtin_include_directory_paths +++ b/tools/cross-toolchain/configs/clang/bazel_5.0.0/cc/builtin_include_directory_paths @@ -1,5 +1,5 @@ This file is generated by cc_configure and contains builtin include directories -that /usr/bin/clang reported. This file is a dependency of every compilation action and +that /usr/bin/clang-10 reported. This file is a dependency of every compilation action and changes to it will be reflected in the action cache key. When some of these paths change, Bazel will make sure to rerun the action, even though none of declared action inputs or the action commandline changes. @@ -12,3 +12,4 @@ declared action inputs or the action commandline changes. /usr/include/c++/8 /usr/include/x86_64-linux-gnu/c++/8 /usr/include/c++/8/backward +/usr/include/c++/v1 diff --git a/tools/cross-toolchain/configs/clang/bazel_4.2.1/cc/cc_toolchain_config.bzl b/tools/cross-toolchain/configs/clang/bazel_5.0.0/cc/cc_toolchain_config.bzl similarity index 97% rename from tools/cross-toolchain/configs/clang/bazel_4.2.1/cc/cc_toolchain_config.bzl rename to tools/cross-toolchain/configs/clang/bazel_5.0.0/cc/cc_toolchain_config.bzl index 5dbaa86ab..261191410 100755 --- a/tools/cross-toolchain/configs/clang/bazel_4.2.1/cc/cc_toolchain_config.bzl +++ b/tools/cross-toolchain/configs/clang/bazel_5.0.0/cc/cc_toolchain_config.bzl @@ -386,7 +386,7 @@ def _impl(ctx): ], flag_groups = [ flag_group( - flags = ["-gsplit-dwarf"], + flags = ["-gsplit-dwarf", "-g"], expand_if_available = "per_object_debug_info_file", ), ], @@ -669,6 +669,32 @@ def _impl(ctx): ], ) + external_include_paths_feature = feature( + name = "external_include_paths", + flag_sets = [ + flag_set( + actions = [ + ACTION_NAMES.preprocess_assemble, + ACTION_NAMES.linkstamp_compile, + ACTION_NAMES.c_compile, + ACTION_NAMES.cpp_compile, + ACTION_NAMES.cpp_header_parsing, + ACTION_NAMES.cpp_module_compile, + ACTION_NAMES.clif_match, + ACTION_NAMES.objc_compile, + ACTION_NAMES.objcpp_compile, + ], + flag_groups = [ + flag_group( + flags = ["-isystem", "%{external_include_paths}"], + iterate_over = "external_include_paths", + expand_if_available = "external_include_paths", + ), + ], + ), + ], + ) + symbol_counts_feature = feature( name = "symbol_counts", flag_sets = [ @@ -1167,6 +1193,7 @@ def _impl(ctx): preprocessor_defines_feature, includes_feature, include_paths_feature, + external_include_paths_feature, fdo_instrument_feature, cs_fdo_instrument_feature, cs_fdo_optimize_feature, @@ -1216,6 +1243,7 @@ def _impl(ctx): coverage_feature, default_compile_flags_feature, default_link_flags_feature, + user_link_flags_feature, fdo_optimize_feature, supports_dynamic_linker_feature, dbg_feature, diff --git a/tools/cross-toolchain/configs/clang/bazel_4.2.1/cc/cc_wrapper.sh b/tools/cross-toolchain/configs/clang/bazel_5.0.0/cc/cc_wrapper.sh similarity index 96% rename from tools/cross-toolchain/configs/clang/bazel_4.2.1/cc/cc_wrapper.sh rename to tools/cross-toolchain/configs/clang/bazel_5.0.0/cc/cc_wrapper.sh index bfc4ce503..c3970cc6e 100755 --- a/tools/cross-toolchain/configs/clang/bazel_4.2.1/cc/cc_wrapper.sh +++ b/tools/cross-toolchain/configs/clang/bazel_5.0.0/cc/cc_wrapper.sh @@ -22,4 +22,4 @@ set -eu # Call the C++ compiler -/usr/bin/clang "$@" +/usr/bin/clang-10 "$@" diff --git a/tools/cross-toolchain/configs/clang/bazel_4.2.1/cc/module.modulemap b/tools/cross-toolchain/configs/clang/bazel_5.0.0/cc/module.modulemap similarity index 97% rename from tools/cross-toolchain/configs/clang/bazel_4.2.1/cc/module.modulemap rename to tools/cross-toolchain/configs/clang/bazel_5.0.0/cc/module.modulemap index 2486a4612..5a2aaa957 100755 --- a/tools/cross-toolchain/configs/clang/bazel_4.2.1/cc/module.modulemap +++ b/tools/cross-toolchain/configs/clang/bazel_5.0.0/cc/module.modulemap @@ -6106,4 +6106,179 @@ module "crosstool" [system] { textual header "/usr/include/c++/8/backward/hash_set" textual header "/usr/include/c++/8/backward/hashtable.h" textual header "/usr/include/c++/8/backward/strstream" + textual header "/usr/include/c++/v1/__bit_reference" + textual header "/usr/include/c++/v1/__bsd_locale_defaults.h" + textual header "/usr/include/c++/v1/__bsd_locale_fallbacks.h" + textual header "/usr/include/c++/v1/__config" + textual header "/usr/include/c++/v1/__cxxabi_config.h" + textual header "/usr/include/c++/v1/__debug" + textual header "/usr/include/c++/v1/__errc" + textual header "/usr/include/c++/v1/__functional_03" + textual header "/usr/include/c++/v1/__functional_base" + textual header "/usr/include/c++/v1/__functional_base_03" + textual header "/usr/include/c++/v1/__hash_table" + textual header "/usr/include/c++/v1/__libcpp_version" + textual header "/usr/include/c++/v1/__locale" + textual header "/usr/include/c++/v1/__mutex_base" + textual header "/usr/include/c++/v1/__node_handle" + textual header "/usr/include/c++/v1/__nullptr" + textual header "/usr/include/c++/v1/__split_buffer" + textual header "/usr/include/c++/v1/__sso_allocator" + textual header "/usr/include/c++/v1/__std_stream" + textual header "/usr/include/c++/v1/__string" + textual header "/usr/include/c++/v1/__threading_support" + textual header "/usr/include/c++/v1/__tree" + textual header "/usr/include/c++/v1/__tuple" + textual header "/usr/include/c++/v1/__undef_macros" + textual header "/usr/include/c++/v1/algorithm" + textual header "/usr/include/c++/v1/any" + textual header "/usr/include/c++/v1/array" + textual header "/usr/include/c++/v1/atomic" + textual header "/usr/include/c++/v1/bit" + textual header "/usr/include/c++/v1/bitset" + textual header "/usr/include/c++/v1/cassert" + textual header "/usr/include/c++/v1/ccomplex" + textual header "/usr/include/c++/v1/cctype" + textual header "/usr/include/c++/v1/cerrno" + textual header "/usr/include/c++/v1/cfenv" + textual header "/usr/include/c++/v1/cfloat" + textual header "/usr/include/c++/v1/charconv" + textual header "/usr/include/c++/v1/chrono" + textual header "/usr/include/c++/v1/cinttypes" + textual header "/usr/include/c++/v1/ciso646" + textual header "/usr/include/c++/v1/climits" + textual header "/usr/include/c++/v1/clocale" + textual header "/usr/include/c++/v1/cmath" + textual header "/usr/include/c++/v1/codecvt" + textual header "/usr/include/c++/v1/compare" + textual header "/usr/include/c++/v1/complex" + textual header "/usr/include/c++/v1/complex.h" + textual header "/usr/include/c++/v1/condition_variable" + textual header "/usr/include/c++/v1/csetjmp" + textual header "/usr/include/c++/v1/csignal" + textual header "/usr/include/c++/v1/cstdarg" + textual header "/usr/include/c++/v1/cstdbool" + textual header "/usr/include/c++/v1/cstddef" + textual header "/usr/include/c++/v1/cstdint" + textual header "/usr/include/c++/v1/cstdio" + textual header "/usr/include/c++/v1/cstdlib" + textual header "/usr/include/c++/v1/cstring" + textual header "/usr/include/c++/v1/ctgmath" + textual header "/usr/include/c++/v1/ctime" + textual header "/usr/include/c++/v1/ctype.h" + textual header "/usr/include/c++/v1/cwchar" + textual header "/usr/include/c++/v1/cwctype" + textual header "/usr/include/c++/v1/cxxabi.h" + textual header "/usr/include/c++/v1/deque" + textual header "/usr/include/c++/v1/errno.h" + textual header "/usr/include/c++/v1/exception" + textual header "/usr/include/c++/v1/execution" + textual header "/usr/include/c++/v1/experimental/__config" + textual header "/usr/include/c++/v1/experimental/__memory" + textual header "/usr/include/c++/v1/experimental/algorithm" + textual header "/usr/include/c++/v1/experimental/coroutine" + textual header "/usr/include/c++/v1/experimental/deque" + textual header "/usr/include/c++/v1/experimental/filesystem" + textual header "/usr/include/c++/v1/experimental/forward_list" + textual header "/usr/include/c++/v1/experimental/functional" + textual header "/usr/include/c++/v1/experimental/iterator" + textual header "/usr/include/c++/v1/experimental/list" + textual header "/usr/include/c++/v1/experimental/map" + textual header "/usr/include/c++/v1/experimental/memory_resource" + textual header "/usr/include/c++/v1/experimental/propagate_const" + textual header "/usr/include/c++/v1/experimental/regex" + textual header "/usr/include/c++/v1/experimental/set" + textual header "/usr/include/c++/v1/experimental/simd" + textual header "/usr/include/c++/v1/experimental/string" + textual header "/usr/include/c++/v1/experimental/type_traits" + textual header "/usr/include/c++/v1/experimental/unordered_map" + textual header "/usr/include/c++/v1/experimental/unordered_set" + textual header "/usr/include/c++/v1/experimental/utility" + textual header "/usr/include/c++/v1/experimental/vector" + textual header "/usr/include/c++/v1/ext/__hash" + textual header "/usr/include/c++/v1/ext/hash_map" + textual header "/usr/include/c++/v1/ext/hash_set" + textual header "/usr/include/c++/v1/fenv.h" + textual header "/usr/include/c++/v1/filesystem" + textual header "/usr/include/c++/v1/float.h" + textual header "/usr/include/c++/v1/forward_list" + textual header "/usr/include/c++/v1/fstream" + textual header "/usr/include/c++/v1/functional" + textual header "/usr/include/c++/v1/future" + textual header "/usr/include/c++/v1/initializer_list" + textual header "/usr/include/c++/v1/inttypes.h" + textual header "/usr/include/c++/v1/iomanip" + textual header "/usr/include/c++/v1/ios" + textual header "/usr/include/c++/v1/iosfwd" + textual header "/usr/include/c++/v1/iostream" + textual header "/usr/include/c++/v1/istream" + textual header "/usr/include/c++/v1/iterator" + textual header "/usr/include/c++/v1/limits" + textual header "/usr/include/c++/v1/limits.h" + textual header "/usr/include/c++/v1/list" + textual header "/usr/include/c++/v1/locale" + textual header "/usr/include/c++/v1/locale.h" + textual header "/usr/include/c++/v1/map" + textual header "/usr/include/c++/v1/math.h" + textual header "/usr/include/c++/v1/memory" + textual header "/usr/include/c++/v1/module.modulemap" + textual header "/usr/include/c++/v1/mutex" + textual header "/usr/include/c++/v1/new" + textual header "/usr/include/c++/v1/numeric" + textual header "/usr/include/c++/v1/optional" + textual header "/usr/include/c++/v1/ostream" + textual header "/usr/include/c++/v1/queue" + textual header "/usr/include/c++/v1/random" + textual header "/usr/include/c++/v1/ratio" + textual header "/usr/include/c++/v1/regex" + textual header "/usr/include/c++/v1/scoped_allocator" + textual header "/usr/include/c++/v1/set" + textual header "/usr/include/c++/v1/setjmp.h" + textual header "/usr/include/c++/v1/shared_mutex" + textual header "/usr/include/c++/v1/span" + textual header "/usr/include/c++/v1/sstream" + textual header "/usr/include/c++/v1/stack" + textual header "/usr/include/c++/v1/stdbool.h" + textual header "/usr/include/c++/v1/stddef.h" + textual header "/usr/include/c++/v1/stdexcept" + textual header "/usr/include/c++/v1/stdint.h" + textual header "/usr/include/c++/v1/stdio.h" + textual header "/usr/include/c++/v1/stdlib.h" + textual header "/usr/include/c++/v1/streambuf" + textual header "/usr/include/c++/v1/string" + textual header "/usr/include/c++/v1/string.h" + textual header "/usr/include/c++/v1/string_view" + textual header "/usr/include/c++/v1/strstream" + textual header "/usr/include/c++/v1/support/android/locale_bionic.h" + textual header "/usr/include/c++/v1/support/fuchsia/xlocale.h" + textual header "/usr/include/c++/v1/support/ibm/limits.h" + textual header "/usr/include/c++/v1/support/ibm/locale_mgmt_aix.h" + textual header "/usr/include/c++/v1/support/ibm/support.h" + textual header "/usr/include/c++/v1/support/ibm/xlocale.h" + textual header "/usr/include/c++/v1/support/musl/xlocale.h" + textual header "/usr/include/c++/v1/support/newlib/xlocale.h" + textual header "/usr/include/c++/v1/support/solaris/floatingpoint.h" + textual header "/usr/include/c++/v1/support/solaris/wchar.h" + textual header "/usr/include/c++/v1/support/solaris/xlocale.h" + textual header "/usr/include/c++/v1/support/win32/limits_msvc_win32.h" + textual header "/usr/include/c++/v1/support/win32/locale_win32.h" + textual header "/usr/include/c++/v1/support/xlocale/__nop_locale_mgmt.h" + textual header "/usr/include/c++/v1/support/xlocale/__posix_l_fallback.h" + textual header "/usr/include/c++/v1/support/xlocale/__strtonum_fallback.h" + textual header "/usr/include/c++/v1/system_error" + textual header "/usr/include/c++/v1/tgmath.h" + textual header "/usr/include/c++/v1/thread" + textual header "/usr/include/c++/v1/tuple" + textual header "/usr/include/c++/v1/type_traits" + textual header "/usr/include/c++/v1/typeindex" + textual header "/usr/include/c++/v1/typeinfo" + textual header "/usr/include/c++/v1/unordered_map" + textual header "/usr/include/c++/v1/unordered_set" + textual header "/usr/include/c++/v1/utility" + textual header "/usr/include/c++/v1/valarray" + textual header "/usr/include/c++/v1/variant" + textual header "/usr/include/c++/v1/vector" + textual header "/usr/include/c++/v1/version" + textual header "/usr/include/c++/v1/wchar.h" + textual header "/usr/include/c++/v1/wctype.h" } \ No newline at end of file diff --git a/tools/cross-toolchain/configs/clang/bazel_4.2.1/config/BUILD b/tools/cross-toolchain/configs/clang/bazel_5.0.0/config/BUILD similarity index 94% rename from tools/cross-toolchain/configs/clang/bazel_4.2.1/config/BUILD rename to tools/cross-toolchain/configs/clang/bazel_5.0.0/config/BUILD index 58f50e2bb..156fe48e8 100644 --- a/tools/cross-toolchain/configs/clang/bazel_4.2.1/config/BUILD +++ b/tools/cross-toolchain/configs/clang/bazel_5.0.0/config/BUILD @@ -29,7 +29,7 @@ toolchain( "@bazel_tools//platforms:linux", "@bazel_tools//platforms:x86_64", ], - toolchain = "//tools/cross-toolchain/configs/clang/bazel_4.2.1/cc:cc-compiler-k8", + toolchain = "//tools/cross-toolchain/configs/clang/bazel_5.0.0/cc:cc-compiler-k8", toolchain_type = "@bazel_tools//tools/cpp:toolchain_type", ) diff --git a/tools/cross-toolchain/configs/clang/bazel_4.2.1/java/BUILD b/tools/cross-toolchain/configs/clang/bazel_5.0.0/java/BUILD similarity index 100% rename from tools/cross-toolchain/configs/clang/bazel_4.2.1/java/BUILD rename to tools/cross-toolchain/configs/clang/bazel_5.0.0/java/BUILD diff --git a/tools/cross-toolchain/configs/clang/bazel_4.2.1/prysm_toolchains/BUILD.bazel b/tools/cross-toolchain/configs/clang/bazel_5.0.0/prysm_toolchains/BUILD.bazel similarity index 94% rename from tools/cross-toolchain/configs/clang/bazel_4.2.1/prysm_toolchains/BUILD.bazel rename to tools/cross-toolchain/configs/clang/bazel_5.0.0/prysm_toolchains/BUILD.bazel index 20c5565d5..9124a5eae 100755 --- a/tools/cross-toolchain/configs/clang/bazel_4.2.1/prysm_toolchains/BUILD.bazel +++ b/tools/cross-toolchain/configs/clang/bazel_5.0.0/prysm_toolchains/BUILD.bazel @@ -40,6 +40,15 @@ config_setting( tags = ["manual"], ) +config_setting( + name = "osx_arm64", + constraint_values = [ + "@platforms//os:osx", + "@platforms//cpu:arm64", + ], + tags = ["manual"], +) + config_setting( name = "linux_arm64", constraint_values = [ @@ -157,6 +166,7 @@ toolchain( ":linux_arm64": ":cc-clang-arm64", ":linux_amd64": ":cc-clang-amd64", ":osx_amd64": ":cc-clang-osx", + ":osx_arm64": ":cc-clang-osx", ":windows_amd64": ":cc-mingw-amd64", }), toolchain_type = "@bazel_tools//tools/cpp:toolchain_type", diff --git a/tools/cross-toolchain/configs/clang/bazel_4.2.1/prysm_toolchains/WORKSPACE b/tools/cross-toolchain/configs/clang/bazel_5.0.0/prysm_toolchains/WORKSPACE similarity index 100% rename from tools/cross-toolchain/configs/clang/bazel_4.2.1/prysm_toolchains/WORKSPACE rename to tools/cross-toolchain/configs/clang/bazel_5.0.0/prysm_toolchains/WORKSPACE diff --git a/tools/cross-toolchain/configs/clang/bazel_4.2.1/prysm_toolchains/cc_toolchain_config_linux_arm64.bzl b/tools/cross-toolchain/configs/clang/bazel_5.0.0/prysm_toolchains/cc_toolchain_config_linux_arm64.bzl similarity index 100% rename from tools/cross-toolchain/configs/clang/bazel_4.2.1/prysm_toolchains/cc_toolchain_config_linux_arm64.bzl rename to tools/cross-toolchain/configs/clang/bazel_5.0.0/prysm_toolchains/cc_toolchain_config_linux_arm64.bzl diff --git a/tools/cross-toolchain/configs/clang/bazel_4.2.1/prysm_toolchains/cc_toolchain_config_osx.bzl b/tools/cross-toolchain/configs/clang/bazel_5.0.0/prysm_toolchains/cc_toolchain_config_osx.bzl similarity index 100% rename from tools/cross-toolchain/configs/clang/bazel_4.2.1/prysm_toolchains/cc_toolchain_config_osx.bzl rename to tools/cross-toolchain/configs/clang/bazel_5.0.0/prysm_toolchains/cc_toolchain_config_osx.bzl diff --git a/tools/cross-toolchain/configs/clang/bazel_4.2.1/prysm_toolchains/cc_toolchain_config_windows.bzl b/tools/cross-toolchain/configs/clang/bazel_5.0.0/prysm_toolchains/cc_toolchain_config_windows.bzl similarity index 100% rename from tools/cross-toolchain/configs/clang/bazel_4.2.1/prysm_toolchains/cc_toolchain_config_windows.bzl rename to tools/cross-toolchain/configs/clang/bazel_5.0.0/prysm_toolchains/cc_toolchain_config_windows.bzl diff --git a/tools/cross-toolchain/configs/versions.bzl b/tools/cross-toolchain/configs/versions.bzl index aa9b1615f..1d5351d0c 100644 --- a/tools/cross-toolchain/configs/versions.bzl +++ b/tools/cross-toolchain/configs/versions.bzl @@ -3,7 +3,7 @@ """Definitions to be used in rbe_repo attr of an rbe_autoconf rule """ toolchain_config_spec0 = struct(config_repos = ["prysm_toolchains"], create_cc_configs = True, create_java_configs = True, 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++"}, java_home = "/usr/lib/jvm/java-8-openjdk-amd64", name = "clang") _TOOLCHAIN_CONFIG_SPECS = [toolchain_config_spec0] -_BAZEL_TO_CONFIG_SPEC_NAMES = {"4.2.1": ["clang"]} +_BAZEL_TO_CONFIG_SPEC_NAMES = {"5.0.0": ["clang"]} LATEST = "sha256:ebf03ab43a88499e70c8bb4dad70b8bdbc9f9923a87bc72c39e9e7690fcd49f2" CONTAINER_TO_CONFIG_SPEC_NAMES = {"sha256:ebf03ab43a88499e70c8bb4dad70b8bdbc9f9923a87bc72c39e9e7690fcd49f2": ["clang"]} _DEFAULT_TOOLCHAIN_CONFIG_SPEC = toolchain_config_spec0