Skip to content

Commit

Permalink
Merge remote-tracking branch 'upstream/release/v1.15' into release-1.7
Browse files Browse the repository at this point in the history
  • Loading branch information
jwendell committed Jul 21, 2020
2 parents 1839806 + a1b8c4f commit cdf7bbe
Show file tree
Hide file tree
Showing 66 changed files with 1,293 additions and 1,383 deletions.
4 changes: 0 additions & 4 deletions WORKSPACE
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,3 @@ envoy_dependencies_extra()
load("//bazel:dependency_imports.bzl", "envoy_dependency_imports")

envoy_dependency_imports()

load("@rules_antlr//antlr:deps.bzl", "antlr_dependencies")

antlr_dependencies(471)
10 changes: 0 additions & 10 deletions bazel/BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -248,16 +248,6 @@ config_setting(
values = {"define": "quiche=enabled"},
)

config_setting(
name = "wasm_all",
values = {"define": "wasm=enabled"},
)

config_setting(
name = "wasm_wavm",
values = {"define": "wasm=wavm"},
)

# Alias pointing to the selected version of BoringSSL:
# - BoringSSL FIPS from @boringssl_fips//:ssl,
# - non-FIPS BoringSSL from @boringssl//:ssl.
Expand Down
2 changes: 2 additions & 0 deletions bazel/dependency_imports.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ load("@build_bazel_rules_apple//apple:repositories.bzl", "apple_rules_dependenci
load("@upb//bazel:repository_defs.bzl", upb_bazel_version_repository = "bazel_version_repository")
load("@config_validation_pip3//:requirements.bzl", config_validation_pip_install = "pip_install")
load("@protodoc_pip3//:requirements.bzl", protodoc_pip_install = "pip_install")
load("@rules_antlr//antlr:deps.bzl", "antlr_dependencies")

# go version for rules_go
GO_VERSION = "1.14.4"
Expand All @@ -18,6 +19,7 @@ def envoy_dependency_imports(go_version = GO_VERSION):
gazelle_dependencies()
apple_rules_dependencies()
upb_bazel_version_repository(name = "upb_bazel_version")
antlr_dependencies(471)

go_repository(
name = "org_golang_google_grpc",
Expand Down
2 changes: 0 additions & 2 deletions bazel/envoy_build_system.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@ load(
_envoy_select_boringssl = "envoy_select_boringssl",
_envoy_select_google_grpc = "envoy_select_google_grpc",
_envoy_select_hot_restart = "envoy_select_hot_restart",
_envoy_select_wasm_wavm = "envoy_select_wasm_wavm",
)
load(
":envoy_test.bzl",
Expand Down Expand Up @@ -169,7 +168,6 @@ def envoy_google_grpc_external_deps():
envoy_select_boringssl = _envoy_select_boringssl
envoy_select_google_grpc = _envoy_select_google_grpc
envoy_select_hot_restart = _envoy_select_hot_restart
envoy_select_wasm_wavm = _envoy_select_wasm_wavm

# Binary wrappers (from envoy_binary.bzl)
envoy_cc_binary = _envoy_cc_binary
Expand Down
8 changes: 0 additions & 8 deletions bazel/envoy_select.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -31,11 +31,3 @@ def envoy_select_hot_restart(xs, repository = ""):
repository + "//bazel:disable_hot_restart_or_apple": [],
"//conditions:default": xs,
})

# Selects the given values depending on the WASM runtimes enabled in the current build.
def envoy_select_wasm_wavm(xs):
return select({
"@envoy//bazel:wasm_all": xs,
"@envoy//bazel:wasm_wavm": xs,
"//conditions:default": [],
})
127 changes: 0 additions & 127 deletions bazel/foreign_cc/BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -189,106 +189,6 @@ envoy_cmake_external(
}),
)

envoy_cmake_external(
name = "llvm",
cache_entries = {
# Disable both: BUILD and INCLUDE, since some of the INCLUDE
# targets build code instead of only generating build files.
"LLVM_BUILD_DOCS": "off",
"LLVM_INCLUDE_DOCS": "off",
"LLVM_BUILD_EXAMPLES": "off",
"LLVM_INCLUDE_EXAMPLES": "off",
"LLVM_BUILD_RUNTIME": "off",
"LLVM_BUILD_RUNTIMES": "off",
"LLVM_INCLUDE_RUNTIMES": "off",
"LLVM_BUILD_TESTS": "off",
"LLVM_INCLUDE_TESTS": "off",
"LLVM_BUILD_TOOLS": "off",
"LLVM_INCLUDE_TOOLS": "off",
"LLVM_BUILD_UTILS": "off",
"LLVM_INCLUDE_UTILS": "off",
"LLVM_ENABLE_LIBEDIT": "off",
"LLVM_ENABLE_LIBXML2": "off",
"LLVM_ENABLE_TERMINFO": "off",
"LLVM_ENABLE_ZLIB": "off",
"LLVM_TARGETS_TO_BUILD": "X86",
"CMAKE_CXX_COMPILER_FORCED": "on",
# Workaround for the issue with statically linked libstdc++
# using -l:libstdc++.a.
"CMAKE_CXX_FLAGS": "-lstdc++",
},
env_vars = {
# Workaround for the -DDEBUG flag added in fastbuild on macOS,
# which conflicts with DEBUG macro used in LLVM.
"CFLAGS": "-UDEBUG",
"CXXFLAGS": "-UDEBUG",
"ASMFLAGS": "-UDEBUG",
},
lib_source = "@org_llvm_llvm//:all",
static_libraries = select({
"//conditions:default": [
# Order from llvm-config --libnames.
"libLLVMLTO.a",
"libLLVMPasses.a",
"libLLVMObjCARCOpts.a",
"libLLVMSymbolize.a",
"libLLVMDebugInfoPDB.a",
"libLLVMDebugInfoDWARF.a",
"libLLVMFuzzMutate.a",
"libLLVMTableGen.a",
"libLLVMDlltoolDriver.a",
"libLLVMLineEditor.a",
"libLLVMOrcJIT.a",
"libLLVMCoverage.a",
"libLLVMMIRParser.a",
"libLLVMObjectYAML.a",
"libLLVMLibDriver.a",
"libLLVMOption.a",
"libLLVMWindowsManifest.a",
"libLLVMX86Disassembler.a",
"libLLVMX86AsmParser.a",
"libLLVMX86CodeGen.a",
"libLLVMGlobalISel.a",
"libLLVMSelectionDAG.a",
"libLLVMAsmPrinter.a",
"libLLVMDebugInfoCodeView.a",
"libLLVMDebugInfoMSF.a",
"libLLVMX86Desc.a",
"libLLVMMCDisassembler.a",
"libLLVMX86Info.a",
"libLLVMX86AsmPrinter.a",
"libLLVMX86Utils.a",
"libLLVMMCJIT.a",
"libLLVMInterpreter.a",
"libLLVMExecutionEngine.a",
"libLLVMRuntimeDyld.a",
"libLLVMCodeGen.a",
"libLLVMTarget.a",
"libLLVMCoroutines.a",
"libLLVMipo.a",
"libLLVMInstrumentation.a",
"libLLVMVectorize.a",
"libLLVMScalarOpts.a",
"libLLVMLinker.a",
"libLLVMIRReader.a",
"libLLVMAsmParser.a",
"libLLVMInstCombine.a",
"libLLVMTransformUtils.a",
"libLLVMBitWriter.a",
"libLLVMAnalysis.a",
"libLLVMProfileData.a",
"libLLVMObject.a",
"libLLVMMCParser.a",
"libLLVMMC.a",
"libLLVMBitReader.a",
"libLLVMCore.a",
"libLLVMBinaryFormat.a",
"libLLVMSupport.a",
"libLLVMDemangle.a",
],
}),
)

envoy_cmake_external(
name = "nghttp2",
cache_entries = {
Expand All @@ -308,33 +208,6 @@ envoy_cmake_external(
}),
)

envoy_cmake_external(
name = "wavm",
cache_entries = {
"LLVM_DIR": "$EXT_BUILD_DEPS/copy_llvm/llvm/lib/cmake/llvm",
"WAVM_ENABLE_STATIC_LINKING": "on",
"WAVM_ENABLE_RELEASE_ASSERTS": "on",
# Workaround for the issue with statically linked libstdc++
# using -l:libstdc++.a.
"CMAKE_CXX_FLAGS": "-lstdc++ -Wno-unused-command-line-argument",
},
env_vars = {
# Workaround for the -DDEBUG flag added in fastbuild on macOS,
# which conflicts with DEBUG macro used in LLVM.
"CFLAGS": "-UDEBUG",
"CXXFLAGS": "-UDEBUG",
"ASMFLAGS": "-UDEBUG",
},
lib_source = "@com_github_wavm_wavm//:all",
static_libraries = select({
"//conditions:default": [
"libWAVM.a",
"libWAVMUnwind.a",
],
}),
deps = [":llvm"],
)

envoy_cmake_external(
name = "yaml",
cache_entries = {
Expand Down
12 changes: 0 additions & 12 deletions bazel/repositories.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -881,18 +881,6 @@ def _org_llvm_llvm():
actual = "@envoy//bazel/foreign_cc:llvm",
)

def _com_github_wavm_wavm():
location = REPOSITORY_LOCATIONS["com_github_wavm_wavm"]
http_archive(
name = "com_github_wavm_wavm",
build_file_content = BUILD_ALL_CONTENT,
**location
)
native.bind(
name = "wavm",
actual = "@envoy//bazel/foreign_cc:wavm",
)

def _kafka_deps():
# This archive contains Kafka client source code.
# We are using request/response message format files to generate parser code.
Expand Down
34 changes: 10 additions & 24 deletions bazel/repository_locations.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -95,10 +95,10 @@ DEPENDENCY_REPOSITORIES = dict(
cpe = "N/A",
),
com_google_absl = dict(
sha256 = "cd477bfd0d19f803f85d118c7943b7908930310d261752730afa981118fee230",
strip_prefix = "abseil-cpp-ca9856cabc23d771bcce634677650eb6fc4363ae",
# 2020-04-30
urls = ["https://github.com/abseil/abseil-cpp/archive/ca9856cabc23d771bcce634677650eb6fc4363ae.tar.gz"],
sha256 = "ec8ef47335310cc3382bdc0d0cc1097a001e67dc83fcba807845aa5696e7e1e4",
strip_prefix = "abseil-cpp-302b250e1d917ede77b5ff00a6fd9f28430f1563",
# 2020-07-13
urls = ["https://github.com/abseil/abseil-cpp/archive/302b250e1d917ede77b5ff00a6fd9f28430f1563.tar.gz"],
use_category = ["dataplane", "controlplane"],
cpe = "N/A",
),
Expand Down Expand Up @@ -387,20 +387,6 @@ DEPENDENCY_REPOSITORIES = dict(
urls = ["https://files.pythonhosted.org/packages/dd/bf/4138e7bfb757de47d1f4b6994648ec67a51efe58fa907c1e11e350cddfca/six-1.12.0.tar.gz"],
use_category = ["other"],
),
org_llvm_llvm = dict(
sha256 = "44787a6d02f7140f145e2250d56c9f849334e11f9ae379827510ed72f12b75e7",
strip_prefix = "llvm-8.0.1.src",
urls = ["https://github.com/llvm/llvm-project/releases/download/llvmorg-8.0.1/llvm-8.0.1.src.tar.xz"],
use_category = ["dataplane"],
cpe = "N/A",
),
com_github_wavm_wavm = dict(
sha256 = "48939906ff44a0e26e2c4c63132eebd75cfd768fac989a874395121e139933ec",
strip_prefix = "WAVM-1ec06cd202a922015c9041c5ed84f875453c4dc7",
urls = ["https://github.com/WAVM/WAVM/archive/1ec06cd202a922015c9041c5ed84f875453c4dc7.tar.gz"],
use_category = ["dataplane"],
cpe = "N/A",
),
io_opencensus_cpp = dict(
sha256 = "193ffb4e13bd7886757fd22b61b7f7a400634412ad8e7e1071e73f57bedd7fc6",
strip_prefix = "opencensus-cpp-04ed0211931f12b03c1a76b3907248ca4db7bc90",
Expand Down Expand Up @@ -502,16 +488,16 @@ DEPENDENCY_REPOSITORIES = dict(
use_category = ["test"],
),
proxy_wasm_cpp_sdk = dict(
sha256 = "76f4d8e8a41b59668272e58e68ded1661a0f9c1672bdab8673a076ebf20d1fe5",
strip_prefix = "proxy-wasm-cpp-sdk-35163bbf32fccfbde7b95d909a392dc1dc562596",
urls = ["https://github.com/proxy-wasm/proxy-wasm-cpp-sdk/archive/35163bbf32fccfbde7b95d909a392dc1dc562596.tar.gz"],
sha256 = "eba429ae0068508c4c20980803fd20b991c3d5d1604e8ef61ac8cb309e6867ed",
strip_prefix = "proxy-wasm-cpp-sdk-4ee6ace4fe529b9fdbffa76f34eb6deffe72c1a2",
urls = ["https://github.com/proxy-wasm/proxy-wasm-cpp-sdk/archive/4ee6ace4fe529b9fdbffa76f34eb6deffe72c1a2.tar.gz"],
use_category = ["dataplane"],
cpe = "N/A",
),
proxy_wasm_cpp_host = dict(
sha256 = "3148cbf247aaf416af1c32ba525acc6d12ff4b92a08e24f7c875b54c44866c86",
strip_prefix = "proxy-wasm-cpp-host-b6c4b8183afaada2cd4b6c79948d72b9426952f8",
urls = ["https://github.com/proxy-wasm/proxy-wasm-cpp-host/archive/b6c4b8183afaada2cd4b6c79948d72b9426952f8.tar.gz"],
sha256 = "a93aabeed810ef65078aeb6f10f9594c74ce131a5c1bdb064b1a6e92a36d8b78",
strip_prefix = "proxy-wasm-cpp-host-646d814b32692e2c40a8bd97cd3a100fb97dfb26",
urls = ["https://github.com/proxy-wasm/proxy-wasm-cpp-host/archive/646d814b32692e2c40a8bd97cd3a100fb97dfb26.tar.gz"],
use_category = ["dataplane"],
cpe = "N/A",
),
Expand Down
2 changes: 1 addition & 1 deletion bazel/wasm/wasm.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ load("@rules_cc//cc:defs.bzl", "cc_binary")

def _wasm_transition_impl(settings, attr):
return {
"//command_line_option:cpu": "wasm",
"//command_line_option:cpu": "wasm32",
"//command_line_option:crosstool_top": "@proxy_wasm_cpp_sdk//toolchain:emscripten",

# Overriding copt/cxxopt/linkopt to prevent sanitizers/coverage options leak
Expand Down
2 changes: 1 addition & 1 deletion include/envoy/common/platform.h
Original file line number Diff line number Diff line change
Expand Up @@ -223,7 +223,7 @@ typedef int os_fd_t;
// Therefore, we decided to remove the Android check introduced here in
// https://github.com/envoyproxy/envoy/pull/10120. If someone out there encounters problems with
// this please bring up in Envoy's slack channel #envoy-udp-quic-dev.
#if defined(__linux__)
#if defined(__linux__) || defined(__EMSCRIPTEN__)
#define ENVOY_MMSG_MORE 1
#else
#define ENVOY_MMSG_MORE 0
Expand Down
12 changes: 5 additions & 7 deletions source/extensions/common/wasm/BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ load(
"//bazel:envoy_build_system.bzl",
"envoy_cc_library",
"envoy_package",
"envoy_proto_library",
)

licenses(["notice"]) # Apache 2
Expand All @@ -23,14 +22,17 @@ envoy_cc_library(
hdrs = [
"context.h",
"wasm.h",
"wasm_extension.h",
"wasm_state.h",
"wasm_vm.h",
],
deps = [
":well_known_names",
"//include/envoy/http:codes_interface",
"//include/envoy/http:filter_interface",
"//include/envoy/server:lifecycle_notifier_interface",
"//include/envoy/upstream:cluster_manager_interface",
"//source/common/common:version_includes",
"//source/common/config:datasource_lib",
"//source/common/singleton:const_singleton",
"//source/common/stats:stats_lib",
Expand Down Expand Up @@ -67,10 +69,10 @@ envoy_cc_library(
"context.cc",
"foreign.cc",
"wasm.cc",
"wasm_extension.cc",
"wasm_vm.cc",
],
deps = [
":declare_property_cc_proto",
":wasm_hdr",
":wasm_interoperation_lib",
"//external:abseil_base",
Expand All @@ -82,6 +84,7 @@ envoy_cc_library(
"//source/common/http:message_lib",
"//source/common/http:utility_lib",
"//source/common/tracing:http_tracer_lib",
"//source/extensions/common/wasm/ext:declare_property_cc_proto",
"//source/extensions/common/wasm/ext:envoy_null_vm_wasm_api",
"//source/extensions/filters/common/expr:context_lib",
"@com_google_cel_cpp//eval/eval:field_access",
Expand All @@ -96,8 +99,3 @@ envoy_cc_library(
"@proxy_wasm_cpp_host//:lib",
],
)

envoy_proto_library(
name = "declare_property",
srcs = ["declare_property.proto"],
)
2 changes: 1 addition & 1 deletion source/extensions/common/wasm/context.cc
Original file line number Diff line number Diff line change
Expand Up @@ -299,7 +299,7 @@ enum class PropertyToken { PROPERTY_TOKENS(_DECLARE) };

#define _PAIR(_t) {downCase(#_t), PropertyToken::_t},
static absl::flat_hash_map<std::string, PropertyToken> property_tokens = {PROPERTY_TOKENS(_PAIR)};
#undef _PARI
#undef _PAIR

absl::optional<google::api::expr::runtime::CelValue>
Context::findValue(absl::string_view name, Protobuf::Arena* arena, bool last) const {
Expand Down
Loading

0 comments on commit cdf7bbe

Please sign in to comment.