-
Notifications
You must be signed in to change notification settings - Fork 5.3k
windows: fix Envoy build on Windows #42687
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Closed
Closed
Changes from all commits
Commits
Show all changes
26 commits
Select commit
Hold shift + click to select a range
080845b
Fix Envoy build on Windows
anuraaga 6fcbc41
Remove redundant move
anuraaga 8b02976
Lints
anuraaga cd0e20d
Simplify cel-cpp patch
anuraaga d42ba51
Simplify protoconverter patch
anuraaga e0bfb72
Move script to windows folder
anuraaga 4d1fee3
Simplify luajit patch
anuraaga 2ce46e6
Formatting
anuraaga e05b8fd
Preserve trailing whitespace
anuraaga f1dc4f8
luajit incremental link
anuraaga db16aa1
Remove leftover rule
anuraaga 7e8341b
Merge branch 'main' of https://github.com/envoyproxy/envoy into fix-w…
anuraaga ec35983
Merge branch 'main' of https://github.com/envoyproxy/envoy into fix-w…
anuraaga c6f5fc6
Add network filter to dep allowlist.
anuraaga e04dab6
Separate windows patches
anuraaga 3766659
Cleanup containers.bzl
anuraaga 95bb385
Formatting
anuraaga a60d4d5
Restore luajit compile flags
anuraaga 0774afa
Merge branch 'main' of https://github.com/envoyproxy/envoy into fix-w…
anuraaga d94d500
Filter reverse_tunnel from windows build
anuraaga e8b89e6
Revert reverse_tunnel
anuraaga f1c99d2
More extensions
anuraaga b1e4e71
Remove mapping RECVTOS to ECN on Windows
anuraaga 646541d
More extensions
anuraaga a778915
more filter
anuraaga fe412a0
Disable clusters.reverse_connection
anuraaga File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Some comments aren't visible on the classic Files Changed page.
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,29 @@ | ||
| diff --git a/build_defs/BUILD.bazel b/build_defs/BUILD.bazel | ||
| index 732514d..a6be18b 100644 | ||
| --- a/build_defs/BUILD.bazel | ||
| +++ b/build_defs/BUILD.bazel | ||
| @@ -13,10 +13,23 @@ package( | ||
| ) | ||
|
|
||
| create_compiler_config_setting( | ||
| - name = "config_msvc", | ||
| + name = "config_msvc_cl", | ||
| value = "msvc-cl", | ||
| ) | ||
|
|
||
| +create_compiler_config_setting( | ||
| + name = "config_clang_cl", | ||
| + value = "clang-cl", | ||
| +) | ||
| + | ||
| +selects.config_setting_group( | ||
| + name = "config_msvc", | ||
| + match_any = [ | ||
| + ":config_clang_cl", | ||
| + ":config_msvc_cl", | ||
| + ], | ||
| +) | ||
| + | ||
| config_setting( | ||
| name = "aarch64", | ||
| values = {"cpu": "linux-aarch_64"}, |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,63 @@ | ||
| diff --git a/luajit_build_win.sh b/luajit_build_win.sh | ||
| new file mode 100755 | ||
| index 00000000..c6267893 | ||
| --- /dev/null | ||
| +++ b/luajit_build_win.sh | ||
| @@ -0,0 +1,38 @@ | ||
| +#!/bin/bash | ||
| + | ||
| +set -e | ||
| + | ||
| +PREFIX="" | ||
| +while [[ $# -gt 0 ]]; do | ||
| + case $1 in | ||
| + --prefix=*) | ||
| + PREFIX="${1#*=}" | ||
| + shift | ||
| + ;; | ||
| + --prefix) | ||
| + PREFIX="$2" | ||
| + shift 2 | ||
| + ;; | ||
| + *) | ||
| + shift | ||
| + ;; | ||
| + esac | ||
| +done | ||
| + | ||
| +# Copy source tree to a build directory | ||
| +SRC_DIR="$(dirname "$(realpath "$0")")" | ||
| +BUILD_DIR="$(basename "$SRC_DIR")" | ||
| +cp -r "$SRC_DIR" "$BUILD_DIR" | ||
| +cd "$BUILD_DIR" | ||
| + | ||
| +cd src | ||
| +./msvcbuild.bat static | ||
| + | ||
| +mkdir -p "$PREFIX/lib" | ||
| +cp lua51.lib "$PREFIX/lib" | ||
| +mkdir -p "$PREFIX/include/luajit-2.1" | ||
| +for header in lauxlib.h luaconf.h lua.h lua.hpp luajit.h lualib.h; do | ||
| + cp "$header" "$PREFIX/include/luajit-2.1" | ||
| +done | ||
| +mkdir -p "$PREFIX/bin" | ||
| +cp luajit.exe "$PREFIX/bin" | ||
| diff --git a/src/msvcbuild.bat b/src/msvcbuild.bat | ||
| index d6aed170..42604601 100644 | ||
| --- a/src/msvcbuild.bat | ||
| +++ b/src/msvcbuild.bat | ||
| @@ -18,9 +18,11 @@ | ||
| @rem Add more debug flags here, e.g. DEBUGCFLAGS=/DLUA_USE_ASSERT | ||
| @set DEBUGCFLAGS= | ||
| @set LJCOMPILE=cl /nologo /c /O2 /W3 /D_CRT_SECURE_NO_DEPRECATE /D_CRT_STDIO_INLINE=__declspec(dllexport)__inline | ||
| -@set LJDYNBUILD=/DLUA_BUILD_AS_DLL /MD | ||
| -@set LJDYNBUILD_DEBUG=/DLUA_BUILD_AS_DLL /MDd | ||
| -@set LJCOMPILETARGET=/Zi | ||
| +@rem Use MT to match flags set by bazel for static build | ||
| +@set LJDYNBUILD=/DLUA_BUILD_AS_DLL /MT | ||
| +@set LJDYNBUILD_DEBUG=/DLUA_BUILD_AS_DLL /MTd | ||
| +@rem Avoid incremental link which doesn't work with bazel's deletion of intermediate files | ||
| +@set LJCOMPILETARGET=/Z7 | ||
| @set LJLINKTYPE=/DEBUG /RELEASE | ||
| @set LJLINKTYPE_DEBUG=/DEBUG | ||
| @set LJLINKTARGET=/OPT:REF /OPT:ICF /INCREMENTAL:NO | ||
|
Comment on lines
+50
to
+63
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. If we need additional patch for these extensions (lua, protocolconverter related) works, could we just compile it out rather then add additional patches? |
||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.