diff --git a/build/common.mk b/build/common.mk index 83d0d70e..8043ec11 100644 --- a/build/common.mk +++ b/build/common.mk @@ -36,6 +36,7 @@ common-patch: && patch -p1 < $(PATCH_DIR)/nacl_armv6_2.patch \ && patch -p2 < $(PATCH_DIR)/macos_h264_encoder.patch \ && patch -p2 < $(PATCH_DIR)/disable_use_hermetic_xcode_on_linux.patch \ + && patch -p2 < $(PATCH_DIR)/linux_fix_launder.patch \ && patch -p2 < $(PATCH_DIR)/add_licenses.patch .PHONY: common-package diff --git a/patch/linux_fix_launder.patch b/patch/linux_fix_launder.patch new file mode 100644 index 00000000..62bfa8bb --- /dev/null +++ b/patch/linux_fix_launder.patch @@ -0,0 +1,24 @@ +diff --git a/src/third_party/abseil-cpp/absl/functional/internal/any_invocable.h b/src/third_party/abseil-cpp/absl/functional/internal/any_invocable.h +index f353139..0e046b7 100644 +--- a/src/third_party/abseil-cpp/absl/functional/internal/any_invocable.h ++++ b/src/third_party/abseil-cpp/absl/functional/internal/any_invocable.h +@@ -195,11 +195,7 @@ union TypeErasedState { + template + T& ObjectInLocalStorage(TypeErasedState* const state) { + // We launder here because the storage may be reused with the same type. +-#if ABSL_INTERNAL_CPLUSPLUS_LANG >= 201703L +- return *std::launder(reinterpret_cast(&state->storage)); +-#elif ABSL_HAVE_BUILTIN(__builtin_launder) + return *__builtin_launder(reinterpret_cast(&state->storage)); +-#else + + // When `std::launder` or equivalent are not available, we rely on undefined + // behavior, which works as intended on Abseil's officially supported +@@ -213,7 +209,6 @@ T& ObjectInLocalStorage(TypeErasedState* const state) { + #pragma GCC diagnostic pop + #endif + +-#endif + } + + // The type for functions issuing lifetime-related operations: move and dispose