Skip to content
This repository was archived by the owner on Apr 10, 2025. It is now read-only.

Commit c6527f3

Browse files
authored
Update Envoy to a2ebf092025e64f1b452a8bdaef13795677bceef (#2027)
Signed-off-by: Otto van der Schaaf <[email protected]>
1 parent 66ee9f9 commit c6527f3

File tree

4 files changed

+17
-24
lines changed

4 files changed

+17
-24
lines changed

.bazelrc

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -270,11 +270,7 @@ build:plain-fuzzer --define=FUZZING_ENGINE=libfuzzer
270270
build:plain-fuzzer --define ENVOY_CONFIG_ASAN=1
271271

272272
# Compile database generation config
273-
# We don't care about built binaries so always strip and use fastbuild.
274-
build:compdb -c fastbuild
275-
build:compdb --strip=always
276273
build:compdb --build_tag_filters=-nocompdb
277-
build:compdb --define=ENVOY_CONFIG_COMPILATION_DATABASE=1
278274

279275
# Windows build quirks
280276
build:windows --action_env=TMPDIR

bazel/repositories.bzl

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ load(":aprutil.bzl", "aprutil_build_rule")
1313
load(":serf.bzl", "serf_build_rule")
1414
load(":closure_compiler.bzl", "closure_library_rules")
1515

16-
ENVOY_COMMIT = "a2ebf092025e64f1b452a8bdaef13795677bceef" # July 31st, 2020
16+
ENVOY_COMMIT = "c2b0d37ca5b40b71ce48984f2cf5984297b79a71" # August 5th, 2020
1717
BROTLI_COMMIT = "d6d98957ca8ccb1ef45922e978bb10efca0ea541"
1818
HIREDIS_COMMIT = "0.14.1" # July 24th, 2020
1919
JSONCPP_COMMIT = "1.9.3" # July 24th, 2020
@@ -44,7 +44,7 @@ def mod_pagespeed_dependencies():
4444
name = "envoy",
4545
strip_prefix = "envoy-%s" % ENVOY_COMMIT,
4646
url = "https://github.com/envoyproxy/envoy/archive/%s.tar.gz" % ENVOY_COMMIT,
47-
sha256 = "1fcb9ffa174e4d3d65c9c8b2805d9b4470c18051c60c0e80631d3e534ef0c6ab",
47+
sha256 = "4877904623560ada549b92fd117c94727b3226a5482631a16d33a20ba19d5d23",
4848
)
4949

5050
http_archive(

extensions_build_config.bzl

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,3 +5,8 @@ EXTENSIONS = {
55
"envoy.filters.network.http_connection_manager": "//source/extensions/filters/network/http_connection_manager:config",
66
"envoy.transport_sockets.raw_buffer": "//source/extensions/transport_sockets/raw_buffer:config",
77
}
8+
9+
# This can be used to extend the visibility rules for Envoy extensions
10+
# (//:extension_config and //:extension_library in //BUILD)
11+
# if downstream Envoy builds need to directly reference envoy extensions.
12+
ADDITIONAL_VISIBILITY = []

tools/gen_compilation_database.py

Lines changed: 10 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -5,33 +5,25 @@
55
import argparse
66
import glob
77
import json
8+
import logging
89
import os
910
import shlex
1011
import subprocess
1112
from pathlib import Path
1213

1314

14-
def runBazelBuildForCompilationDatabase(bazel_options, bazel_targets):
15-
query = 'attr(include_prefix, ".+", kind(cc_library, deps({})))'.format(
16-
' union '.join(bazel_targets))
17-
build_targets = subprocess.check_output(["bazel", "query", query]).decode().splitlines()
18-
subprocess.check_call(["bazel", "build"] + bazel_options + build_targets)
19-
20-
2115
# This method is equivalent to https://github.com/grailbio/bazel-compilation-database/blob/master/generate.sh
2216
def generateCompilationDatabase(args):
23-
# We need to download all remote outputs for generated source code, we don't care about built
24-
# binaries so just always strip and use dynamic link to minimize download size.
17+
# We need to download all remote outputs for generated source code. This option lives here to override those
18+
# specified in bazelrc.
2519
bazel_options = shlex.split(os.environ.get("BAZEL_BUILD_OPTIONS", "")) + [
26-
"-c", "fastbuild", "--build_tag_filters=-manual",
27-
"--experimental_remote_download_outputs=all", "--strip=always"
20+
"--config=compdb",
21+
"--remote_download_outputs=all",
2822
]
29-
if args.run_bazel_build:
30-
runBazelBuildForCompilationDatabase(bazel_options, args.bazel_targets)
3123

3224
subprocess.check_call(["bazel", "build"] + bazel_options + [
3325
"--aspects=@bazel_compdb//:aspects.bzl%compilation_database_aspect",
34-
"--output_groups=compdb_files"
26+
"--output_groups=compdb_files,header_files"
3527
] + args.bazel_targets)
3628

3729
execroot = subprocess.check_output(["bazel", "info", "execution_root"] +
@@ -83,6 +75,9 @@ def modifyCompileCommand(target, args):
8375
if isHeader(target["file"]):
8476
options += " -Wno-pragma-once-outside-header -Wno-unused-const-variable"
8577
options += " -Wno-unused-function"
78+
if not target["file"].startswith("external/"):
79+
# *.h file is treated as C header by default while our headers files are all C++17.
80+
options = "-x c++ -std=c++17 -fexceptions " + options
8681

8782
target["command"] = " ".join([cc, options])
8883
return target
@@ -97,14 +92,11 @@ def fixCompilationDatabase(args, db):
9792

9893
if __name__ == "__main__":
9994
parser = argparse.ArgumentParser(description='Generate JSON compilation database')
100-
parser.add_argument('--run_bazel_build', action='store_true')
10195
parser.add_argument('--include_external', action='store_true')
10296
parser.add_argument('--include_genfiles', action='store_true')
10397
parser.add_argument('--include_headers', action='store_true')
10498
parser.add_argument('--vscode', action='store_true')
10599
# @@@
106-
parser.add_argument('bazel_targets',
107-
nargs='*',
108-
default=["//..."])
100+
parser.add_argument('bazel_targets', nargs='*', default=["//..."])
109101
args = parser.parse_args()
110102
fixCompilationDatabase(args, generateCompilationDatabase(args))

0 commit comments

Comments
 (0)