Skip to content

libjpeg-turbo: Improve config files and fix patches#115879

Merged
Repiteo merged 1 commit intogodotengine:masterfrom
akien-mga:libjpeg-turbo-cleanup-config
Feb 5, 2026
Merged

libjpeg-turbo: Improve config files and fix patches#115879
Repiteo merged 1 commit intogodotengine:masterfrom
akien-mga:libjpeg-turbo-cleanup-config

Conversation

@akien-mga
Copy link
Copy Markdown
Member

@akien-mga akien-mga commented Feb 4, 2026

Fixing a few minor issues with the libjpeg-turbo config:

  • My previous sync libjpeg-turbo: Update to 3.1.3 #113945 missed updating some hardcoded version numbers
  • The default BUILD is the date of generating the config, I replaced it with "Godot" (it's used in an info string)
  • Define NO_PUTENV/NO_GETENV, they're only used for niche environment variable hacks to override the SIMD CPU support (which we don't enable anyway) or the default memory manager's max memory.
  • Simplify and improve the HIDDEN and INLINE defines for the 21st century.
  • Set HAVE_INTRIN_H for MSVC.

CC @DanielKinsman

@DanielKinsman
Copy link
Copy Markdown
Contributor

Looks fine to me, sorry for making it a bit of a burden to update with the cmake conversion and patch stuff. I wonder if we could just use cmake in the build process and then use the library files it generates, or at least the headers... that is probably more painful than what we have now though and I guess we hopefully don't need to update it that often.

@akien-mga
Copy link
Copy Markdown
Member Author

akien-mga commented Feb 4, 2026

Using CMake would be a net negative here IMO, as it would add a dependency, and in my experience CMake is a pain for cross-compilation (at least for the kind of advanced cross-compilation needs we have). We're also not building for the host platform (what CMake does) but for a target which may have different capabilities, even on the same OS family or architecture. (E.g. compiling on a Linux machine that supports AVX but we want to limit ourselves to SSE4.2.) So making explicit decisions in our config is better IMO.

It's not too much burden here and should indeed not change too much in the future, I just messed up my last sync. The main burden is the hardcoded 3.1.3 we'll have to remember to update each time, but the rest of the config probably won't change (it seems designed to cater to 30 year old architectures and compilers so I'm not too worried that this code changes every release :P).

On the other hand we could maybe remove the 0001 patch and just commit the files as is, documenting that they should be diffed occasionally against a CMake-generated one to see if we're missing things. Having files created by the patch makes the patch regeneration a bit more complex than usual with Git.

Edit: Hm no let's keep them as a patch, it's easier to restore them on update.

@akien-mga akien-mga force-pushed the libjpeg-turbo-cleanup-config branch from 46c3e81 to 345cbe3 Compare February 4, 2026 22:00
Copy link
Copy Markdown
Member

@Calinou Calinou left a comment

Choose a reason for hiding this comment

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

Code looks good to me.

@akien-mga akien-mga modified the milestones: 4.x, 4.7 Feb 5, 2026
@Repiteo Repiteo merged commit ade192c into godotengine:master Feb 5, 2026
20 checks passed
@Repiteo
Copy link
Copy Markdown
Contributor

Repiteo commented Feb 5, 2026

Thanks!

rivie13 pushed a commit to rivie13/Phoenix-Agentic-Engine that referenced this pull request Feb 16, 2026
…eanup-config

libjpeg-turbo: Improve config files and fix patches
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants