Skip to content

build: compile the backend-independent libraries for x64 as well - #23

Merged
ResurrectedTrader merged 1 commit into
mainfrom
split/x64-platform
Sep 16, 2026
Merged

ResurrectedTrader merged 1 commit into
mainfrom
split/x64-platform

Conversation

@ResurrectedTrader

Copy link
Copy Markdown
Owner

utils, contract, core and js hold no game-version-specific code, so nothing in them needs a 32-bit host. Giving them x64 configurations keeps that property honest — a Win32 assumption that creeps in stops compiling now, rather than waiting for a second backend to find it.

What changed

  • The four library projects drop |Platform from their configuration conditions, so one set of settings covers both platforms.
  • d2bsng.slnx maps lod114d, the glue DLL and the tests to Win32 only, so an x64 solution build skips them rather than failing.
  • build.ps1 takes -Platform Win32|x64 (Win32 stays the default).
  • CI builds both.

Two Win32 assumptions this turned up

  • AppConfig sized its limits from int literals (100 * 1024 * 1024), which is fine at 32-bit but relies on the wrong type under LP64 rules. Now size_t{100} * 1024 * 1024.
  • Pathfinder compared a uint32_t against a size_t in std::min.

Both are real portability bugs rather than cosmetic warnings.

Scope

The 1.14d backend, its glue and the tests stay Win32 — the game is 32-bit and that is not changing. Nothing links at x64; these are static libraries only, so this is a compile-coverage change, not a new shippable artifact.

Verification

clang-format clean; clang-tidy clean (118 files, full no-cache run). The x64 build itself has not been run by me — that is the thing worth checking on review.


First of five PRs splitting up what was previously one large branch. The rest follow in order: named loggers, the Detours slot API, launch-option scrubbing, and moving the input hook and proxy into core.

🤖 Generated with Claude Code

utils, contract, core and js hold no game-version-specific code, so nothing
in them needs a 32-bit host. Giving them x64 configurations keeps that
property honest - a Win32 assumption that creeps in stops compiling rather
than waiting for a second backend to find it.

The project configurations drop |Platform from their conditions so one set
covers both, the .slnx maps lod114d, the glue DLL and the tests to Win32
only, and build.ps1 takes -Platform. CI builds both.

Two Win32 assumptions this turned up: AppConfig sized its limits from int
literals that overflow differently under LP64 rules, and Pathfinder compared
a uint32_t against a size_t.

The 1.14d backend, its glue and the tests stay Win32 - the game is 32-bit.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
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.

1 participant