Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Patch rocm-core to be more compatible with Windows/MSVC. #43

Merged
merged 1 commit into from
Feb 7, 2025

Conversation

ScottTodd
Copy link
Member

@ScottTodd ScottTodd commented Jan 31, 2025

Progress on #36, making a larger portion of https://github.com/ROCm/rocm-core/ compile on Windows.

About the changes

  • The link.h and dlfcn.h headers do not exist on Windows and are only used when BUILD_SHARED_LIBS is set.
  • The PATH_MAX value, defined in limits.h, does not exist on Windows. I opted to use a fixed constant value of 4096, but FILENAME_MAX is also an option (see https://stackoverflow.com/a/65174437).
  • Attributes like __attribute__((visibility("default"))) do not exist on all compilers. Added some boilerplate cross platform versions (different approaches are possible too, this is just what I use on other projects).

How I generated the patch

  1. Made changes in the source folder

  2. Committed to a branch (ScottTodd/rocm-core@0dd798f)

  3. Ran

    bash .\build_tools\save_patches.sh rocm-6.3.1 rocm-core
    

@ScottTodd ScottTodd marked this pull request as draft January 31, 2025 21:00
@ScottTodd ScottTodd marked this pull request as ready for review January 31, 2025 21:58
@ScottTodd ScottTodd merged commit 02cae88 into nod-ai:main Feb 7, 2025
1 check passed
@ScottTodd ScottTodd deleted the windows-rocm-core branch February 7, 2025 00:16
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