Skip to content
Merged
Show file tree
Hide file tree
Changes from 10 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
3 changes: 3 additions & 0 deletions bazel/envoy_internal.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,9 @@ def envoy_copts(repository, test = False):
"-DNOMCX",
"-DNOIME",
"-DNOCRYPT",
# Ignore unguarded gcc pragmas in quiche (unrecognized by MSVC)
# TODO(wrowe): Drop this change when fixed in bazel/external/quiche.genrule_cmd
"-wd4068",
# this is to silence the incorrect MSVC compiler warning when trying to convert between
# std::optional data types while conversions between primitive types are producing no error
"-wd4244",
Expand Down
4 changes: 3 additions & 1 deletion bazel/envoy_library.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,8 @@ def envoy_cc_library(
tags = [],
deps = [],
strip_include_prefix = None,
textual_hdrs = None):
textual_hdrs = None,
defines = []):
if tcmalloc_dep:
deps += tcmalloc_external_deps(repository)

Expand All @@ -123,6 +124,7 @@ def envoy_cc_library(
alwayslink = 1,
linkstatic = envoy_linkstatic(),
strip_include_prefix = strip_include_prefix,
defines = defines,
)

# Intended for usage by external consumers. This allows them to disambiguate
Expand Down
9 changes: 8 additions & 1 deletion bazel/external/quiche.BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,8 @@ quiche_common_copts = [
]

quiche_copts = select({
"@envoy//bazel:windows_x86_64": [],
# Ignore unguarded #pragma GCC statements in QUICHE sources
"@envoy//bazel:windows_x86_64": ["-wd4068"],
# Remove these after upstream fix.
"@envoy//bazel:gcc_build": [
"-Wno-sign-compare",
Expand Down Expand Up @@ -2244,6 +2245,12 @@ envoy_cc_library(
"quiche/quic/core/frames/quic_window_update_frame.h",
],
copts = quiche_copts,
# TODO: Work around initializer in anonymous union in fastbuild build.
# Remove this after upstream fix.
defines = select({
"@envoy//bazel:windows_x86_64": ["QUIC_FRAME_DEBUG=0"],
"//conditions:default": [],
}),
repository = "@envoy",
tags = ["nofips"],
visibility = ["//visibility:public"],
Expand Down
4 changes: 0 additions & 4 deletions source/extensions/quic_listeners/quiche/BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -375,13 +375,9 @@ envoy_cc_extension(
# QUICHE can't build against FIPS BoringSSL until the FIPS build
# is on a new enough version to have QUIC support. Remove it from
# the build until then. Re-enable as part of #7433.
#
# QUICHE doesn't compile on Windows right now. Disable until it
# is fixed.
deps = select({
"//bazel:boringssl_fips": [],
"//bazel:boringssl_disabled": [],
"//bazel:windows_x86_64": [],
"//conditions:default": [
":active_quic_listener_config_lib",
":codec_lib",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,15 +4,18 @@

#include "extensions/quic_listeners/quiche/envoy_quic_alarm.h"

#if defined(__GNUC__)
#pragma GCC diagnostic push

// QUICHE allows unused parameters.
#pragma GCC diagnostic ignored "-Wunused-parameter"
#endif

#include "quiche/quic/core/quic_alarm_factory.h"
#include "quiche/quic/core/quic_arena_scoped_ptr.h"
#include "quiche/quic/core/quic_one_block_arena.h"

#if defined(__GNUC__)
#pragma GCC diagnostic pop
#endif

namespace Envoy {
namespace Quic {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,8 @@ void EnvoyQuicClientConnection::setUpConnectionSocket() {
if (connectionSocket()->ioHandle().isOpen()) {
file_event_ = connectionSocket()->ioHandle().createFileEvent(
dispatcher_, [this](uint32_t events) -> void { onFileEvent(events); },
Event::FileTriggerType::Edge, Event::FileReadyType::Read | Event::FileReadyType::Write);
Event::PlatformDefaultTriggerType,
Event::FileReadyType::Read | Event::FileReadyType::Write);

if (!Network::Socket::applyOptions(connectionSocket()->options(), *connectionSocket(),
envoy::config::core::v3::SocketOption::STATE_LISTENING)) {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,15 +1,17 @@
#pragma once

#if defined(__GNUC__)
#pragma GCC diagnostic push
// QUICHE allows unused parameters.
#pragma GCC diagnostic ignored "-Wunused-parameter"
// QUICHE uses offsetof().
#pragma GCC diagnostic ignored "-Winvalid-offsetof"
#pragma GCC diagnostic ignored "-Wtype-limits"
#endif

#include "quiche/quic/core/http/quic_spdy_client_session.h"

#if defined(__GNUC__)
#pragma GCC diagnostic pop
#endif

#include "extensions/quic_listeners/quiche/envoy_quic_client_stream.h"
#include "extensions/quic_listeners/quiche/envoy_quic_client_connection.h"
Expand Down
Original file line number Diff line number Diff line change
@@ -1,17 +1,19 @@
#include "extensions/quic_listeners/quiche/envoy_quic_client_stream.h"

#if defined(__GNUC__)
#pragma GCC diagnostic push
// QUICHE allows unused parameters.
#pragma GCC diagnostic ignored "-Wunused-parameter"
// QUICHE uses offsetof().
#pragma GCC diagnostic ignored "-Winvalid-offsetof"
#endif

#include "quiche/quic/core/quic_session.h"
#include "quiche/quic/core/http/quic_header_list.h"
#include "quiche/spdy/core/spdy_header_block.h"
#include "extensions/quic_listeners/quiche/platform/quic_mem_slice_span_impl.h"

#if defined(__GNUC__)
#pragma GCC diagnostic pop
#endif

#include "extensions/quic_listeners/quiche/envoy_quic_utils.h"
#include "extensions/quic_listeners/quiche/envoy_quic_client_session.h"
Expand Down
Original file line number Diff line number Diff line change
@@ -1,13 +1,16 @@
#pragma once

#if defined(__GNUC__)
#pragma GCC diagnostic push
// QUICHE allows unused parameters.
#pragma GCC diagnostic ignored "-Wunused-parameter"
// QUICHE uses offsetof().
#pragma GCC diagnostic ignored "-Winvalid-offsetof"
#endif

#include "quiche/quic/core/http/quic_spdy_client_stream.h"

#if defined(__GNUC__)
#pragma GCC diagnostic pop
#endif

#include "extensions/quic_listeners/quiche/envoy_quic_stream.h"

Expand Down
Original file line number Diff line number Diff line change
@@ -1,14 +1,16 @@
#pragma once

#if defined(__GNUC__)
#pragma GCC diagnostic push
// QUICHE allows unused parameters.
#pragma GCC diagnostic ignored "-Wunused-parameter"
// QUICHE uses offsetof().
#pragma GCC diagnostic ignored "-Winvalid-offsetof"
#endif

#include "quiche/quic/core/quic_connection.h"

#if defined(__GNUC__)
#pragma GCC diagnostic pop
#endif

#include <memory>

Expand Down
Original file line number Diff line number Diff line change
@@ -1,17 +1,19 @@
#pragma once

#if defined(__GNUC__)
#pragma GCC diagnostic push
// QUICHE allows unused parameters.
#pragma GCC diagnostic ignored "-Wunused-parameter"
// QUICHE uses offsetof().
#pragma GCC diagnostic ignored "-Winvalid-offsetof"
#pragma GCC diagnostic ignored "-Wtype-limits"
#endif

#include "quiche/quic/core/crypto/quic_random.h"
#include "quiche/quic/core/quic_connection.h"
#include "quiche/quic/core/quic_simple_buffer_allocator.h"

#if defined(__GNUC__)
#pragma GCC diagnostic pop
#endif

#include "extensions/quic_listeners/quiche/platform/envoy_quic_clock.h"

Expand Down
Original file line number Diff line number Diff line change
@@ -1,16 +1,18 @@
#pragma once

#if defined(__GNUC__)
#pragma GCC diagnostic push
// QUICHE allows unused parameters.
#pragma GCC diagnostic ignored "-Wunused-parameter"
// QUICHE uses offsetof().
#pragma GCC diagnostic ignored "-Winvalid-offsetof"
#pragma GCC diagnostic ignored "-Wtype-limits"
#endif

#include "quiche/quic/core/quic_dispatcher.h"
#include "quiche/quic/core/quic_utils.h"

#if defined(__GNUC__)
#pragma GCC diagnostic pop
#endif

#include <string>

Expand Down
Original file line number Diff line number Diff line change
@@ -1,14 +1,16 @@
#pragma once

#if defined(__GNUC__)
#pragma GCC diagnostic push
// QUICHE allows unused parameters.
#pragma GCC diagnostic ignored "-Wunused-parameter"
// QUICHE uses offsetof().
#pragma GCC diagnostic ignored "-Winvalid-offsetof"
#endif

#include "quiche/quic/core/quic_packet_writer.h"

#if defined(__GNUC__)
#pragma GCC diagnostic pop
#endif

#include "envoy/network/udp_packet_writer_handler.h"

Expand Down
Original file line number Diff line number Diff line change
@@ -1,12 +1,15 @@
#include "extensions/quic_listeners/quiche/envoy_quic_proof_source_base.h"

#if defined(__GNUC__)
#pragma GCC diagnostic push

// QUICHE allows unused parameters.
#pragma GCC diagnostic ignored "-Wunused-parameter"
#endif

#include "quiche/quic/core/quic_data_writer.h"

#if defined(__GNUC__)
#pragma GCC diagnostic pop
#endif

#include "extensions/quic_listeners/quiche/envoy_quic_utils.h"

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,17 +6,21 @@

#include "absl/strings/str_cat.h"

#if defined(__GNUC__)
#pragma GCC diagnostic push

// QUICHE allows unused parameters.
#pragma GCC diagnostic ignored "-Wunused-parameter"
#endif

#include "quiche/quic/core/crypto/proof_source.h"
#include "quiche/quic/core/quic_versions.h"
#include "quiche/quic/core/crypto/crypto_protocol.h"
#include "quiche/quic/platform/api/quic_reference_counted.h"
#include "quiche/quic/platform/api/quic_socket_address.h"
#include "quiche/common/platform/api/quiche_string_piece.h"

#if defined(__GNUC__)
#pragma GCC diagnostic pop
#endif

#include "openssl/ssl.h"
#include "envoy/network/filter.h"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,17 @@

#include "absl/strings/str_cat.h"

#if defined(__GNUC__)
#pragma GCC diagnostic push

// QUICHE allows unused parameters.
#pragma GCC diagnostic ignored "-Wunused-parameter"
#endif

#include "quiche/quic/core/crypto/proof_verifier.h"
#include "quiche/quic/core/quic_versions.h"

#if defined(__GNUC__)
#pragma GCC diagnostic pop
#endif

#include "common/common/logger.h"

Expand Down
Original file line number Diff line number Diff line change
@@ -1,17 +1,19 @@
#pragma once

#if defined(__GNUC__)
#pragma GCC diagnostic push
// QUICHE allows unused parameters.
#pragma GCC diagnostic ignored "-Wunused-parameter"
// QUICHE uses offsetof().
#pragma GCC diagnostic ignored "-Winvalid-offsetof"
#pragma GCC diagnostic ignored "-Wtype-limits"
#endif

#include "quiche/quic/core/http/quic_server_session_base.h"
#include "quiche/quic/core/quic_crypto_server_stream.h"
#include "quiche/quic/core/tls_server_handshaker.h"

#if defined(__GNUC__)
#pragma GCC diagnostic pop
#endif

#include <memory>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,17 +5,20 @@

#include <memory>

#if defined(__GNUC__)
#pragma GCC diagnostic push
// QUICHE allows unused parameters.
#pragma GCC diagnostic ignored "-Wunused-parameter"
// QUICHE uses offsetof().
#pragma GCC diagnostic ignored "-Winvalid-offsetof"
#endif

#include "quiche/quic/core/http/quic_header_list.h"
#include "quiche/quic/core/quic_session.h"
#include "quiche/spdy/core/spdy_header_block.h"
#include "extensions/quic_listeners/quiche/platform/quic_mem_slice_span_impl.h"

#if defined(__GNUC__)
#pragma GCC diagnostic pop
#endif

#include "extensions/quic_listeners/quiche/envoy_quic_utils.h"
#include "extensions/quic_listeners/quiche/envoy_quic_server_session.h"
Expand Down
Original file line number Diff line number Diff line change
@@ -1,13 +1,16 @@
#pragma once

#if defined(__GNUC__)
#pragma GCC diagnostic push
// QUICHE allows unused parameters.
#pragma GCC diagnostic ignored "-Wunused-parameter"
// QUICHE uses offsetof().
#pragma GCC diagnostic ignored "-Winvalid-offsetof"
#endif

#include "quiche/quic/core/http/quic_spdy_server_stream_base.h"

#if defined(__GNUC__)
#pragma GCC diagnostic pop
#endif

#include "extensions/quic_listeners/quiche/envoy_quic_stream.h"

Expand Down
7 changes: 4 additions & 3 deletions source/extensions/quic_listeners/quiche/envoy_quic_utils.h
Original file line number Diff line number Diff line change
Expand Up @@ -8,16 +8,17 @@
#include "common/network/address_impl.h"
#include "common/network/listen_socket_impl.h"

#if defined(__GNUC__)
#pragma GCC diagnostic push

// QUICHE allows unused parameters.
#pragma GCC diagnostic ignored "-Wunused-parameter"
// QUICHE uses offsetof().
#pragma GCC diagnostic ignored "-Winvalid-offsetof"
#endif

#include "quiche/quic/core/quic_types.h"

#if defined(__GNUC__)
#pragma GCC diagnostic pop
#endif

#include "quiche/quic/core/http/quic_header_list.h"
#include "quiche/quic/core/quic_error_codes.h"
Expand Down
Loading