Skip to content

Enable LTO when build with modules. LTO is set for RediSearch and it is enabled by default.#516

Merged
AngelYanev merged 3 commits into
unstablefrom
angelyanev-enable-lto-RED-191923
May 7, 2026
Merged

Enable LTO when build with modules. LTO is set for RediSearch and it is enabled by default.#516
AngelYanev merged 3 commits into
unstablefrom
angelyanev-enable-lto-RED-191923

Conversation

@AngelYanev

@AngelYanev AngelYanev commented Apr 22, 2026

Copy link
Copy Markdown

Note

Medium Risk
Changes the Docker build toolchain and build flags for module-enabled images, which can affect binary size/performance and potentially introduce build/link failures across architectures.

Overview
Enables link-time optimization (LTO) for Redis builds that include modules by exporting LTO=1 when BUILD_WITH_MODULES=yes (Alpine and Debian, including the .j2 templates).

Updates module build toolchain dependencies: Alpine now installs lld21, and Debian switches to installing clang-21/lld-21/llvm-21 from trixie-backports (with a temporary backports source and updated PATH) instead of the default clang package.

Reviewed by Cursor Bugbot for commit 3641366. Bugbot is set up for automated code reviews on this repo. Configure here.

@jit-ci

jit-ci Bot commented Apr 22, 2026

Copy link
Copy Markdown

❌ Jit Scanner failed - Our team is investigating

Jit Scanner failed - Our team has been notified and is working to resolve the issue. Please contact support if you have any questions.


💡 Need to bypass this check? Comment @sera bypass to override.

@cursor cursor Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cursor Bugbot has reviewed your changes and found 1 potential issue.

Fix All in Cursor

❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, have a team admin enable autofix in the Cursor dashboard.

Reviewed by Cursor Bugbot for commit 2cb9533. Configure here.

Comment thread debian/Dockerfile
@AngelYanev
AngelYanev force-pushed the angelyanev-enable-lto-RED-191923 branch from 2cb9533 to a6478d5 Compare May 4, 2026 09:24
@jit-ci

jit-ci Bot commented May 4, 2026

Copy link
Copy Markdown

❌ Jit Scanner failed - Our team is investigating

Jit Scanner failed - Our team has been notified and is working to resolve the issue. Please contact support if you have any questions.


💡 Need to bypass this check? Comment @sera bypass to override.

@AngelYanev
AngelYanev force-pushed the angelyanev-enable-lto-RED-191923 branch from a6478d5 to 51c58ce Compare May 4, 2026 12:58
@jit-ci

jit-ci Bot commented May 4, 2026

Copy link
Copy Markdown

❌ Jit Scanner failed - Our team is investigating

Jit Scanner failed - Our team has been notified and is working to resolve the issue. Please contact support if you have any questions.


💡 Need to bypass this check? Comment @sera bypass to override.

@AngelYanev
AngelYanev force-pushed the angelyanev-enable-lto-RED-191923 branch from 51c58ce to d7894ed Compare May 4, 2026 13:02
@jit-ci

jit-ci Bot commented May 4, 2026

Copy link
Copy Markdown

❌ Jit Scanner failed - Our team is investigating

Jit Scanner failed - Our team has been notified and is working to resolve the issue. Please contact support if you have any questions.


💡 Need to bypass this check? Comment @sera bypass to override.

@AngelYanev
AngelYanev force-pushed the angelyanev-enable-lto-RED-191923 branch from d7894ed to 52f74cb Compare May 4, 2026 13:33
@AngelYanev AngelYanev changed the title WIP: Enable LTO RED-191923 Enable LTO when build with modules. LTO is set for RediSearch and it is enabled by default. May 4, 2026
@jit-ci

jit-ci Bot commented May 4, 2026

Copy link
Copy Markdown

❌ Jit Scanner failed - Our team is investigating

Jit Scanner failed - Our team has been notified and is working to resolve the issue. Please contact support if you have any questions.


💡 Need to bypass this check? Comment @sera bypass to override.

@AngelYanev
AngelYanev force-pushed the angelyanev-enable-lto-RED-191923 branch from 52f74cb to 3d36cb1 Compare May 4, 2026 13:45
@jit-ci

jit-ci Bot commented May 4, 2026

Copy link
Copy Markdown

❌ Jit Scanner failed - Our team is investigating

Jit Scanner failed - Our team has been notified and is working to resolve the issue. Please contact support if you have any questions.


💡 Need to bypass this check? Comment @sera bypass to override.

@AngelYanev
AngelYanev force-pushed the angelyanev-enable-lto-RED-191923 branch from 3d36cb1 to 1777347 Compare May 4, 2026 13:47
@jit-ci

jit-ci Bot commented May 4, 2026

Copy link
Copy Markdown

❌ Jit Scanner failed - Our team is investigating

Jit Scanner failed - Our team has been notified and is working to resolve the issue. Please contact support if you have any questions.


💡 Need to bypass this check? Comment @sera bypass to override.

@AngelYanev AngelYanev changed the title RED-191923 Enable LTO when build with modules. LTO is set for RediSearch and it is enabled by default. Enable LTO when build with modules. LTO is set for RediSearch and it is enabled by default. May 5, 2026
@jit-ci

jit-ci Bot commented May 6, 2026

Copy link
Copy Markdown

❌ Jit Scanner failed - Our team is investigating

Jit Scanner failed - Our team has been notified and is working to resolve the issue. Please contact support if you have any questions.


💡 Need to bypass this check? Comment @sera bypass to override.

@AngelYanev
AngelYanev force-pushed the angelyanev-enable-lto-RED-191923 branch from 74b25e3 to f4582dd Compare May 7, 2026 09:11
@jit-ci

jit-ci Bot commented May 7, 2026

Copy link
Copy Markdown

❌ Jit Scanner failed - Our team is investigating

Jit Scanner failed - Our team has been notified and is working to resolve the issue. Please contact support if you have any questions.


💡 Need to bypass this check? Comment @sera bypass to override.

@AngelYanev
AngelYanev force-pushed the angelyanev-enable-lto-RED-191923 branch from f4582dd to c4b2673 Compare May 7, 2026 09:15
@jit-ci

jit-ci Bot commented May 7, 2026

Copy link
Copy Markdown

❌ Jit Scanner failed - Our team is investigating

Jit Scanner failed - Our team has been notified and is working to resolve the issue. Please contact support if you have any questions.


💡 Need to bypass this check? Comment @sera bypass to override.

Comment thread alpine/Dockerfile.j2 Outdated
Comment thread debian/Dockerfile.j2
The earlier LTO change accidentally turned the closing tag of the
custom_build {% if %} block into a plain {% endif %}, dropping the
trailing-whitespace strip and leaving an extra blank line between the
ARG block and the first RUN in the rendered alpine/Dockerfile when
custom_build=false. Put the dash back and re-render so the Dockerfile
matches the template again.

Co-authored-by: Cursor <cursoragent@cursor.com>
@jit-ci

jit-ci Bot commented May 7, 2026

Copy link
Copy Markdown

❌ Jit Scanner failed - Our team is investigating

Jit Scanner failed - Our team has been notified and is working to resolve the issue. Please contact support if you have any questions.


💡 Need to bypass this check? Comment @sera bypass to override.

@AngelYanev
AngelYanev merged commit 8f27d44 into unstable May 7, 2026
24 of 25 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants