Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 9 additions & 12 deletions .bazelrc
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ common --noincompatible_disallow_ctx_resolve_tools
common --legacy_external_runfiles

common --registry=https://bcr.bazel.build/
common --registry=https://raw.githubusercontent.com/envoyproxy/bazel-registry/033f3cc9b33fa9388322ca58f20c296ef9ae3e4d
common --registry=https://raw.githubusercontent.com/envoyproxy/bazel-registry/b21ef7784375ac68541b173aee57bcb82a3617ec
# common --registry=file:///bazel-registry
# this can be useful for dev
# common --lockfile_mode=off
Expand Down Expand Up @@ -166,11 +166,11 @@ common:clang --host_platform=@clang_platform
info:clang --host_platform=@platforms//host
common:clang --repo_env=BAZEL_DO_NOT_DETECT_CPP_TOOLCHAIN=1

# Use gold linker for gcc compiler.
build:gcc --config=libstdc++
# Select the opt-in GCC toolchain for target and execution configurations.
build:gcc --@envoy//bazel:use_gcc
build:gcc --host_platform=@clang_platform # unique
build:gcc --cxxopt=-std=c++20 --host_cxxopt=-std=c++20
build:gcc --test_env=HEAPCHECK=
build:gcc --action_env=BAZEL_COMPILER=gcc
build:gcc --action_env=CC=gcc --action_env=CXX=g++
# This is to work around a bug in GCC that makes debug-types-section
# option not play well with fission:
# https://gcc.gnu.org/bugzilla/show_bug.cgi?id=110885
Expand All @@ -184,9 +184,6 @@ build:gcc --cxxopt=-Wno-missing-requires
build:gcc --cxxopt=-Wno-dangling-reference
build:gcc --cxxopt=-Wno-nonnull-compare
build:gcc --cxxopt=-Wno-trigraphs
build:gcc --linkopt=-fuse-ld=gold --host_linkopt=-fuse-ld=gold

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It looks like a couple of .bazelrc hunks from Step 10 (merge_from_envoy) were missed in this commit range — should we include them here?

build:gcc --host_platform=@envoy//bazel/rbe/toolchains:rbe_linux_gcc_platform
build:gcc --action_env=BAZEL_LINKOPTS=-lm:-fuse-ld=gold

# libc++ - default for clang
common:libc++ --action_env=CXXFLAGS=-stdlib=libc++
Expand All @@ -195,10 +192,6 @@ common:libc++ --action_env=BAZEL_CXXOPTS=-stdlib=libc++
common:libc++ --action_env=BAZEL_LINKLIBS=-l%:libc++.a:-l%:libc++abi.a
common:libc++ --action_env=BAZEL_LINKOPTS=-lm:-pthread

# libstdc++ - currently only used for gcc
build:libstdc++ --action_env=BAZEL_LINKLIBS=-l%:libstdc++.a
build:libstdc++ --repo_env=BAZEL_USE_LIBSTDCPP=True

build:gcc --per_file_copt=external/abseil-cpp.*/absl/log/die_if_null\.cc@-w
build:gcc --host_per_file_copt=external/abseil-cpp.*/absl/log/die_if_null\.cc@-w
build:gcc --per_file_copt=.*\.pb\.cc@-Wno-deprecated-declarations
Expand Down Expand Up @@ -364,6 +357,8 @@ build:macos-asan --dynamic_mode=off
# Base MSAN config
build:msan --action_env=ENVOY_MSAN=1
build:msan --config=sanitizer
# msan runs tests at 4-5x the unsanitized time; scale the per-size timeouts as tsan does.
build:msan --test_timeout=120,600,1500,4800
build:msan --build_tag_filters=-no_san
build:msan --test_tag_filters=-no_san
build:msan --define ENVOY_CONFIG_MSAN=1
Expand Down Expand Up @@ -512,6 +507,8 @@ common:remote-cache --remote_timeout=3600s
common:remote-exec --remote_executor=grpcs://mordenite.cluster.engflow.com
common:remote-exec --jobs=200
common:remote-exec --define=engflow_rbe=true
common:remote-exec --host_platform=@clang_platform

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do we also need info:remote-exec --host_platform=@platforms//host here (matching Envoy's ci.bazelrc and info:clang on line 166) so bazel info --config=rbe doesn't fail before @clang_platform is fetched?

Suggested change
common:remote-exec --host_platform=@clang_platform
common:remote-exec --host_platform=@clang_platform
info:remote-exec --host_platform=@platforms//host

info:remote-exec --host_platform=@platforms//host

# CI configurations
build:remote-ci --config=ci
Expand Down
10 changes: 0 additions & 10 deletions .github/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@ build-image:
sha-ci: 8fdf16ea0d40cb0e4726b13f97df8b73e80e331b206b62b224ceb2498149a1d5
sha-devtools: 5914ff8694b377cbd137317acb4a0f91c9496e08a17e867743f942e15f4deb83
sha-docker: 75bc814bc49ea2c4fe8807bd487fdb513b4b1ce9b6cce19bb1781ae9d28f80cf
sha-gcc: ca3b98402aa2bb59f44d2b5ff8fc8ccbcedc623dad539ca1a15866762854721a
sha-mobile: b4351554fbf60ecf5b69ae17434a1503802473118388361543a3c695040f8859
sha-worker: 58abaea3f29aae5340f32dc99fc66c97a6c2fec0902345d03cf6d47684606a1d
# TODO: remove this dupe (currently used by ci request handler)
Expand Down Expand Up @@ -332,15 +331,6 @@ run:
- mobile/.bazelrc
- mobile/**/*
- tools/code_format/check_format.py
mobile-perf:
paths:
- .bazelrc
- .bazelversion
- .github/config.yml
- bazel/external/quiche.BUILD
- mobile/.bazelrc
- mobile/**/*
- tools/code_format/check_format.py
mobile-python:
paths:
- .bazelrc
Expand Down
3 changes: 2 additions & 1 deletion .github/workflows/_ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ jobs:
if [[ "${{ inputs.task }}" == *"gcc"* ]]; then
echo "build --config=gcc" >> user.bazelrc
echo "build:gcc --copt=-g0" >> user.bazelrc
echo "build --linkopt=-Wl,--no-threads" >> user.bazelrc
echo "build --linkopt=-Wl,--threads=1" >> user.bazelrc
else
echo "common --config=clang" >> user.bazelrc
echo "build --copt=-g1" >> user.bazelrc
Expand Down Expand Up @@ -82,6 +82,7 @@ jobs:
GITHUB_TOKEN: ${{ github.token }}
GH_BRANCH: ${{ github.ref }}
GH_SHA1: ${{ github.sha }}
ENVOY_DOCKER_DEVTOOLS: '1'
ENVOY_DOCKER_IN_DOCKER: ${{ inputs.docker-in-docker && '1' || '' }}
DOCKERHUB_USERNAME: ${{ secrets.dockerhub-username }}
DOCKERHUB_PASSWORD: ${{ secrets.dockerhub-password }}
33 changes: 30 additions & 3 deletions MODULE.bazel
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# Envoy commit to use
ENVOY_COMMIT = "24a950b6477dd80837edb26ab9960aea8ed5311e"
ENVOY_COMMIT = "4113c858a4062cfafb9dcb738f37257d1455e10b"

module(
name = "nighthawk",
Expand All @@ -22,7 +22,7 @@ bazel_dep(name = "grpc", version = "1.83.0.envoy")
bazel_dep(name = "librdkafka", version = "2.15.0.bcr.1")
bazel_dep(name = "quiche", version = "0.0.0-261027-f53fd81.envoy")
bazel_dep(name = "toolchains_llvm", version = "1.9.1.envoy")
bazel_dep(name = "envoy_toolshed", version = "0.5.16.envoy")
bazel_dep(name = "envoy_toolshed", version = "0.5.17.envoy")
bazel_dep(name = "zlib-ng", version = "2.3.3.bcr.2")
bazel_dep(name = "googletest", version = "1.18.0.bcr.1")
bazel_dep(name = "googleapis", version = "0.0.0-20251003-2193a2bf")
Expand Down Expand Up @@ -119,10 +119,37 @@ llvm = use_extension("@toolchains_llvm//toolchain/extensions:llvm.bzl", "llvm")
use_repo(llvm, "llvm_toolchain")

llvm_toolchain_alias_ext = use_extension("@envoy_toolshed//compile:extensions.bzl", "llvm_toolchain_alias_extension")
use_repo(llvm_toolchain_alias_ext, "llvm_toolchain_llvm")
use_repo(
llvm_toolchain_alias_ext,
"llvm_minimal_linux_arm64",
"llvm_minimal_linux_x64",
"llvm_minimal_macos_arm64",
"llvm_toolchain_llvm",
)

sysroot_ext = use_extension("@envoy_toolshed//sysroot:extensions.bzl", "sysroot_extension")
use_repo(
sysroot_ext,
"sysroot_linux_amd64",
"sysroot_linux_arm64",
)

# Provides @clang_platform, referenced by `common:clang --host_platform=@clang_platform` in .bazelrc.
envoy_toolchains_ext = use_extension("@envoy//bazel:extensions.bzl", "envoy_toolchains_extension")
use_repo(envoy_toolchains_ext, "clang_platform")

# GCC toolchains (from Envoy)
gcc = use_extension("@envoy_toolshed//toolchains/gcc:extensions.bzl", "gcc_extension", dev_dependency = True)
gcc.toolchain(
name = "gcc_linux_x86_64",
arch = "x86_64",
dwp = "@llvm_minimal_linux_x64//:bin/llvm-dwp",
lld = "@llvm_minimal_linux_x64//:bin/lld",
sysroot = "@sysroot_linux_amd64//sysroot",
)
use_repo(gcc, "gcc_linux_x86_64")

register_toolchains(
"//bazel/gcc:linux_x86_64_toolchain",
dev_dependency = True,
)
Loading
Loading