Skip to content

Commit 5a8a230

Browse files
Allow building libgit2 with Chromium zlib (libgit2#831) (libgit2#833)
This change allows the caller to set the `USE_CHROMIUM_ZLIB=ON` environment variable to use the Chromium implementation of zlib when building libgit2. (cherry picked from commit c6da3b9) Co-authored-by: lhchavez <[email protected]>
1 parent 70e5e41 commit 5a8a230

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

script/build-libgit2.sh

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -61,12 +61,18 @@ else
6161
mkdir -p "${BUILD_PATH}/install/lib"
6262
fi
6363

64+
USE_BUNDLED_ZLIB="ON"
65+
if [ "${USE_CHROMIUM_ZLIB}" = "ON" ]; then
66+
USE_BUNDLED_ZLIB="Chromium"
67+
fi
68+
6469
mkdir -p "${BUILD_PATH}/build" &&
6570
cd "${BUILD_PATH}/build" &&
6671
cmake -DTHREADSAFE=ON \
6772
-DBUILD_CLAR=OFF \
6873
-DBUILD_SHARED_LIBS"=${BUILD_SHARED_LIBS}" \
6974
-DREGEX_BACKEND=builtin \
75+
-DUSE_BUNDLED_ZLIB="${USE_BUNDLED_ZLIB}" \
7076
-DUSE_HTTPS=OFF \
7177
-DUSE_SSH=OFF \
7278
-DCMAKE_C_FLAGS=-fPIC \

0 commit comments

Comments
 (0)