From 466c61c4775f3455e0bf2dca3199e5a429a71d80 Mon Sep 17 00:00:00 2001 From: Joao Vitor Lacerda Guimaraes Date: Fri, 16 Oct 2020 18:03:33 -0300 Subject: [PATCH 1/2] use envoy master instead of envoy-wasm envoy-wasm has been merged to envoy https://github.com/envoyproxy/envoy/pull/12546 --- .bazelrc | 2 +- envoy.bazelrc | 31 +++++++++++++++---------------- 2 files changed, 16 insertions(+), 17 deletions(-) diff --git a/.bazelrc b/.bazelrc index ed83766b85d..9be63c88b9c 100644 --- a/.bazelrc +++ b/.bazelrc @@ -3,7 +3,7 @@ # ===================================================================== # Keep envoy.bazelrc up-to-date by run: -# curl -sSL https://raw.githubusercontent.com/envoyproxy/envoy-wasm/master/.bazelrc > envoy.bazelrc +# curl -sSL https://raw.githubusercontent.com/envoyproxy/envoy/master/.bazelrc > envoy.bazelrc import %workspace%/envoy.bazelrc # Overrides workspace_status_command diff --git a/envoy.bazelrc b/envoy.bazelrc index 53940f9526c..dd242a8aacd 100644 --- a/envoy.bazelrc +++ b/envoy.bazelrc @@ -19,7 +19,8 @@ build --host_javabase=@bazel_tools//tools/jdk:remote_jdk11 build --javabase=@bazel_tools//tools/jdk:remote_jdk11 build --enable_platform_specific_config -# Enable position independent code, this option is not supported on Windows and default on on macOS. +# Enable position independent code (this is the default on macOS and Windows) +# (Workaround for https://github.com/bazelbuild/rules_foreign_cc/issues/421) build:linux --copt=-fPIC build:linux --cxxopt=-std=c++17 build:linux --conlyopt=-fexceptions @@ -192,8 +193,6 @@ build:remote --spawn_strategy=remote,sandboxed,local build:remote --strategy=Javac=remote,sandboxed,local build:remote --strategy=Closure=remote,sandboxed,local build:remote --strategy=Genrule=remote,sandboxed,local -# rules_rust is not remote runnable (yet) -build:remote --strategy=Rustc=sandboxed,local build:remote --remote_timeout=7200 build:remote --auth_enabled=true build:remote --remote_download_toplevel @@ -287,27 +286,27 @@ build:windows --define signal_trace=disabled build:windows --define hot_restart=disabled build:windows --define tcmalloc=disabled build:windows --define manual_stamp=manual_stamp +build:windows --cxxopt="/std:c++17" -# Should not be required after upstream fix to bazel, -# and already a no-op to linux/macos builds -# see issue https://github.com/bazelbuild/rules_foreign_cc/issues/301 +# TODO(wrowe,sunjayBhatia): Resolve bugs upstream in curl and rules_foreign_cc +# See issue https://github.com/bazelbuild/rules_foreign_cc/issues/301 build:windows --copt="-DCARES_STATICLIB" build:windows --copt="-DNGHTTP2_STATICLIB" build:windows --copt="-DCURL_STATICLIB" -build:windows --cxxopt="/std:c++17" -# Required to work around build defects on Windows MSVC cl -# Unguarded gcc pragmas in quiche are not recognized by MSVC -build:msvc-cl --copt="/wd4068" -# Allows 'nodiscard' function return values to be discarded -build:msvc-cl --copt="/wd4834" -# Allows inline functions to be undefined -build:msvc-cl --copt="/wd4506" -build:msvc-cl --copt="-D_SILENCE_EXPERIMENTAL_FILESYSTEM_DEPRECATION_WARNING" +# Override any clang preference if building msvc-cl +# Drop the determinism feature (-DDATE etc are a no-op in msvc-cl) +build:msvc-cl --action_env=USE_CLANG_CL="" +build:msvc-cl --define clang_cl=0 +build:msvc-cl --features=-determinism + +# Windows build behaviors when using clang-cl +build:clang-cl --action_env=USE_CLANG_CL=1 +build:clang-cl --define clang_cl=1 # Required to work around Windows clang-cl build defects # Ignore conflicting definitions of _WIN32_WINNT -# Overriding __TIME__ etc is problematic (and is actually an invalid no-op) +# Override determinism flags (DATE etc) is valid on clang-cl compiler build:clang-cl --copt="-Wno-macro-redefined" build:clang-cl --copt="-Wno-builtin-macro-redefined" build:clang-cl --action_env=USE_CLANG_CL=1 From e4119c9cef008255b726c6081e815a5aa0eabcad Mon Sep 17 00:00:00 2001 From: Joao Vitor Lacerda Guimaraes Date: Fri, 16 Oct 2020 18:29:54 -0300 Subject: [PATCH 2/2] use istio/envoy release-1.8 as requested by @bianpengyuan https://github.com/istio/proxy/pull/3055#issuecomment-710650911 --- .bazelrc | 2 +- envoy.bazelrc | 31 ++++++++++++++++--------------- 2 files changed, 17 insertions(+), 16 deletions(-) diff --git a/.bazelrc b/.bazelrc index 9be63c88b9c..dbe485751e2 100644 --- a/.bazelrc +++ b/.bazelrc @@ -3,7 +3,7 @@ # ===================================================================== # Keep envoy.bazelrc up-to-date by run: -# curl -sSL https://raw.githubusercontent.com/envoyproxy/envoy/master/.bazelrc > envoy.bazelrc +# curl -sSL https://raw.githubusercontent.com/istio/envoy/release-1.8/.bazelrc > envoy.bazelrc import %workspace%/envoy.bazelrc # Overrides workspace_status_command diff --git a/envoy.bazelrc b/envoy.bazelrc index dd242a8aacd..53940f9526c 100644 --- a/envoy.bazelrc +++ b/envoy.bazelrc @@ -19,8 +19,7 @@ build --host_javabase=@bazel_tools//tools/jdk:remote_jdk11 build --javabase=@bazel_tools//tools/jdk:remote_jdk11 build --enable_platform_specific_config -# Enable position independent code (this is the default on macOS and Windows) -# (Workaround for https://github.com/bazelbuild/rules_foreign_cc/issues/421) +# Enable position independent code, this option is not supported on Windows and default on on macOS. build:linux --copt=-fPIC build:linux --cxxopt=-std=c++17 build:linux --conlyopt=-fexceptions @@ -193,6 +192,8 @@ build:remote --spawn_strategy=remote,sandboxed,local build:remote --strategy=Javac=remote,sandboxed,local build:remote --strategy=Closure=remote,sandboxed,local build:remote --strategy=Genrule=remote,sandboxed,local +# rules_rust is not remote runnable (yet) +build:remote --strategy=Rustc=sandboxed,local build:remote --remote_timeout=7200 build:remote --auth_enabled=true build:remote --remote_download_toplevel @@ -286,27 +287,27 @@ build:windows --define signal_trace=disabled build:windows --define hot_restart=disabled build:windows --define tcmalloc=disabled build:windows --define manual_stamp=manual_stamp -build:windows --cxxopt="/std:c++17" -# TODO(wrowe,sunjayBhatia): Resolve bugs upstream in curl and rules_foreign_cc -# See issue https://github.com/bazelbuild/rules_foreign_cc/issues/301 +# Should not be required after upstream fix to bazel, +# and already a no-op to linux/macos builds +# see issue https://github.com/bazelbuild/rules_foreign_cc/issues/301 build:windows --copt="-DCARES_STATICLIB" build:windows --copt="-DNGHTTP2_STATICLIB" build:windows --copt="-DCURL_STATICLIB" +build:windows --cxxopt="/std:c++17" -# Override any clang preference if building msvc-cl -# Drop the determinism feature (-DDATE etc are a no-op in msvc-cl) -build:msvc-cl --action_env=USE_CLANG_CL="" -build:msvc-cl --define clang_cl=0 -build:msvc-cl --features=-determinism - -# Windows build behaviors when using clang-cl -build:clang-cl --action_env=USE_CLANG_CL=1 -build:clang-cl --define clang_cl=1 +# Required to work around build defects on Windows MSVC cl +# Unguarded gcc pragmas in quiche are not recognized by MSVC +build:msvc-cl --copt="/wd4068" +# Allows 'nodiscard' function return values to be discarded +build:msvc-cl --copt="/wd4834" +# Allows inline functions to be undefined +build:msvc-cl --copt="/wd4506" +build:msvc-cl --copt="-D_SILENCE_EXPERIMENTAL_FILESYSTEM_DEPRECATION_WARNING" # Required to work around Windows clang-cl build defects # Ignore conflicting definitions of _WIN32_WINNT -# Override determinism flags (DATE etc) is valid on clang-cl compiler +# Overriding __TIME__ etc is problematic (and is actually an invalid no-op) build:clang-cl --copt="-Wno-macro-redefined" build:clang-cl --copt="-Wno-builtin-macro-redefined" build:clang-cl --action_env=USE_CLANG_CL=1