Skip to content

Switched LuaJIT to WohlSoft fork#279

Merged
Causeless merged 1 commit into
cortex-command-community:developmentfrom
Madreag:pr/luajit-update-current-tip
May 28, 2026
Merged

Switched LuaJIT to WohlSoft fork#279
Causeless merged 1 commit into
cortex-command-community:developmentfrom
Madreag:pr/luajit-update-current-tip

Conversation

@Madreag
Copy link
Copy Markdown
Contributor

@Madreag Madreag commented May 27, 2026

Switches external/sources/LuaJIT-2.1/ from the 2022-era upstream LuaJIT/LuaJIT snapshot back to the WohlSoft fork at current tip (dfcb8651, 2026-04-25). WohlSoft was vendored here originally, then swapped to upstream sources in 485d7f280 (Feb 2023). It tracks upstream LuaJIT/LuaJIT v2.1 closely (7 commits behind as of today), so this picks up ~3-4 years of upstream LuaJIT fixes since the 2022 baseline, notably the recent JIT/interpreter consistency work.

WohlSoft's UTF-8 path patch ships in this drop via a new lj_fopen.c/lj_fopen.h pair (included by lib_package.c, lib_io.c, lj_clib.c, lj_load.c, lj_trace.c) but stays dormant. CCCP's build doesn't define LUAJIT_FORCE_UTF8_FOPEN, so _lua_fopen/_lua_freopen macro to plain fopen/freopen, identical to upstream LuaJIT's Windows behavior. Available as a future toggle if we ever want UTF-8 Windows paths.

Added lj_fopen.c to src/meson.build + libluajit.vcxproj. CCCP build glue (meson.build, meson_options.txt, libluajit.vcxproj, msvc-prebuild.bat, msvc-postbuild.bat) preserved. src/luajit.h regenerated from the new luajit_rolling.h template (rolling version 1777102609 matching dfcb8651).

Rebuilt _Bin/*.lib so Windows still links. Follow-up PR drops the prebuilts entirely and wires libluajit.vcxproj into RTEA.sln so MSBuild source-builds LuaJIT alongside the Meson flow.

Built clean on Windows MSBuild (Final, Debug Full, Debug Minimal, Debug Release; all x64) and Linux Meson via WSL2. macOS deferred to CI.

If WohlSoft hasn't picked up the late-May 2026 upstream sanitizer fixes by the time this lands, can do a small follow-up to sync those.

…6-04-25)

Re-adopts the WohlSoft fork after the Feb 2023 swap to upstream sources
(485d7f2), pinning to current tip @ dfcb8651 (2026-04-25). WohlSoft
tracks upstream LuaJIT/LuaJIT v2.1 closely (7 commits behind as of
today), so this also catches ~3-4 years of upstream LuaJIT fixes since
the 2022 baseline, notably the recent JIT/interpreter consistency work.

WohlSoft's UTF-8 path patch ships in this drop via lj_fopen.c /
lj_fopen.h but stays dormant: CCCP's build doesn't define
LUAJIT_FORCE_UTF8_FOPEN, so _lua_fopen / _lua_freopen macro to plain
fopen / freopen, identical to upstream LuaJIT's Windows behavior.
Available as a future toggle if we want UTF-8 Windows paths.

Added lj_fopen.c to src/meson.build + libluajit.vcxproj. Preserves CCCP
build glue (meson.build, meson_options.txt, libluajit.vcxproj,
msvc-prebuild.bat, msvc-postbuild.bat). src/luajit.h regenerated from
the new luajit_rolling.h template (rolling version 1777102609 matching
dfcb8651).

Rebuilds _Bin/*.lib from the new source so Windows still links;
follow-up PR drops the prebuilts entirely and wires libluajit.vcxproj
into RTEA.sln.

Verified clean on Windows MSBuild (Final / Debug Full / Debug Minimal /
Debug Release, x64) + Linux Meson via WSL2. macOS-arm64 deferred to CI.
WohlSoft v2.1 is 7 commits behind upstream LuaJIT/LuaJIT v2.1 as of
2026-05-26 (recent sanitizer fixes); can sync in a follow-up if WohlSoft
hasn't picked them up by then.
@Causeless Causeless added this pull request to the merge queue May 28, 2026
Merged via the queue into cortex-command-community:development with commit 15a66e9 May 28, 2026
4 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