Skip to content
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

Add luajit-2.1 support in docker image of "envoyproxy/envoy-build-ubuntu" #5283

Closed
wants to merge 3 commits into from
Closed
Show file tree
Hide file tree
Changes from all 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
22 changes: 11 additions & 11 deletions ci/build_container/build_recipes/luajit.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,19 +2,17 @@

set -e

VERSION=2.0.5
SHA256=8bb29d84f06eb23c7ea4aa4794dbb248ede9fcb23b6989cbef81dc79352afc97
VERSION=2.1.0-beta3
SHA256=409f7fe570d3c16558e594421c47bdd130238323c9d6fd6c83dedd2aaeb082a8

curl https://github.com/LuaJIT/LuaJIT/archive/v"$VERSION".tar.gz -sLo LuaJIT-"$VERSION".tar.gz \
&& echo "$SHA256" LuaJIT-"$VERSION".tar.gz | sha256sum --check
tar xf LuaJIT-"$VERSION".tar.gz
cd LuaJIT-"$VERSION"


# Fixup Makefile with things that cannot be set via env var.
cat > ../luajit_make.diff << 'EOF'
cat > luajit_make.diff << 'EOF'
diff --git a/src/Makefile b/src/Makefile
index f7f81a4..e698517 100644
index f56465d..3f4f2fa 100644
--- a/src/Makefile
+++ b/src/Makefile
@@ -27,7 +27,7 @@ NODOTABIVER= 51
Expand All @@ -26,7 +24,7 @@ index f7f81a4..e698517 100644
#
# Use this if you want to force a 32 bit build on a 64 bit multilib OS.
#CC= $(DEFAULT_CC) -m32
@@ -74,10 +74,10 @@ CCWARN= -Wall
@@ -71,10 +71,10 @@ CCWARN= -Wall
# as dynamic mode.
#
# Mixed mode creates a static + dynamic library and a statically linked luajit.
Expand All @@ -39,7 +37,7 @@ index f7f81a4..e698517 100644
#
# Dynamic mode creates a dynamic library and a dynamically linked luajit.
# Note: this executable will only run when the library is installed!
@@ -102,7 +102,7 @@ XCFLAGS=
@@ -99,7 +99,7 @@ XCFLAGS=
# enabled by default. Some other features that *might* break some existing
# code (e.g. __pairs or os.execute() return values) can be enabled here.
# Note: this does not provide full compatibility with Lua 5.2 at this time.
Expand All @@ -48,7 +46,7 @@ index f7f81a4..e698517 100644
#
# Disable the JIT compiler, i.e. turn LuaJIT into a pure interpreter.
#XCFLAGS+= -DLUAJIT_DISABLE_JIT
@@ -564,7 +564,7 @@ endif
@@ -587,7 +587,7 @@ endif

Q= @
E= @echo
Expand All @@ -59,12 +57,14 @@ index f7f81a4..e698517 100644
##############################################################################
EOF

cd LuaJIT-"$VERSION"

if [[ "${OS}" == "Windows_NT" ]]; then
cd src
./msvcbuild.bat debug

mkdir -p "$THIRDPARTY_BUILD/include/luajit-2.0"
cp *.h* "$THIRDPARTY_BUILD/include/luajit-2.0"
mkdir -p "$THIRDPARTY_BUILD/include/luajit-2.1"
cp *.h* "$THIRDPARTY_BUILD/include/luajit-2.1"
cp luajit.lib "$THIRDPARTY_BUILD/lib"
cp *.pdb "$THIRDPARTY_BUILD/lib"
else
Expand Down
4 changes: 2 additions & 2 deletions ci/prebuilt/BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -43,9 +43,9 @@ cc_library(
":windows_x86_64": ["thirdparty_build/lib/luajit.lib"],
"//conditions:default": ["thirdparty_build/lib/libluajit-5.1.a"],
}),
hdrs = glob(["thirdparty_build/include/luajit-2.0/*"]),
hdrs = glob(["thirdparty_build/include/luajit-2.1/*"]),
includes = ["thirdparty_build/include"],
# TODO(mattklein123): We should strip luajit-2.0 here for consumers. However, if we do that
# TODO(mattklein123): We should strip luajit-2.1 here for consumers. However, if we do that
# the headers get included using -I vs. -isystem which then causes old-style-cast warnings.
)

Expand Down
117 changes: 0 additions & 117 deletions source/exe/signal_action.cc

This file was deleted.