Skip to content

base: build as a DLL, one Option/Feature registry on Windows - #27

Merged
Force67 merged 1 commit into
devel5from
base-dll
Sep 29, 2026
Merged

Force67 merged 1 commit into
devel5from
base-dll

Conversation

@Force67

@Force67 Force67 commented Sep 29, 2026

Copy link
Copy Markdown
Owner

For rx's Windows component build (every module a DLL).

  • EQ_BASE_SHARED builds base as a shared library. PE gives every DLL that links a static library its own copy of its globals, so base has to be one DLL for one log, allocator and registry. Exports all functions (MSVC: WINDOWS_EXPORT_ALL_SYMBOLS; mingw: --export-all-symbols with the static runtime excluded).
  • The Option/Feature chain roots move out of line on Windows (Feature::ChainRoot, OptionBase::ChainRoot in containers/init_chain_win.cc). A function-local static in an inline template is per DLL on PE whatever base is built as. ELF keeps the default-visibility inline root from base: one Option/Feature registry per process in shared-object builds #26.
  • minwin.h on mingw undefines GetProp/SetProp/RemoveProp/MemoryBarrier after <windows.h>, matching the MSVC path, which never includes it. They renamed methods in the files that saw the header and not in others, and links failed.
  • Remove debugging_win.cc: debugging.cc already defines IsDebuggerAttached for Windows, and a DLL link reports the duplicate a static archive hid.

Verified: base unit tests; rx Linux static and shared ctest 155/155; rx Windows static and DLL builds under Wine agree (renders rmse <= 0.0007, an option set from the environment reaches the render DLL).

@Force67
Force67 merged commit 3d1355b into devel5 Sep 29, 2026
6 checks passed
@Force67
Force67 deleted the base-dll branch September 29, 2026 18:01
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