Skip to content

Commit

Permalink
Quickjs build
Browse files Browse the repository at this point in the history
  • Loading branch information
vincejv committed Nov 8, 2024
1 parent c119e31 commit b12e6fc
Showing 1 changed file with 13 additions and 12 deletions.
25 changes: 13 additions & 12 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -108,14 +108,15 @@ ARG NGINX_USER_UID
ARG NGINX_GROUP_GID
ARG CONFIG
ARG CFLAGS_OPT="-O3 -pipe -fomit-frame-pointer -march=sandybridge"
ARG LDFLAGS_OPT="-O3 -Wl,--strip-all -Wl,--as-needed"

ENV VERSION_OPENSSL=openssl-3.4.0 \
SHA256_OPENSSL=e15dda82fe2fe8139dc2ac21a36d4ca01d5313c75f99f46c4e8a27709b7294bf \
SOURCE_OPENSSL=https://github.com/openssl/openssl/releases/download/ \
CFLAGS="$CFLAGS_OPT" \
CXXFLAGS="$CFLAGS_OPT" \
CPPFLAGS="$CFLAGS_OPT" \
LDFLAGS="-O3 -Wl,--strip-all -Wl,--as-needed" \
LDFLAGS="$LDFLAGS_OPT" \
CC=clang-19 \
CXX=clang++-19

Expand Down Expand Up @@ -211,15 +212,15 @@ RUN \
&& git clone https://github.com/tokers/zstd-nginx-module /usr/src/zstd-nginx-module && cd /usr/src/zstd-nginx-module && git checkout ${ZSTDNGINX_COMMIT}

# QuickJS (njs dependency)
# RUN \
# echo "Cloning and configuring QuickJS ..." \
# && mkdir /usr/src/quickjs \
# && cd /usr/src/quickjs \
# && git init \
# && git remote add origin https://github.com/bellard/quickjs.git \
# && git fetch --depth 1 origin ${QUICKJS_COMMIT} \
# && git checkout -q FETCH_HEAD \
# && CFLAGS='-fPIC' make libquickjs.a
RUN \
echo "Cloning and configuring QuickJS ..." \
&& mkdir /usr/src/quickjs \
&& cd /usr/src/quickjs \
&& git init \
&& git remote add origin https://github.com/bellard/quickjs.git \
&& git fetch --depth 1 origin ${QUICKJS_COMMIT} \
&& git checkout -q FETCH_HEAD \
&& CFLAGS='-fPIC' make libquickjs.a

RUN \
echo "Cloning and configuring njs ..." \
Expand All @@ -229,8 +230,8 @@ RUN \
&& git remote add origin https://github.com/nginx/njs.git \
&& git fetch --depth 1 origin ${NJS_COMMIT} \
&& git checkout -q FETCH_HEAD \
&& ./configure \
&& make njs \
&& ./configure --with-quickjs \
&& CFLAGS="$CFLAGS_OPT -Iquickjs" LDFLAGS="$LDFLAGS_OPT -Lquickjs" make njs \
&& mv /usr/src/njs/build/njs /usr/sbin/njs \
&& echo "njs v$(njs -v)"

Expand Down

0 comments on commit b12e6fc

Please sign in to comment.