Skip to content

Commit

Permalink
Merge pull request #11235 from pjonsson/docker-enable-lto
Browse files Browse the repository at this point in the history
docker: enable IPO
  • Loading branch information
rouault authored Nov 10, 2024
2 parents d6c168c + 3646323 commit 5f31183
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 2 deletions.
4 changes: 3 additions & 1 deletion docker/ubuntu-full/bh-gdal.sh
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,9 @@ wget -q "https://github.com/${GDAL_REPOSITORY}/archive/${GDAL_VERSION}.tar.gz" \
cd build
# GDAL_USE_TIFF_INTERNAL=ON to use JXL
export GDAL_CMAKE_EXTRA_OPTS=""
if test "${GCC_ARCH}" != "x86_64"; then
if test "${GCC_ARCH}" = "x86_64"; then
export GDAL_CMAKE_EXTRA_OPTS="${GDAL_CMAKE_EXTRA_OPTS} -DENABLE_IPO=ON"
else
export GDAL_CMAKE_EXTRA_OPTS="${GDAL_CMAKE_EXTRA_OPTS} -DPDFIUM_INCLUDE_DIR="
fi
export JAVA_ARCH=""
Expand Down
7 changes: 6 additions & 1 deletion docker/ubuntu-small/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -153,6 +153,11 @@ RUN --mount=type=cache,id=ubuntu-small-gdal,target=$HOME/.cache \
&& if test "x${GDAL_BUILD_IS_RELEASE:-}" = "x"; then \
export GDAL_SHA1SUM=${GDAL_VERSION}; \
fi \
&& if test "${GCC_ARCH}" = "x86_64"; then \
export GDAL_CMAKE_EXTRA_OPTS="-DENABLE_IPO=ON"; \
else \
export GDAL_CMAKE_EXTRA_OPTS=""; \
fi \
&& mkdir gdal \
&& wget -q https://github.com/${GDAL_REPOSITORY}/archive/${GDAL_VERSION}.tar.gz -O - \
| tar xz -C gdal --strip-components=1 \
Expand Down Expand Up @@ -183,7 +188,7 @@ RUN --mount=type=cache,id=ubuntu-small-gdal,target=$HOME/.cache \
-DPROJ_INCLUDE_DIR="/build${PROJ_INSTALL_PREFIX-/usr/local}/include" \
-DPROJ_LIBRARY="/build${PROJ_INSTALL_PREFIX-/usr/local}/lib/libinternalproj.so" \
-DGDAL_USE_TIFF_INTERNAL=ON \
-DGDAL_USE_GEOTIFF_INTERNAL=ON \
-DGDAL_USE_GEOTIFF_INTERNAL=ON ${GDAL_CMAKE_EXTRA_OPTS} \
-DBUILD_TESTING=OFF \
&& ninja \
&& DESTDIR="/build" ninja install \
Expand Down

0 comments on commit 5f31183

Please sign in to comment.