Files
abseil-cpp/ci
Derek Mauro 9034b9ca6e Introduce ABSL_OPTION_INLINE_HW_ACCEL_STRATEGY in absl/base/options.h
to provide a centralized policy for hardware-accelerated
implementations in headers.

This option addresses ODR violations that occur when Abseil headers
use compile-time feature detection (such as __SSE4_2__) in inline
functions. If translation units are compiled with inconsistent CPU
architecture flags (e.g., -march=native vs -march=generic) and linked
together, they may disagree on the implementation of these inline
functions. This can lead to crashes or silent data corruption in
hashing.

The new option provides three levels of control:
- 0: Portable. Forces software-only implementations in headers,
  guaranteeing ABI safety across mixed translation units.
- 1: Required. Forces hardware-accelerated implementations in
  headers. The build will fail if the required instructions are not
  enabled in the compiler environment.
- 2: Auto-detect. Selects the best available implementation based on
  compiler flags, but can't guarantee safety if translation units are
  compiled with inconsistent flags.

PiperOrigin-RevId: 896569507
Change-Id: Ifcbc1f3980883feeaa4f05f845ce32310ca7d533
2026-04-08 10:20:35 -07:00
..
2026-02-03 11:43:53 -08:00
2026-02-04 10:24:31 -08:00