Skip to content

Make core HRX build helpers Windows-safe#97

Merged
jtuyls merged 1 commit into
ROCm:mainfrom
jtuyls:codex/hrx-windows-minimal
Jun 16, 2026
Merged

Make core HRX build helpers Windows-safe#97
jtuyls merged 1 commit into
ROCm:mainfrom
jtuyls:codex/hrx-windows-minimal

Conversation

@jtuyls

@jtuyls jtuyls commented Jun 15, 2026

Copy link
Copy Markdown
Collaborator

Submits parts of #37 needed to enable a Windows build.

Changes:

  • Export HRX public API symbols with __declspec(dllexport/dllimport) on Windows while preserving HRX_STATIC for static builds.
  • Replace the exported hrx_host_allocator_system_value data symbol with a hrx_host_allocator_system() function. This avoids Windows DLL data import/export pitfalls and removes the GCC-only constructor.
  • Update the CTS dynamic loader to resolve hrx_host_allocator_system as a function instead of looking up the old allocator data symbol.
  • Apply ELF hidden-visibility and -Wl,--version-script link flags only on non-Windows platforms, since MSVC/link.exe does not support them.
  • Remove the MSVC natvis link option as runtime/iree.natvis doesn't exist, so reduced/embedded HRX layouts do not reference a missing debugger file.
  • Use CMake's discovered ${Python3_EXECUTABLE} in VM bytecode ISA genrules instead of assuming a python3 executable is on Windows PATH.

@jtuyls jtuyls force-pushed the codex/hrx-windows-minimal branch from cd5e821 to 82107e5 Compare June 15, 2026 20:18
@jtuyls jtuyls requested review from AWoloszyn and benvanik June 15, 2026 20:27
Keep this branch limited to generic HRX/IREE Windows enablement.

Changes:

- Export HRX public API symbols with `__declspec(dllexport/dllimport)` on Windows while preserving `HRX_STATIC` for static builds.

- Replace the exported `hrx_host_allocator_system_value` data symbol with a `hrx_host_allocator_system()` function. This avoids Windows DLL data import/export pitfalls and removes the GCC-only constructor.

- Update the CTS dynamic loader to resolve `hrx_host_allocator_system` as a function instead of looking up the old allocator data symbol.

- Apply ELF hidden-visibility and `-Wl,--version-script` link flags only on non-Windows platforms, since MSVC/link.exe does not support them.

- Remove the stale MSVC natvis link option because this HRX tree does not ship `runtime/iree.natvis`.

- Render the VM ISA Python generator through CMake's discovered `${Python3_EXECUTABLE}` instead of assuming `python3` is on Windows `PATH`, and cover that converter path with a unit test.
@jtuyls jtuyls force-pushed the codex/hrx-windows-minimal branch from 82107e5 to a16cac9 Compare June 16, 2026 06:56
@jtuyls jtuyls merged commit cc6c32e into ROCm:main Jun 16, 2026
23 checks passed
@jtuyls jtuyls deleted the codex/hrx-windows-minimal branch June 16, 2026 07:03
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