Skip to content

bazel: Switch clang runtimes libgcc -> compiler-rt - #48641

Merged
phlax merged 3 commits into
envoyproxy:mainfrom
phlax:compiler-rt
Oct 26, 2026
Merged

phlax merged 3 commits into
envoyproxy:mainfrom
phlax:compiler-rt

Conversation

@phlax

@phlax phlax commented Oct 23, 2026

Copy link
Copy Markdown
Member

No description provided.

@phlax phlax changed the title bazel: use LLVM runtimes for Linux clang links bazel: Switch clang runtimes libgcc -> compiler-rt Oct 23, 2026
@phlax
phlax force-pushed the compiler-rt branch 2 times, most recently from e20f669 to d2921c3 Compare October 24, 2026 13:52
@phlax phlax changed the title bazel: Switch clang runtimes libgcc -> compiler-rt [WIP] bazel: Switch clang runtimes libgcc -> compiler-rt Oct 24, 2026
@phlax
phlax marked this pull request as draft October 24, 2026 15:10
@phlax
phlax marked this pull request as draft October 24, 2026 15:10
@phlax
phlax marked this pull request as draft October 24, 2026 15:10
@phlax
phlax force-pushed the compiler-rt branch 4 times, most recently from b78d473 to bc40247 Compare October 25, 2026 08:51
@phlax phlax changed the title [WIP] bazel: Switch clang runtimes libgcc -> compiler-rt bazel: Switch clang runtimes libgcc -> compiler-rt Oct 25, 2026
@phlax
phlax marked this pull request as ready for review October 25, 2026 10:13
@phlax
phlax force-pushed the compiler-rt branch 6 times, most recently from 084ca9f to c148abf Compare October 25, 2026 17:34
Comment thread bazel/BUILD Outdated
Comment on lines +160 to +161
constraint_values = ["@platforms//os:linux"],
values = {"define": "ENVOY_CONFIG_ASAN=1"},

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

ENVOY_CONFIG_ASAN=1 isn't ASAN-only. build:fuzzing sets it too (.bazelrc:356), and oss-fuzz, plain-fuzzer and fuzz-coverage all inherit that config without enabling ASAN. So those builds now also get -unwindlib=none plus the shared @unwind_libs//:libunwind (libunwind.so.1, resolved through the _solib rpath), even though the dlsym(RTLD_NEXT) reason only applies to ASAN.

OSS-Fuzz is the main concern. I think it only packages the fuzzer executables into $OUT, so they may fail to load on ClusterFuzz because libunwind.so.1 would be missing. unwind_libs also only fetches x86_64, so a Linux aarch64 ASAN build would pull in the wrong architecture.

Maybe key this on a dedicated define that only build:asan sets, and constrain it to x86_64:

Suggested change
constraint_values = ["@platforms//os:linux"],
values = {"define": "ENVOY_CONFIG_ASAN=1"},
constraint_values = [
"@platforms//cpu:x86_64",
"@platforms//os:linux",
],
values = {"define": "ENVOY_SHARED_UNWIND=1"},

along with build:asan --define=ENVOY_SHARED_UNWIND=1 in .bazelrc.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

added a bool flag - defines are deprecated

Comment thread compat/openssl/prefixer/BUILD Resolved
Co-authored-by: Jonh Wendell <[email protected]>
Signed-off-by: phlax <[email protected]>
@phlax

phlax commented Oct 26, 2026

Copy link
Copy Markdown
Member Author

/retest

@phlax
phlax merged commit 06e2361 into envoyproxy:main Oct 26, 2026
31 checks passed
bpalermo added a commit to bpalermo/aether that referenced this pull request Nov 1, 2026
…er1054c and aether1074 (proposal 045)

- envoy/envoy_api 1.40.0.envoy -> 1.41.0-dev.20261028.011e396.envoy, registry
  a1264b53 -> 36d481b01b (the commit that added the snapshot).
- Dropped patches: aether1054c (envoyproxy/envoy#47868, 2eff6e8ccf) and
  aether1074 (envoyproxy/envoy#47893, 77b512527c), both in the snapshot.
- aether1050 refreshed from envoyproxy/envoy#47834's head against its merge
  base, which already contains #47068: the +/- lines are unchanged, only the
  test file's context moved. aether1054 refreshed by hand: two one-line
  insertions whose neighbouring runtime guards were removed upstream. 47740
  and aether1126 apply unchanged.
- .bazelversion 8.7.0 -> 9.3.1 (Envoy's own; the 1.40.0 closure does not load
  under Bazel 9, so the move cannot land first). .bazelrc follows upstream:
  merge_fixed_and_default_shell_env removed, system_include_paths and the
  rules_rust linker_messages flags added, the toolchains_llvm compiler-rt and
  libunwind overrides dropped (the envoy module links compiler-rt + libunwind
  since envoyproxy/envoy#48641).
- proxy-wasm-cpp-host .envoy -> .envoy.1, rules_cc 0.2.25 -> 0.2.27,
  rules_python 2.3.3 -> 2.4.5: what the new closure selects.
- The MODULE.bazel comment that still called #47893 open is rewritten.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01YacWmjoxWSZRJC38XYxuZx
bpalermo added a commit to bpalermo/aether that referenced this pull request Nov 1, 2026
…er1054c and aether1074 (proposal 045) (#1733)

* proxy: Envoy 1.41.0-dev.20261028.011e396 under Bazel 9.3.1; drop aether1054c and aether1074 (proposal 045)

- envoy/envoy_api 1.40.0.envoy -> 1.41.0-dev.20261028.011e396.envoy, registry
  a1264b53 -> 36d481b01b (the commit that added the snapshot).
- Dropped patches: aether1054c (envoyproxy/envoy#47868, 2eff6e8ccf) and
  aether1074 (envoyproxy/envoy#47893, 77b512527c), both in the snapshot.
- aether1050 refreshed from envoyproxy/envoy#47834's head against its merge
  base, which already contains #47068: the +/- lines are unchanged, only the
  test file's context moved. aether1054 refreshed by hand: two one-line
  insertions whose neighbouring runtime guards were removed upstream. 47740
  and aether1126 apply unchanged.
- .bazelversion 8.7.0 -> 9.3.1 (Envoy's own; the 1.40.0 closure does not load
  under Bazel 9, so the move cannot land first). .bazelrc follows upstream:
  merge_fixed_and_default_shell_env removed, system_include_paths and the
  rules_rust linker_messages flags added, the toolchains_llvm compiler-rt and
  libunwind overrides dropped (the envoy module links compiler-rt + libunwind
  since envoyproxy/envoy#48641).
- proxy-wasm-cpp-host .envoy -> .envoy.1, rules_cc 0.2.25 -> 0.2.27,
  rules_python 2.3.3 -> 2.4.5: what the new closure selects.
- The MODULE.bazel comment that still called #47893 open is rewritten.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01YacWmjoxWSZRJC38XYxuZx

* proxy: carry aether1733, envoy --mode validate no longer segfaults on a QUIC listener

#1733's proxy workflow (run 41308410926, both arches) failed
//agent/test/envoy_validate:envoy_validate_test: `envoy --mode validate` of
node_bootstrap.json, edge_bootstrap.json and the ADS reconnect test's
bootstrap died with SIGSEGV in
Quic::ActiveQuicListenerFactory::initializeWorkerRouting().

envoyproxy/envoy#45504, in the 011e396 snapshot, moved the QUIC listener's
socket options there (behind envoy.restart_features.defer_worker_routing_init,
default true) and applies them to every worker's listen socket. Validation
mode creates no sockets (ValidationListenerComponentFactory::createListenSocket
returns nullptr), so *socket dereferences null. Upstream main still has it.
The proxy-supervisor's check before every hot restart on a changed bootstrap
is `envoy --mode validate`, so this would have blocked every bootstrap change
in production.

The patch skips a null socket, which only validation mode produces, as
validation did before #45504. Regression test: envoy_validate_test in the
proxy workflow, red on 8ce601a. Not reported upstream (on hold).

The "FilterStateMatcherValidationError.Key: value length must be at least 1
characters" line in the same log is TestAgentCaptureListenerAndTableValidate's
expected rejection ("refused as it must be"); that test passed.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01YacWmjoxWSZRJC38XYxuZx

* proxy: aether1733's production exposure is a future static QUIC listener; refresh the extension count

- The aether1733 comment (MODULE.bazel, README) overstated the exposure: the
  chart's bootstraps carry static clusters only (listeners come over LDS), so
  the supervisor's pre-restart `--mode validate` does not crash today. A future
  bootstrap with a static QUIC listener would fail it, and every hot restart.
  The crash needs concurrency > 1 (the BPF reuseport option); raw-UDP
  listeners are unaffected.
- extensions_build_config.bzl: 354 upstream extensions - 35 dropped = 319 at
  011e396. The five new ones are named; tls.certificate_selectors.dynamic_modules
  is dropped by the existing pattern, and the four that compile in
  (priority_load_shed, host_allowlist, uri_template matcher,
  ai_protocol_manager in-memory buffer) are unused by aether and reach none of
  the wasm, dynamic-module or Rust machinery, so the policy keeps them.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01YacWmjoxWSZRJC38XYxuZx

---------

Co-authored-by: Claude Opus 5.5 <[email protected]>
tomjzzhang pushed a commit to envoyproxy/nighthawk that referenced this pull request Nov 2, 2026
Update Envoy dependency to envoyproxy/envoy@24a950b (Nov 01, 2026).

- Sync `ENVOY_COMMIT`, `bazel_dep` pins (`quiche`, `envoy_toolshed`), `.bazelrc`, and Python requirements.
- Remove `-l:libatomic.a` from `linkopts` following Envoy's toolchain switch from `libgcc` to `compiler-rt` (envoyproxy/envoy#48641).
- Update integration tests for Envoy's new upstream TLS 1.3 default max version (envoyproxy/envoy#48570).

Signed-off-by: Jason Ye <[email protected]>
phlax added a commit to phlax/envoy that referenced this pull request Nov 9, 2026
Signed-off-by: Ryan Northey <[email protected]>
Co-authored-by: Jonh Wendell <[email protected]>
(cherry picked from commit 06e2361)
Signed-off-by: Ryan Northey <[email protected]>
phlax added a commit to phlax/envoy that referenced this pull request Nov 11, 2026
Signed-off-by: Ryan Northey <[email protected]>
Co-authored-by: Jonh Wendell <[email protected]>
(cherry picked from commit 06e2361)
Signed-off-by: Ryan Northey <[email protected]>
phlax added a commit to phlax/envoy that referenced this pull request Nov 11, 2026
Signed-off-by: Ryan Northey <[email protected]>
Co-authored-by: Jonh Wendell <[email protected]>
(cherry picked from commit 06e2361)
Signed-off-by: Ryan Northey <[email protected]>
jwendell added a commit that referenced this pull request Nov 11, 2026
Signed-off-by: Ryan Northey <[email protected]>
Co-authored-by: Jonh Wendell <[email protected]>
(cherry picked from commit 06e2361)
Signed-off-by: Ryan Northey <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants