diff --git a/.azure-pipelines/linux.yml b/.azure-pipelines/linux.yml index f3337072613e..aa834255f303 100644 --- a/.azure-pipelines/linux.yml +++ b/.azure-pipelines/linux.yml @@ -48,6 +48,13 @@ jobs: displayName: "Check disk space at end" condition: always() + - task: PublishTestResults@2 + inputs: + testResultsFiles: '**/bazel-out/**/testlogs/**/test.xml' + testRunTitle: '$(CI_TARGET)' + searchFolder: $(Build.StagingDirectory)/tmp + condition: always() + - task: PublishBuildArtifacts@1 inputs: pathtoPublish: "$(Build.StagingDirectory)/envoy" diff --git a/.bazelrc b/.bazelrc index 5235dc6265ac..fd60cc9b0dd9 100644 --- a/.bazelrc +++ b/.bazelrc @@ -124,13 +124,12 @@ build:remote --auth_enabled=true build:remote --experimental_inmemory_jdeps_files build:remote --experimental_inmemory_dotd_files build:remote --experimental_remote_download_outputs=toplevel -test:remote --experimental_remote_download_outputs=minimal build:remote-clang --config=remote build:remote-clang --config=rbe-toolchain-clang # Docker sandbox -build:docker-sandbox --experimental_docker_image=envoyproxy/envoy-build:8246167b9d238797cbc6c03dccc9e3921c37617d +build:docker-sandbox --experimental_docker_image=envoyproxy/envoy-build@sha256:9236915d10004a35f2439ce4a1c33c1dbb06f95f84c4a4497d4e4f95cdc9e07f build:docker-sandbox --spawn_strategy=docker build:docker-sandbox --strategy=Javac=docker build:docker-sandbox --strategy=Closure=docker diff --git a/.bazelversion b/.bazelversion index 48f7a71df4be..25939d35c738 100644 --- a/.bazelversion +++ b/.bazelversion @@ -1 +1 @@ -0.28.1 +0.29.1 diff --git a/.circleci/config.yml b/.circleci/config.yml index 22d9de1203af..14cf64272abf 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -5,7 +5,7 @@ executors: description: "A regular build executor based on ubuntu image" docker: # NOTE: Update bazel/toolchains/rbe_toolchains_config.bzl with sha256 digest to match the image here. - - image: envoyproxy/envoy-build:cd8574de783791b3353579b489222bfda74888da + - image: envoyproxy/envoy-build:cb15cc3d2010aff77d6e022ddf6d723fa8becbc0 resource_class: xlarge working_directory: /source diff --git a/bazel/repository_locations.bzl b/bazel/repository_locations.bzl index 9712e2c093be..cba60a106ac2 100644 --- a/bazel/repository_locations.bzl +++ b/bazel/repository_locations.bzl @@ -4,9 +4,12 @@ REPOSITORY_LOCATIONS = dict( urls = ["https://github.com/bazelbuild/bazel-gazelle/releases/download/0.18.1/bazel-gazelle-0.18.1.tar.gz"], ), bazel_toolchains = dict( - sha256 = "b72e7a911436b2900b05759a1fcd735070edbd4442f0a3506ef021fdcd6e15b3", - strip_prefix = "bazel-toolchains-0.28.5", - urls = ["https://github.com/bazelbuild/bazel-toolchains/archive/0.28.5.tar.gz"], + sha256 = "ab0d8aaeaeeef413ddb03922dbdb99bbae9e1b2c157a87c77d70d45a830be5b0", + strip_prefix = "bazel-toolchains-0.29.1", + urls = [ + "https://github.com/bazelbuild/bazel-toolchains/releases/download/0.29.1/bazel-toolchains-0.29.1.tar.gz", + "https://mirror.bazel.build/github.com/bazelbuild/bazel-toolchains/archive/0.29.1.tar.gz", + ], ), boringssl = dict( sha256 = "c712766ddc844de2a38e686e1cdd7288795e9a6fe7f699c6636f1b76703db84e", diff --git a/bazel/toolchains/configs/clang/bazel_0.28.1/cc/BUILD b/bazel/toolchains/configs/clang/bazel_0.29.1/cc/BUILD similarity index 95% rename from bazel/toolchains/configs/clang/bazel_0.28.1/cc/BUILD rename to bazel/toolchains/configs/clang/bazel_0.29.1/cc/BUILD index 015b58ead104..da902b38d578 100755 --- a/bazel/toolchains/configs/clang/bazel_0.28.1/cc/BUILD +++ b/bazel/toolchains/configs/clang/bazel_0.29.1/cc/BUILD @@ -18,6 +18,7 @@ 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") licenses(["notice"]) # Apache 2.0 @@ -37,7 +38,7 @@ filegroup( filegroup( name = "compiler_deps", - srcs = glob(["extra_tools/**"], allow_empty = True) + [":empty"], + srcs = glob(["extra_tools/**"], allow_empty = True) + [":builtin_include_directory_paths"], ) # This is the entry point for --crosstool_top. Toolchains are found @@ -111,7 +112,7 @@ cc_toolchain_config( "-fdata-sections"], dbg_compile_flags = ["-g"], cxx_flags = ["-std=c++0x"], - link_flags = ["-fuse-ld=gold", + link_flags = ["-fuse-ld=/usr/bin/ld.gold", "-Wl,-no-as-needed", "-Wl,-z,relro,-z,now", "-B/usr/lib/llvm-8/bin", diff --git a/bazel/toolchains/configs/clang/bazel_0.28.1/cc/armeabi_cc_toolchain_config.bzl b/bazel/toolchains/configs/clang/bazel_0.29.1/cc/armeabi_cc_toolchain_config.bzl similarity index 100% rename from bazel/toolchains/configs/clang/bazel_0.28.1/cc/armeabi_cc_toolchain_config.bzl rename to bazel/toolchains/configs/clang/bazel_0.29.1/cc/armeabi_cc_toolchain_config.bzl diff --git a/bazel/toolchains/configs/clang/bazel_0.29.1/cc/builtin_include_directory_paths b/bazel/toolchains/configs/clang/bazel_0.29.1/cc/builtin_include_directory_paths new file mode 100755 index 000000000000..151e3b008a2b --- /dev/null +++ b/bazel/toolchains/configs/clang/bazel_0.29.1/cc/builtin_include_directory_paths @@ -0,0 +1,14 @@ +This file is generated by cc_configure and contains builtin include directories +that /usr/lib/llvm-8/bin/clang 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. + +/usr/local/include +/usr/lib/llvm-8/lib/clang/8.0.1/include +/usr/include/x86_64-linux-gnu +/usr/include +/usr/include/c++/7.4.0 +/usr/include/x86_64-linux-gnu/c++/7.4.0 +/usr/include/c++/7.4.0/backward +/usr/include/clang/8.0.1/include diff --git a/bazel/toolchains/configs/clang_libcxx/bazel_0.28.1/cc/cc_toolchain_config.bzl b/bazel/toolchains/configs/clang/bazel_0.29.1/cc/cc_toolchain_config.bzl similarity index 88% rename from bazel/toolchains/configs/clang_libcxx/bazel_0.28.1/cc/cc_toolchain_config.bzl rename to bazel/toolchains/configs/clang/bazel_0.29.1/cc/cc_toolchain_config.bzl index f2b12d962963..bf4d83940f89 100755 --- a/bazel/toolchains/configs/clang_libcxx/bazel_0.28.1/cc/cc_toolchain_config.bzl +++ b/bazel/toolchains/configs/clang/bazel_0.29.1/cc/cc_toolchain_config.bzl @@ -74,6 +74,12 @@ all_link_actions = [ ACTION_NAMES.cpp_link_nodeps_dynamic_library, ] +lto_index_actions = [ + ACTION_NAMES.lto_index_for_executable, + ACTION_NAMES.lto_index_for_dynamic_library, + ACTION_NAMES.lto_index_for_nodeps_dynamic_library, +] + def _impl(ctx): tool_paths = [ tool_path(name = name, path = path) @@ -95,18 +101,7 @@ def _impl(ctx): enabled = True, flag_sets = [ flag_set( - actions = [ - ACTION_NAMES.assemble, - 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.cpp_module_codegen, - ACTION_NAMES.lto_backend, - ACTION_NAMES.clif_match, - ], + actions = all_compile_actions, flag_groups = ([ flag_group( flags = ctx.attr.compile_flags, @@ -114,18 +109,7 @@ def _impl(ctx): ] if ctx.attr.compile_flags else []), ), flag_set( - actions = [ - ACTION_NAMES.assemble, - 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.cpp_module_codegen, - ACTION_NAMES.lto_backend, - ACTION_NAMES.clif_match, - ], + actions = all_compile_actions, flag_groups = ([ flag_group( flags = ctx.attr.dbg_compile_flags, @@ -134,18 +118,7 @@ def _impl(ctx): with_features = [with_feature_set(features = ["dbg"])], ), flag_set( - actions = [ - ACTION_NAMES.assemble, - 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.cpp_module_codegen, - ACTION_NAMES.lto_backend, - ACTION_NAMES.clif_match, - ], + actions = all_compile_actions, flag_groups = ([ flag_group( flags = ctx.attr.opt_compile_flags, @@ -154,15 +127,7 @@ def _impl(ctx): with_features = [with_feature_set(features = ["opt"])], ), flag_set( - actions = [ - ACTION_NAMES.linkstamp_compile, - ACTION_NAMES.cpp_compile, - ACTION_NAMES.cpp_header_parsing, - ACTION_NAMES.cpp_module_compile, - ACTION_NAMES.cpp_module_codegen, - ACTION_NAMES.lto_backend, - ACTION_NAMES.clif_match, - ], + actions = all_cpp_compile_actions + [ACTION_NAMES.lto_backend], flag_groups = ([ flag_group( flags = ctx.attr.cxx_flags, @@ -177,7 +142,7 @@ def _impl(ctx): enabled = True, flag_sets = [ flag_set( - actions = all_link_actions, + actions = all_link_actions + lto_index_actions, flag_groups = ([ flag_group( flags = ctx.attr.link_flags, @@ -185,7 +150,7 @@ def _impl(ctx): ] if ctx.attr.link_flags else []), ), flag_set( - actions = all_link_actions, + actions = all_link_actions + lto_index_actions, flag_groups = ([ flag_group( flags = ctx.attr.opt_link_flags, @@ -215,10 +180,7 @@ def _impl(ctx): ACTION_NAMES.cpp_module_codegen, ACTION_NAMES.lto_backend, ACTION_NAMES.clif_match, - ACTION_NAMES.cpp_link_executable, - ACTION_NAMES.cpp_link_dynamic_library, - ACTION_NAMES.cpp_link_nodeps_dynamic_library, - ], + ] + all_link_actions + lto_index_actions, flag_groups = [ flag_group( flags = ["--sysroot=%{sysroot}"], @@ -255,18 +217,7 @@ def _impl(ctx): enabled = True, flag_sets = [ flag_set( - actions = [ - ACTION_NAMES.assemble, - 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.cpp_module_codegen, - ACTION_NAMES.lto_backend, - ACTION_NAMES.clif_match, - ], + actions = all_compile_actions, flag_groups = [ flag_group( flags = ["%{user_compile_flags}"], @@ -283,18 +234,7 @@ def _impl(ctx): enabled = True, flag_sets = [ flag_set( - actions = [ - ACTION_NAMES.assemble, - 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.cpp_module_codegen, - ACTION_NAMES.lto_backend, - ACTION_NAMES.clif_match, - ], + actions = all_compile_actions, flag_groups = ([ flag_group( flags = ctx.attr.unfiltered_compile_flags, @@ -308,7 +248,7 @@ def _impl(ctx): name = "library_search_directories", flag_sets = [ flag_set( - actions = all_link_actions, + actions = all_link_actions + lto_index_actions, flag_groups = [ flag_group( flags = ["-L%{library_search_directories}"], @@ -328,6 +268,8 @@ def _impl(ctx): actions = [ ACTION_NAMES.cpp_link_executable, ACTION_NAMES.cpp_link_dynamic_library, + ACTION_NAMES.lto_index_for_executable, + ACTION_NAMES.lto_index_for_dynamic_library, ], flag_groups = [flag_group(flags = ["-static-libgcc"])], with_features = [ @@ -447,7 +389,7 @@ def _impl(ctx): name = "runtime_library_search_directories", flag_sets = [ flag_set( - actions = all_link_actions, + actions = all_link_actions + lto_index_actions, flag_groups = [ flag_group( iterate_over = "runtime_library_search_directories", @@ -474,7 +416,7 @@ def _impl(ctx): ], ), flag_set( - actions = all_link_actions, + actions = all_link_actions + lto_index_actions, flag_groups = [ flag_group( iterate_over = "runtime_library_search_directories", @@ -502,7 +444,7 @@ def _impl(ctx): name = "fission_support", flag_sets = [ flag_set( - actions = all_link_actions, + actions = all_link_actions + lto_index_actions, flag_groups = [ flag_group( flags = ["-Wl,--gdb-index"], @@ -520,6 +462,8 @@ def _impl(ctx): actions = [ ACTION_NAMES.cpp_link_dynamic_library, ACTION_NAMES.cpp_link_nodeps_dynamic_library, + ACTION_NAMES.lto_index_for_dynamic_library, + ACTION_NAMES.lto_index_for_nodeps_dynamic_library, ], flag_groups = [flag_group(flags = ["-shared"])], ), @@ -581,10 +525,7 @@ def _impl(ctx): actions = [ ACTION_NAMES.c_compile, ACTION_NAMES.cpp_compile, - ACTION_NAMES.cpp_link_dynamic_library, - ACTION_NAMES.cpp_link_nodeps_dynamic_library, - ACTION_NAMES.cpp_link_executable, - ], + ] + all_link_actions + lto_index_actions, flag_groups = [ flag_group( flags = [ @@ -607,10 +548,7 @@ def _impl(ctx): ACTION_NAMES.c_compile, ACTION_NAMES.cpp_compile, ACTION_NAMES.lto_backend, - ACTION_NAMES.cpp_link_dynamic_library, - ACTION_NAMES.cpp_link_nodeps_dynamic_library, - ACTION_NAMES.cpp_link_executable, - ], + ] + all_link_actions + lto_index_actions, flag_groups = [ flag_group( flags = [ @@ -662,7 +600,7 @@ def _impl(ctx): name = "symbol_counts", flag_sets = [ flag_set( - actions = all_link_actions, + actions = all_link_actions + lto_index_actions, flag_groups = [ flag_group( flags = [ @@ -697,10 +635,7 @@ def _impl(ctx): ], ), flag_set( - actions = [ - ACTION_NAMES.cpp_link_dynamic_library, - ACTION_NAMES.cpp_link_nodeps_dynamic_library, - ACTION_NAMES.cpp_link_executable, + actions = all_link_actions + lto_index_actions + [ "objc-executable", "objc++-executable", ], @@ -717,7 +652,7 @@ def _impl(ctx): name = "strip_debug_symbols", flag_sets = [ flag_set( - actions = all_link_actions, + actions = all_link_actions + lto_index_actions, flag_groups = [ flag_group( flags = ["-Wl,-S"], @@ -735,6 +670,8 @@ def _impl(ctx): actions = [ ACTION_NAMES.cpp_link_dynamic_library, ACTION_NAMES.cpp_link_nodeps_dynamic_library, + ACTION_NAMES.lto_index_for_dynamic_library, + ACTION_NAMES.lto_index_for_nodeps_dynamic_library, ], flag_groups = [ flag_group( @@ -760,7 +697,7 @@ def _impl(ctx): name = "libraries_to_link", flag_sets = [ flag_set( - actions = all_link_actions, + actions = all_link_actions + lto_index_actions, flag_groups = [ flag_group( iterate_over = "libraries_to_link", @@ -847,7 +784,7 @@ def _impl(ctx): name = "user_link_flags", flag_sets = [ flag_set( - actions = all_link_actions, + actions = all_link_actions + lto_index_actions, flag_groups = [ flag_group( flags = ["%{user_link_flags}"], @@ -885,7 +822,7 @@ def _impl(ctx): name = "linkstamps", flag_sets = [ flag_set( - actions = all_link_actions, + actions = all_link_actions + lto_index_actions, flag_groups = [ flag_group( flags = ["%{linkstamp_paths}"], @@ -919,11 +856,7 @@ def _impl(ctx): ], ), flag_set( - actions = [ - ACTION_NAMES.cpp_link_dynamic_library, - ACTION_NAMES.cpp_link_nodeps_dynamic_library, - ACTION_NAMES.cpp_link_executable, - ], + actions = all_link_actions + lto_index_actions, flag_groups = [flag_group(flags = ["--coverage"])], ), ], @@ -977,7 +910,10 @@ def _impl(ctx): name = "force_pic_flags", flag_sets = [ flag_set( - actions = [ACTION_NAMES.cpp_link_executable], + actions = [ + ACTION_NAMES.cpp_link_executable, + ACTION_NAMES.lto_index_for_executable, + ], flag_groups = [ flag_group( flags = ["-pie"], @@ -1014,6 +950,7 @@ def _impl(ctx): ], ) + dynamic_library_linker_tool_path = tool_paths dynamic_library_linker_tool_feature = feature( name = "dynamic_library_linker_tool", flag_sets = [ @@ -1021,6 +958,8 @@ def _impl(ctx): actions = [ ACTION_NAMES.cpp_link_dynamic_library, ACTION_NAMES.cpp_link_nodeps_dynamic_library, + ACTION_NAMES.lto_index_for_dynamic_library, + ACTION_NAMES.lto_index_for_nodeps_dynamic_library, ], flag_groups = [ flag_group( @@ -1041,11 +980,7 @@ def _impl(ctx): name = "output_execpath_flags", flag_sets = [ flag_set( - actions = [ - ACTION_NAMES.cpp_link_dynamic_library, - ACTION_NAMES.cpp_link_nodeps_dynamic_library, - ACTION_NAMES.cpp_link_executable, - ], + actions = all_link_actions + lto_index_actions, flag_groups = [ flag_group( flags = ["-o", "%{output_execpath}"], @@ -1076,11 +1011,7 @@ def _impl(ctx): ] if ctx.attr.coverage_compile_flags else []), ), flag_set( - actions = [ - ACTION_NAMES.cpp_link_dynamic_library, - ACTION_NAMES.cpp_link_nodeps_dynamic_library, - ACTION_NAMES.cpp_link_executable, - ], + actions = all_link_actions + lto_index_actions, flag_groups = ([ flag_group(flags = ctx.attr.coverage_link_flags), ] if ctx.attr.coverage_link_flags else []), diff --git a/bazel/toolchains/configs/clang/bazel_0.28.1/cc/cc_wrapper.sh b/bazel/toolchains/configs/clang/bazel_0.29.1/cc/cc_wrapper.sh similarity index 100% rename from bazel/toolchains/configs/clang/bazel_0.28.1/cc/cc_wrapper.sh rename to bazel/toolchains/configs/clang/bazel_0.29.1/cc/cc_wrapper.sh diff --git a/bazel/toolchains/configs/clang/bazel_0.28.1/config/BUILD b/bazel/toolchains/configs/clang/bazel_0.29.1/config/BUILD similarity index 89% rename from bazel/toolchains/configs/clang/bazel_0.28.1/config/BUILD rename to bazel/toolchains/configs/clang/bazel_0.29.1/config/BUILD index 7af5e24e5de1..5fb181617f25 100644 --- a/bazel/toolchains/configs/clang/bazel_0.28.1/config/BUILD +++ b/bazel/toolchains/configs/clang/bazel_0.29.1/config/BUILD @@ -29,7 +29,7 @@ toolchain( "@bazel_tools//platforms:linux", "@bazel_tools//platforms:x86_64", ], - toolchain = "//bazel/toolchains/configs/clang/bazel_0.28.1/cc:cc-compiler-k8", + toolchain = "//bazel/toolchains/configs/clang/bazel_0.29.1/cc:cc-compiler-k8", toolchain_type = "@bazel_tools//tools/cpp:toolchain_type", ) @@ -43,7 +43,7 @@ platform( remote_execution_properties = """ properties: { name: "container-image" - value:"docker://gcr.io/envoy-ci/envoy-build@sha256:d1f6087fdeb6a6e5d4fd52a5dc06b15f43f49e2c20fc813bcaaa12333485a70b" + value:"docker://gcr.io/envoy-ci/envoy-build@sha256:9236915d10004a35f2439ce4a1c33c1dbb06f95f84c4a4497d4e4f95cdc9e07f" } properties { name: "OSFamily" diff --git a/bazel/toolchains/configs/clang_libcxx/bazel_0.28.1/cc/BUILD b/bazel/toolchains/configs/clang_libcxx/bazel_0.29.1/cc/BUILD similarity index 95% rename from bazel/toolchains/configs/clang_libcxx/bazel_0.28.1/cc/BUILD rename to bazel/toolchains/configs/clang_libcxx/bazel_0.29.1/cc/BUILD index 8a2ac6331467..625db858205b 100755 --- a/bazel/toolchains/configs/clang_libcxx/bazel_0.28.1/cc/BUILD +++ b/bazel/toolchains/configs/clang_libcxx/bazel_0.29.1/cc/BUILD @@ -18,6 +18,7 @@ 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") licenses(["notice"]) # Apache 2.0 @@ -37,7 +38,7 @@ filegroup( filegroup( name = "compiler_deps", - srcs = glob(["extra_tools/**"], allow_empty = True) + [":empty"], + srcs = glob(["extra_tools/**"], allow_empty = True) + [":builtin_include_directory_paths"], ) # This is the entry point for --crosstool_top. Toolchains are found @@ -109,7 +110,7 @@ cc_toolchain_config( "-fdata-sections"], dbg_compile_flags = ["-g"], cxx_flags = ["-stdlib=libc++"], - link_flags = ["-fuse-ld=gold", + link_flags = ["-fuse-ld=/usr/bin/ld.gold", "-Wl,-no-as-needed", "-Wl,-z,relro,-z,now", "-B/usr/lib/llvm-8/bin", diff --git a/bazel/toolchains/configs/clang_libcxx/bazel_0.28.1/cc/armeabi_cc_toolchain_config.bzl b/bazel/toolchains/configs/clang_libcxx/bazel_0.29.1/cc/armeabi_cc_toolchain_config.bzl similarity index 100% rename from bazel/toolchains/configs/clang_libcxx/bazel_0.28.1/cc/armeabi_cc_toolchain_config.bzl rename to bazel/toolchains/configs/clang_libcxx/bazel_0.29.1/cc/armeabi_cc_toolchain_config.bzl diff --git a/bazel/toolchains/configs/clang_libcxx/bazel_0.29.1/cc/builtin_include_directory_paths b/bazel/toolchains/configs/clang_libcxx/bazel_0.29.1/cc/builtin_include_directory_paths new file mode 100755 index 000000000000..d809f97268c1 --- /dev/null +++ b/bazel/toolchains/configs/clang_libcxx/bazel_0.29.1/cc/builtin_include_directory_paths @@ -0,0 +1,12 @@ +This file is generated by cc_configure and contains builtin include directories +that /usr/lib/llvm-8/bin/clang 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. + +/usr/local/include +/usr/lib/llvm-8/lib/clang/8.0.1/include +/usr/include/x86_64-linux-gnu +/usr/include +/usr/lib/llvm-8/include/c++/v1 +/usr/include/clang/8.0.1/include diff --git a/bazel/toolchains/configs/clang/bazel_0.28.1/cc/cc_toolchain_config.bzl b/bazel/toolchains/configs/clang_libcxx/bazel_0.29.1/cc/cc_toolchain_config.bzl similarity index 88% rename from bazel/toolchains/configs/clang/bazel_0.28.1/cc/cc_toolchain_config.bzl rename to bazel/toolchains/configs/clang_libcxx/bazel_0.29.1/cc/cc_toolchain_config.bzl index f2b12d962963..bf4d83940f89 100755 --- a/bazel/toolchains/configs/clang/bazel_0.28.1/cc/cc_toolchain_config.bzl +++ b/bazel/toolchains/configs/clang_libcxx/bazel_0.29.1/cc/cc_toolchain_config.bzl @@ -74,6 +74,12 @@ all_link_actions = [ ACTION_NAMES.cpp_link_nodeps_dynamic_library, ] +lto_index_actions = [ + ACTION_NAMES.lto_index_for_executable, + ACTION_NAMES.lto_index_for_dynamic_library, + ACTION_NAMES.lto_index_for_nodeps_dynamic_library, +] + def _impl(ctx): tool_paths = [ tool_path(name = name, path = path) @@ -95,18 +101,7 @@ def _impl(ctx): enabled = True, flag_sets = [ flag_set( - actions = [ - ACTION_NAMES.assemble, - 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.cpp_module_codegen, - ACTION_NAMES.lto_backend, - ACTION_NAMES.clif_match, - ], + actions = all_compile_actions, flag_groups = ([ flag_group( flags = ctx.attr.compile_flags, @@ -114,18 +109,7 @@ def _impl(ctx): ] if ctx.attr.compile_flags else []), ), flag_set( - actions = [ - ACTION_NAMES.assemble, - 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.cpp_module_codegen, - ACTION_NAMES.lto_backend, - ACTION_NAMES.clif_match, - ], + actions = all_compile_actions, flag_groups = ([ flag_group( flags = ctx.attr.dbg_compile_flags, @@ -134,18 +118,7 @@ def _impl(ctx): with_features = [with_feature_set(features = ["dbg"])], ), flag_set( - actions = [ - ACTION_NAMES.assemble, - 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.cpp_module_codegen, - ACTION_NAMES.lto_backend, - ACTION_NAMES.clif_match, - ], + actions = all_compile_actions, flag_groups = ([ flag_group( flags = ctx.attr.opt_compile_flags, @@ -154,15 +127,7 @@ def _impl(ctx): with_features = [with_feature_set(features = ["opt"])], ), flag_set( - actions = [ - ACTION_NAMES.linkstamp_compile, - ACTION_NAMES.cpp_compile, - ACTION_NAMES.cpp_header_parsing, - ACTION_NAMES.cpp_module_compile, - ACTION_NAMES.cpp_module_codegen, - ACTION_NAMES.lto_backend, - ACTION_NAMES.clif_match, - ], + actions = all_cpp_compile_actions + [ACTION_NAMES.lto_backend], flag_groups = ([ flag_group( flags = ctx.attr.cxx_flags, @@ -177,7 +142,7 @@ def _impl(ctx): enabled = True, flag_sets = [ flag_set( - actions = all_link_actions, + actions = all_link_actions + lto_index_actions, flag_groups = ([ flag_group( flags = ctx.attr.link_flags, @@ -185,7 +150,7 @@ def _impl(ctx): ] if ctx.attr.link_flags else []), ), flag_set( - actions = all_link_actions, + actions = all_link_actions + lto_index_actions, flag_groups = ([ flag_group( flags = ctx.attr.opt_link_flags, @@ -215,10 +180,7 @@ def _impl(ctx): ACTION_NAMES.cpp_module_codegen, ACTION_NAMES.lto_backend, ACTION_NAMES.clif_match, - ACTION_NAMES.cpp_link_executable, - ACTION_NAMES.cpp_link_dynamic_library, - ACTION_NAMES.cpp_link_nodeps_dynamic_library, - ], + ] + all_link_actions + lto_index_actions, flag_groups = [ flag_group( flags = ["--sysroot=%{sysroot}"], @@ -255,18 +217,7 @@ def _impl(ctx): enabled = True, flag_sets = [ flag_set( - actions = [ - ACTION_NAMES.assemble, - 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.cpp_module_codegen, - ACTION_NAMES.lto_backend, - ACTION_NAMES.clif_match, - ], + actions = all_compile_actions, flag_groups = [ flag_group( flags = ["%{user_compile_flags}"], @@ -283,18 +234,7 @@ def _impl(ctx): enabled = True, flag_sets = [ flag_set( - actions = [ - ACTION_NAMES.assemble, - 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.cpp_module_codegen, - ACTION_NAMES.lto_backend, - ACTION_NAMES.clif_match, - ], + actions = all_compile_actions, flag_groups = ([ flag_group( flags = ctx.attr.unfiltered_compile_flags, @@ -308,7 +248,7 @@ def _impl(ctx): name = "library_search_directories", flag_sets = [ flag_set( - actions = all_link_actions, + actions = all_link_actions + lto_index_actions, flag_groups = [ flag_group( flags = ["-L%{library_search_directories}"], @@ -328,6 +268,8 @@ def _impl(ctx): actions = [ ACTION_NAMES.cpp_link_executable, ACTION_NAMES.cpp_link_dynamic_library, + ACTION_NAMES.lto_index_for_executable, + ACTION_NAMES.lto_index_for_dynamic_library, ], flag_groups = [flag_group(flags = ["-static-libgcc"])], with_features = [ @@ -447,7 +389,7 @@ def _impl(ctx): name = "runtime_library_search_directories", flag_sets = [ flag_set( - actions = all_link_actions, + actions = all_link_actions + lto_index_actions, flag_groups = [ flag_group( iterate_over = "runtime_library_search_directories", @@ -474,7 +416,7 @@ def _impl(ctx): ], ), flag_set( - actions = all_link_actions, + actions = all_link_actions + lto_index_actions, flag_groups = [ flag_group( iterate_over = "runtime_library_search_directories", @@ -502,7 +444,7 @@ def _impl(ctx): name = "fission_support", flag_sets = [ flag_set( - actions = all_link_actions, + actions = all_link_actions + lto_index_actions, flag_groups = [ flag_group( flags = ["-Wl,--gdb-index"], @@ -520,6 +462,8 @@ def _impl(ctx): actions = [ ACTION_NAMES.cpp_link_dynamic_library, ACTION_NAMES.cpp_link_nodeps_dynamic_library, + ACTION_NAMES.lto_index_for_dynamic_library, + ACTION_NAMES.lto_index_for_nodeps_dynamic_library, ], flag_groups = [flag_group(flags = ["-shared"])], ), @@ -581,10 +525,7 @@ def _impl(ctx): actions = [ ACTION_NAMES.c_compile, ACTION_NAMES.cpp_compile, - ACTION_NAMES.cpp_link_dynamic_library, - ACTION_NAMES.cpp_link_nodeps_dynamic_library, - ACTION_NAMES.cpp_link_executable, - ], + ] + all_link_actions + lto_index_actions, flag_groups = [ flag_group( flags = [ @@ -607,10 +548,7 @@ def _impl(ctx): ACTION_NAMES.c_compile, ACTION_NAMES.cpp_compile, ACTION_NAMES.lto_backend, - ACTION_NAMES.cpp_link_dynamic_library, - ACTION_NAMES.cpp_link_nodeps_dynamic_library, - ACTION_NAMES.cpp_link_executable, - ], + ] + all_link_actions + lto_index_actions, flag_groups = [ flag_group( flags = [ @@ -662,7 +600,7 @@ def _impl(ctx): name = "symbol_counts", flag_sets = [ flag_set( - actions = all_link_actions, + actions = all_link_actions + lto_index_actions, flag_groups = [ flag_group( flags = [ @@ -697,10 +635,7 @@ def _impl(ctx): ], ), flag_set( - actions = [ - ACTION_NAMES.cpp_link_dynamic_library, - ACTION_NAMES.cpp_link_nodeps_dynamic_library, - ACTION_NAMES.cpp_link_executable, + actions = all_link_actions + lto_index_actions + [ "objc-executable", "objc++-executable", ], @@ -717,7 +652,7 @@ def _impl(ctx): name = "strip_debug_symbols", flag_sets = [ flag_set( - actions = all_link_actions, + actions = all_link_actions + lto_index_actions, flag_groups = [ flag_group( flags = ["-Wl,-S"], @@ -735,6 +670,8 @@ def _impl(ctx): actions = [ ACTION_NAMES.cpp_link_dynamic_library, ACTION_NAMES.cpp_link_nodeps_dynamic_library, + ACTION_NAMES.lto_index_for_dynamic_library, + ACTION_NAMES.lto_index_for_nodeps_dynamic_library, ], flag_groups = [ flag_group( @@ -760,7 +697,7 @@ def _impl(ctx): name = "libraries_to_link", flag_sets = [ flag_set( - actions = all_link_actions, + actions = all_link_actions + lto_index_actions, flag_groups = [ flag_group( iterate_over = "libraries_to_link", @@ -847,7 +784,7 @@ def _impl(ctx): name = "user_link_flags", flag_sets = [ flag_set( - actions = all_link_actions, + actions = all_link_actions + lto_index_actions, flag_groups = [ flag_group( flags = ["%{user_link_flags}"], @@ -885,7 +822,7 @@ def _impl(ctx): name = "linkstamps", flag_sets = [ flag_set( - actions = all_link_actions, + actions = all_link_actions + lto_index_actions, flag_groups = [ flag_group( flags = ["%{linkstamp_paths}"], @@ -919,11 +856,7 @@ def _impl(ctx): ], ), flag_set( - actions = [ - ACTION_NAMES.cpp_link_dynamic_library, - ACTION_NAMES.cpp_link_nodeps_dynamic_library, - ACTION_NAMES.cpp_link_executable, - ], + actions = all_link_actions + lto_index_actions, flag_groups = [flag_group(flags = ["--coverage"])], ), ], @@ -977,7 +910,10 @@ def _impl(ctx): name = "force_pic_flags", flag_sets = [ flag_set( - actions = [ACTION_NAMES.cpp_link_executable], + actions = [ + ACTION_NAMES.cpp_link_executable, + ACTION_NAMES.lto_index_for_executable, + ], flag_groups = [ flag_group( flags = ["-pie"], @@ -1014,6 +950,7 @@ def _impl(ctx): ], ) + dynamic_library_linker_tool_path = tool_paths dynamic_library_linker_tool_feature = feature( name = "dynamic_library_linker_tool", flag_sets = [ @@ -1021,6 +958,8 @@ def _impl(ctx): actions = [ ACTION_NAMES.cpp_link_dynamic_library, ACTION_NAMES.cpp_link_nodeps_dynamic_library, + ACTION_NAMES.lto_index_for_dynamic_library, + ACTION_NAMES.lto_index_for_nodeps_dynamic_library, ], flag_groups = [ flag_group( @@ -1041,11 +980,7 @@ def _impl(ctx): name = "output_execpath_flags", flag_sets = [ flag_set( - actions = [ - ACTION_NAMES.cpp_link_dynamic_library, - ACTION_NAMES.cpp_link_nodeps_dynamic_library, - ACTION_NAMES.cpp_link_executable, - ], + actions = all_link_actions + lto_index_actions, flag_groups = [ flag_group( flags = ["-o", "%{output_execpath}"], @@ -1076,11 +1011,7 @@ def _impl(ctx): ] if ctx.attr.coverage_compile_flags else []), ), flag_set( - actions = [ - ACTION_NAMES.cpp_link_dynamic_library, - ACTION_NAMES.cpp_link_nodeps_dynamic_library, - ACTION_NAMES.cpp_link_executable, - ], + actions = all_link_actions + lto_index_actions, flag_groups = ([ flag_group(flags = ctx.attr.coverage_link_flags), ] if ctx.attr.coverage_link_flags else []), diff --git a/bazel/toolchains/configs/clang_libcxx/bazel_0.28.1/cc/cc_wrapper.sh b/bazel/toolchains/configs/clang_libcxx/bazel_0.29.1/cc/cc_wrapper.sh similarity index 100% rename from bazel/toolchains/configs/clang_libcxx/bazel_0.28.1/cc/cc_wrapper.sh rename to bazel/toolchains/configs/clang_libcxx/bazel_0.29.1/cc/cc_wrapper.sh diff --git a/bazel/toolchains/configs/clang_libcxx/bazel_0.28.1/config/BUILD b/bazel/toolchains/configs/clang_libcxx/bazel_0.29.1/config/BUILD similarity index 91% rename from bazel/toolchains/configs/clang_libcxx/bazel_0.28.1/config/BUILD rename to bazel/toolchains/configs/clang_libcxx/bazel_0.29.1/config/BUILD index 385ea14041f2..3d87dd780c53 100644 --- a/bazel/toolchains/configs/clang_libcxx/bazel_0.28.1/config/BUILD +++ b/bazel/toolchains/configs/clang_libcxx/bazel_0.29.1/config/BUILD @@ -29,7 +29,7 @@ toolchain( "@bazel_tools//platforms:linux", "@bazel_tools//platforms:x86_64", ], - toolchain = "//bazel/toolchains/configs/clang_libcxx/bazel_0.28.1/cc:cc-compiler-k8", + toolchain = "//bazel/toolchains/configs/clang_libcxx/bazel_0.29.1/cc:cc-compiler-k8", toolchain_type = "@bazel_tools//tools/cpp:toolchain_type", ) @@ -43,7 +43,7 @@ platform( remote_execution_properties = """ properties: { name: "container-image" - value:"docker://gcr.io/envoy-ci/envoy-build@sha256:d1f6087fdeb6a6e5d4fd52a5dc06b15f43f49e2c20fc813bcaaa12333485a70b" + value:"docker://gcr.io/envoy-ci/envoy-build@sha256:9236915d10004a35f2439ce4a1c33c1dbb06f95f84c4a4497d4e4f95cdc9e07f" } properties { name: "OSFamily" diff --git a/bazel/toolchains/configs/gcc/bazel_0.28.1/cc/BUILD b/bazel/toolchains/configs/gcc/bazel_0.29.1/cc/BUILD similarity index 96% rename from bazel/toolchains/configs/gcc/bazel_0.28.1/cc/BUILD rename to bazel/toolchains/configs/gcc/bazel_0.29.1/cc/BUILD index 443b34aa3eff..ae7728d61bd4 100755 --- a/bazel/toolchains/configs/gcc/bazel_0.28.1/cc/BUILD +++ b/bazel/toolchains/configs/gcc/bazel_0.29.1/cc/BUILD @@ -18,6 +18,7 @@ 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") licenses(["notice"]) # Apache 2.0 @@ -37,7 +38,7 @@ filegroup( filegroup( name = "compiler_deps", - srcs = glob(["extra_tools/**"], allow_empty = True) + [":empty"], + srcs = glob(["extra_tools/**"], allow_empty = True) + [":builtin_include_directory_paths"], ) # This is the entry point for --crosstool_top. Toolchains are found diff --git a/bazel/toolchains/configs/gcc/bazel_0.28.1/cc/armeabi_cc_toolchain_config.bzl b/bazel/toolchains/configs/gcc/bazel_0.29.1/cc/armeabi_cc_toolchain_config.bzl similarity index 100% rename from bazel/toolchains/configs/gcc/bazel_0.28.1/cc/armeabi_cc_toolchain_config.bzl rename to bazel/toolchains/configs/gcc/bazel_0.29.1/cc/armeabi_cc_toolchain_config.bzl diff --git a/bazel/toolchains/configs/gcc/bazel_0.29.1/cc/builtin_include_directory_paths b/bazel/toolchains/configs/gcc/bazel_0.29.1/cc/builtin_include_directory_paths new file mode 100755 index 000000000000..30a600ae8b06 --- /dev/null +++ b/bazel/toolchains/configs/gcc/bazel_0.29.1/cc/builtin_include_directory_paths @@ -0,0 +1,14 @@ +This file is generated by cc_configure and contains builtin include directories +that /usr/bin/gcc 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. + +/usr/lib/gcc/x86_64-linux-gnu/7/include +/usr/local/include +/usr/lib/gcc/x86_64-linux-gnu/7/include-fixed +/usr/include/x86_64-linux-gnu +/usr/include +/usr/include/c++/7 +/usr/include/x86_64-linux-gnu/c++/7 +/usr/include/c++/7/backward diff --git a/bazel/toolchains/configs/gcc/bazel_0.28.1/cc/cc_toolchain_config.bzl b/bazel/toolchains/configs/gcc/bazel_0.29.1/cc/cc_toolchain_config.bzl similarity index 88% rename from bazel/toolchains/configs/gcc/bazel_0.28.1/cc/cc_toolchain_config.bzl rename to bazel/toolchains/configs/gcc/bazel_0.29.1/cc/cc_toolchain_config.bzl index f2b12d962963..bf4d83940f89 100755 --- a/bazel/toolchains/configs/gcc/bazel_0.28.1/cc/cc_toolchain_config.bzl +++ b/bazel/toolchains/configs/gcc/bazel_0.29.1/cc/cc_toolchain_config.bzl @@ -74,6 +74,12 @@ all_link_actions = [ ACTION_NAMES.cpp_link_nodeps_dynamic_library, ] +lto_index_actions = [ + ACTION_NAMES.lto_index_for_executable, + ACTION_NAMES.lto_index_for_dynamic_library, + ACTION_NAMES.lto_index_for_nodeps_dynamic_library, +] + def _impl(ctx): tool_paths = [ tool_path(name = name, path = path) @@ -95,18 +101,7 @@ def _impl(ctx): enabled = True, flag_sets = [ flag_set( - actions = [ - ACTION_NAMES.assemble, - 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.cpp_module_codegen, - ACTION_NAMES.lto_backend, - ACTION_NAMES.clif_match, - ], + actions = all_compile_actions, flag_groups = ([ flag_group( flags = ctx.attr.compile_flags, @@ -114,18 +109,7 @@ def _impl(ctx): ] if ctx.attr.compile_flags else []), ), flag_set( - actions = [ - ACTION_NAMES.assemble, - 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.cpp_module_codegen, - ACTION_NAMES.lto_backend, - ACTION_NAMES.clif_match, - ], + actions = all_compile_actions, flag_groups = ([ flag_group( flags = ctx.attr.dbg_compile_flags, @@ -134,18 +118,7 @@ def _impl(ctx): with_features = [with_feature_set(features = ["dbg"])], ), flag_set( - actions = [ - ACTION_NAMES.assemble, - 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.cpp_module_codegen, - ACTION_NAMES.lto_backend, - ACTION_NAMES.clif_match, - ], + actions = all_compile_actions, flag_groups = ([ flag_group( flags = ctx.attr.opt_compile_flags, @@ -154,15 +127,7 @@ def _impl(ctx): with_features = [with_feature_set(features = ["opt"])], ), flag_set( - actions = [ - ACTION_NAMES.linkstamp_compile, - ACTION_NAMES.cpp_compile, - ACTION_NAMES.cpp_header_parsing, - ACTION_NAMES.cpp_module_compile, - ACTION_NAMES.cpp_module_codegen, - ACTION_NAMES.lto_backend, - ACTION_NAMES.clif_match, - ], + actions = all_cpp_compile_actions + [ACTION_NAMES.lto_backend], flag_groups = ([ flag_group( flags = ctx.attr.cxx_flags, @@ -177,7 +142,7 @@ def _impl(ctx): enabled = True, flag_sets = [ flag_set( - actions = all_link_actions, + actions = all_link_actions + lto_index_actions, flag_groups = ([ flag_group( flags = ctx.attr.link_flags, @@ -185,7 +150,7 @@ def _impl(ctx): ] if ctx.attr.link_flags else []), ), flag_set( - actions = all_link_actions, + actions = all_link_actions + lto_index_actions, flag_groups = ([ flag_group( flags = ctx.attr.opt_link_flags, @@ -215,10 +180,7 @@ def _impl(ctx): ACTION_NAMES.cpp_module_codegen, ACTION_NAMES.lto_backend, ACTION_NAMES.clif_match, - ACTION_NAMES.cpp_link_executable, - ACTION_NAMES.cpp_link_dynamic_library, - ACTION_NAMES.cpp_link_nodeps_dynamic_library, - ], + ] + all_link_actions + lto_index_actions, flag_groups = [ flag_group( flags = ["--sysroot=%{sysroot}"], @@ -255,18 +217,7 @@ def _impl(ctx): enabled = True, flag_sets = [ flag_set( - actions = [ - ACTION_NAMES.assemble, - 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.cpp_module_codegen, - ACTION_NAMES.lto_backend, - ACTION_NAMES.clif_match, - ], + actions = all_compile_actions, flag_groups = [ flag_group( flags = ["%{user_compile_flags}"], @@ -283,18 +234,7 @@ def _impl(ctx): enabled = True, flag_sets = [ flag_set( - actions = [ - ACTION_NAMES.assemble, - 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.cpp_module_codegen, - ACTION_NAMES.lto_backend, - ACTION_NAMES.clif_match, - ], + actions = all_compile_actions, flag_groups = ([ flag_group( flags = ctx.attr.unfiltered_compile_flags, @@ -308,7 +248,7 @@ def _impl(ctx): name = "library_search_directories", flag_sets = [ flag_set( - actions = all_link_actions, + actions = all_link_actions + lto_index_actions, flag_groups = [ flag_group( flags = ["-L%{library_search_directories}"], @@ -328,6 +268,8 @@ def _impl(ctx): actions = [ ACTION_NAMES.cpp_link_executable, ACTION_NAMES.cpp_link_dynamic_library, + ACTION_NAMES.lto_index_for_executable, + ACTION_NAMES.lto_index_for_dynamic_library, ], flag_groups = [flag_group(flags = ["-static-libgcc"])], with_features = [ @@ -447,7 +389,7 @@ def _impl(ctx): name = "runtime_library_search_directories", flag_sets = [ flag_set( - actions = all_link_actions, + actions = all_link_actions + lto_index_actions, flag_groups = [ flag_group( iterate_over = "runtime_library_search_directories", @@ -474,7 +416,7 @@ def _impl(ctx): ], ), flag_set( - actions = all_link_actions, + actions = all_link_actions + lto_index_actions, flag_groups = [ flag_group( iterate_over = "runtime_library_search_directories", @@ -502,7 +444,7 @@ def _impl(ctx): name = "fission_support", flag_sets = [ flag_set( - actions = all_link_actions, + actions = all_link_actions + lto_index_actions, flag_groups = [ flag_group( flags = ["-Wl,--gdb-index"], @@ -520,6 +462,8 @@ def _impl(ctx): actions = [ ACTION_NAMES.cpp_link_dynamic_library, ACTION_NAMES.cpp_link_nodeps_dynamic_library, + ACTION_NAMES.lto_index_for_dynamic_library, + ACTION_NAMES.lto_index_for_nodeps_dynamic_library, ], flag_groups = [flag_group(flags = ["-shared"])], ), @@ -581,10 +525,7 @@ def _impl(ctx): actions = [ ACTION_NAMES.c_compile, ACTION_NAMES.cpp_compile, - ACTION_NAMES.cpp_link_dynamic_library, - ACTION_NAMES.cpp_link_nodeps_dynamic_library, - ACTION_NAMES.cpp_link_executable, - ], + ] + all_link_actions + lto_index_actions, flag_groups = [ flag_group( flags = [ @@ -607,10 +548,7 @@ def _impl(ctx): ACTION_NAMES.c_compile, ACTION_NAMES.cpp_compile, ACTION_NAMES.lto_backend, - ACTION_NAMES.cpp_link_dynamic_library, - ACTION_NAMES.cpp_link_nodeps_dynamic_library, - ACTION_NAMES.cpp_link_executable, - ], + ] + all_link_actions + lto_index_actions, flag_groups = [ flag_group( flags = [ @@ -662,7 +600,7 @@ def _impl(ctx): name = "symbol_counts", flag_sets = [ flag_set( - actions = all_link_actions, + actions = all_link_actions + lto_index_actions, flag_groups = [ flag_group( flags = [ @@ -697,10 +635,7 @@ def _impl(ctx): ], ), flag_set( - actions = [ - ACTION_NAMES.cpp_link_dynamic_library, - ACTION_NAMES.cpp_link_nodeps_dynamic_library, - ACTION_NAMES.cpp_link_executable, + actions = all_link_actions + lto_index_actions + [ "objc-executable", "objc++-executable", ], @@ -717,7 +652,7 @@ def _impl(ctx): name = "strip_debug_symbols", flag_sets = [ flag_set( - actions = all_link_actions, + actions = all_link_actions + lto_index_actions, flag_groups = [ flag_group( flags = ["-Wl,-S"], @@ -735,6 +670,8 @@ def _impl(ctx): actions = [ ACTION_NAMES.cpp_link_dynamic_library, ACTION_NAMES.cpp_link_nodeps_dynamic_library, + ACTION_NAMES.lto_index_for_dynamic_library, + ACTION_NAMES.lto_index_for_nodeps_dynamic_library, ], flag_groups = [ flag_group( @@ -760,7 +697,7 @@ def _impl(ctx): name = "libraries_to_link", flag_sets = [ flag_set( - actions = all_link_actions, + actions = all_link_actions + lto_index_actions, flag_groups = [ flag_group( iterate_over = "libraries_to_link", @@ -847,7 +784,7 @@ def _impl(ctx): name = "user_link_flags", flag_sets = [ flag_set( - actions = all_link_actions, + actions = all_link_actions + lto_index_actions, flag_groups = [ flag_group( flags = ["%{user_link_flags}"], @@ -885,7 +822,7 @@ def _impl(ctx): name = "linkstamps", flag_sets = [ flag_set( - actions = all_link_actions, + actions = all_link_actions + lto_index_actions, flag_groups = [ flag_group( flags = ["%{linkstamp_paths}"], @@ -919,11 +856,7 @@ def _impl(ctx): ], ), flag_set( - actions = [ - ACTION_NAMES.cpp_link_dynamic_library, - ACTION_NAMES.cpp_link_nodeps_dynamic_library, - ACTION_NAMES.cpp_link_executable, - ], + actions = all_link_actions + lto_index_actions, flag_groups = [flag_group(flags = ["--coverage"])], ), ], @@ -977,7 +910,10 @@ def _impl(ctx): name = "force_pic_flags", flag_sets = [ flag_set( - actions = [ACTION_NAMES.cpp_link_executable], + actions = [ + ACTION_NAMES.cpp_link_executable, + ACTION_NAMES.lto_index_for_executable, + ], flag_groups = [ flag_group( flags = ["-pie"], @@ -1014,6 +950,7 @@ def _impl(ctx): ], ) + dynamic_library_linker_tool_path = tool_paths dynamic_library_linker_tool_feature = feature( name = "dynamic_library_linker_tool", flag_sets = [ @@ -1021,6 +958,8 @@ def _impl(ctx): actions = [ ACTION_NAMES.cpp_link_dynamic_library, ACTION_NAMES.cpp_link_nodeps_dynamic_library, + ACTION_NAMES.lto_index_for_dynamic_library, + ACTION_NAMES.lto_index_for_nodeps_dynamic_library, ], flag_groups = [ flag_group( @@ -1041,11 +980,7 @@ def _impl(ctx): name = "output_execpath_flags", flag_sets = [ flag_set( - actions = [ - ACTION_NAMES.cpp_link_dynamic_library, - ACTION_NAMES.cpp_link_nodeps_dynamic_library, - ACTION_NAMES.cpp_link_executable, - ], + actions = all_link_actions + lto_index_actions, flag_groups = [ flag_group( flags = ["-o", "%{output_execpath}"], @@ -1076,11 +1011,7 @@ def _impl(ctx): ] if ctx.attr.coverage_compile_flags else []), ), flag_set( - actions = [ - ACTION_NAMES.cpp_link_dynamic_library, - ACTION_NAMES.cpp_link_nodeps_dynamic_library, - ACTION_NAMES.cpp_link_executable, - ], + actions = all_link_actions + lto_index_actions, flag_groups = ([ flag_group(flags = ctx.attr.coverage_link_flags), ] if ctx.attr.coverage_link_flags else []), diff --git a/bazel/toolchains/configs/gcc/bazel_0.28.1/cc/cc_wrapper.sh b/bazel/toolchains/configs/gcc/bazel_0.29.1/cc/cc_wrapper.sh similarity index 100% rename from bazel/toolchains/configs/gcc/bazel_0.28.1/cc/cc_wrapper.sh rename to bazel/toolchains/configs/gcc/bazel_0.29.1/cc/cc_wrapper.sh diff --git a/bazel/toolchains/configs/gcc/bazel_0.28.1/config/BUILD b/bazel/toolchains/configs/gcc/bazel_0.29.1/config/BUILD similarity index 89% rename from bazel/toolchains/configs/gcc/bazel_0.28.1/config/BUILD rename to bazel/toolchains/configs/gcc/bazel_0.29.1/config/BUILD index 4584bd320cc2..6de35eeeaf23 100644 --- a/bazel/toolchains/configs/gcc/bazel_0.28.1/config/BUILD +++ b/bazel/toolchains/configs/gcc/bazel_0.29.1/config/BUILD @@ -29,7 +29,7 @@ toolchain( "@bazel_tools//platforms:linux", "@bazel_tools//platforms:x86_64", ], - toolchain = "//bazel/toolchains/configs/gcc/bazel_0.28.1/cc:cc-compiler-k8", + toolchain = "//bazel/toolchains/configs/gcc/bazel_0.29.1/cc:cc-compiler-k8", toolchain_type = "@bazel_tools//tools/cpp:toolchain_type", ) @@ -43,7 +43,7 @@ platform( remote_execution_properties = """ properties: { name: "container-image" - value:"docker://gcr.io/envoy-ci/envoy-build@sha256:d1f6087fdeb6a6e5d4fd52a5dc06b15f43f49e2c20fc813bcaaa12333485a70b" + value:"docker://gcr.io/envoy-ci/envoy-build@sha256:9236915d10004a35f2439ce4a1c33c1dbb06f95f84c4a4497d4e4f95cdc9e07f" } properties { name: "OSFamily" diff --git a/bazel/toolchains/configs/versions.bzl b/bazel/toolchains/configs/versions.bzl index c21f70f9cb14..bdf2a5c264ee 100644 --- a/bazel/toolchains/configs/versions.bzl +++ b/bazel/toolchains/configs/versions.bzl @@ -5,9 +5,9 @@ toolchain_config_spec0 = struct(config_repos = [], create_cc_configs = True, cre toolchain_config_spec1 = struct(config_repos = [], create_cc_configs = True, create_java_configs = False, env = {"BAZEL_COMPILER": "clang", "BAZEL_LINKLIBS": "-l%:libc++.a:-l%:libc++abi.a", "BAZEL_LINKOPTS": "-lm:-pthread:-fuse-ld=lld", "BAZEL_USE_LLVM_NATIVE_COVERAGE": "1", "GCOV": "llvm-profdata", "CC": "clang", "CXX": "clang++", "PATH": "/usr/sbin:/usr/bin:/sbin:/bin:/usr/lib/llvm-8/bin", "BAZEL_CXXOPTS": "-stdlib=libc++", "CXXFLAGS": "-stdlib=libc++"}, java_home = None, name = "clang_libcxx") toolchain_config_spec2 = struct(config_repos = [], create_cc_configs = True, create_java_configs = False, env = {"BAZEL_COMPILER": "gcc", "BAZEL_LINKLIBS": "-l%:libstdc++.a", "BAZEL_LINKOPTS": "-lm", "CC": "gcc", "CXX": "g++", "PATH": "/usr/sbin:/usr/bin:/sbin:/bin:/usr/lib/llvm-8/bin"}, java_home = None, name = "gcc") _TOOLCHAIN_CONFIG_SPECS = [toolchain_config_spec0,toolchain_config_spec1,toolchain_config_spec2] -_BAZEL_TO_CONFIG_SPEC_NAMES = {"0.28.1": ["clang", "clang_libcxx", "gcc"]} -LATEST = "sha256:d1f6087fdeb6a6e5d4fd52a5dc06b15f43f49e2c20fc813bcaaa12333485a70b" -CONTAINER_TO_CONFIG_SPEC_NAMES = {"sha256:d1f6087fdeb6a6e5d4fd52a5dc06b15f43f49e2c20fc813bcaaa12333485a70b": ["clang", "clang_libcxx", "gcc"]} +_BAZEL_TO_CONFIG_SPEC_NAMES = {"0.29.1": ["clang", "clang_libcxx", "gcc"]} +LATEST = "sha256:9236915d10004a35f2439ce4a1c33c1dbb06f95f84c4a4497d4e4f95cdc9e07f" +CONTAINER_TO_CONFIG_SPEC_NAMES = {"sha256:9236915d10004a35f2439ce4a1c33c1dbb06f95f84c4a4497d4e4f95cdc9e07f": ["clang", "clang_libcxx", "gcc"]} _DEFAULT_TOOLCHAIN_CONFIG_SPEC = toolchain_config_spec0 TOOLCHAIN_CONFIG_AUTOGEN_SPEC = struct( bazel_to_config_spec_names_map = _BAZEL_TO_CONFIG_SPEC_NAMES, diff --git a/bazel/toolchains/rbe_toolchains_config.bzl b/bazel/toolchains/rbe_toolchains_config.bzl index 96c38c79e1f5..8820710297a7 100644 --- a/bazel/toolchains/rbe_toolchains_config.bzl +++ b/bazel/toolchains/rbe_toolchains_config.bzl @@ -4,7 +4,7 @@ load("@envoy//bazel/toolchains:configs/versions.bzl", _generated_toolchain_confi _ENVOY_BUILD_IMAGE_REGISTRY = "gcr.io" _ENVOY_BUILD_IMAGE_REPOSITORY = "envoy-ci/envoy-build" -_ENVOY_BUILD_IMAGE_DIGEST = "sha256:d1f6087fdeb6a6e5d4fd52a5dc06b15f43f49e2c20fc813bcaaa12333485a70b" +_ENVOY_BUILD_IMAGE_DIGEST = "sha256:9236915d10004a35f2439ce4a1c33c1dbb06f95f84c4a4497d4e4f95cdc9e07f" _CONFIGS_OUTPUT_BASE = "bazel/toolchains/configs" _CLANG_ENV = {