Skip to content

Add Windows support to meson build system#3129

Open
bcapener wants to merge 1 commit intolinux-nvme:masterfrom
Micron-TPG-OSS:initial-windows-support-for-meson-build-system
Open

Add Windows support to meson build system#3129
bcapener wants to merge 1 commit intolinux-nvme:masterfrom
Micron-TPG-OSS:initial-windows-support-for-meson-build-system

Conversation

@bcapener
Copy link
Contributor

@bcapener bcapener commented Mar 4, 2026

feature: add windows support to meson build system

This is the first step in adding Windows build support to this project. The idea is to restructure the meson.build files to support windows without touching any of the code.

Signed-off-by: Brandon Capener bcapener@micron.com

@igaw
Copy link
Collaborator

igaw commented Mar 4, 2026

BTW, feel free to send the cleanup patches, e.g. the fix spelling stuff. This can go in independent of the windows port.

@bcapener bcapener force-pushed the initial-windows-support-for-meson-build-system branch from f1ba8b4 to fe0d6bd Compare March 5, 2026 20:39
@bcapener bcapener marked this pull request as ready for review March 5, 2026 20:48
@bcapener bcapener force-pushed the initial-windows-support-for-meson-build-system branch from fe0d6bd to 31fc277 Compare March 10, 2026 14:08
@igaw
Copy link
Collaborator

igaw commented Mar 10, 2026

I've just looked at Postgresql. This looks very clean. I think we should also adapt this pattern:

elif host_system == 'freebsd'
  sema_kind = 'unnamed_posix'

elif host_system == 'linux'
  sema_kind = 'unnamed_posix'
  cppflags += '-D_GNU_SOURCE'

@bcapener
Copy link
Contributor Author

I've just looked at Postgresql. This looks very clean. I think we should also adapt this pattern:

elif host_system == 'freebsd'
  sema_kind = 'unnamed_posix'

elif host_system == 'linux'
  sema_kind = 'unnamed_posix'
  cppflags += '-D_GNU_SOURCE'

do you mean get rid of is_windows and just use host_system == 'windows' and host_system != 'windows'

@bcapener bcapener force-pushed the initial-windows-support-for-meson-build-system branch from 3102ce5 to d9415cc Compare March 12, 2026 17:29
@igaw
Copy link
Collaborator

igaw commented Mar 12, 2026

Yes, I think we should look how other project have solved these problems. Sure this is not a big thing, just saying we can steal from other projects :)

meson.build Outdated

feature_python = get_option('python')
if feature_python.disabled()
if is_windows or feature_python.disabled()
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

FWIW, I started to work on the disable fabrics configuration option and all the library checks would be covered by this. So it wouldn't be platform dependent. This would be way cleaner I'd say.

see #3170

else
generated_h = 'accessors.h'
generated_c = 'accessors.c'
generated_ld = 'accessors.ld'
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

btw, we are going to move the header generation out of the main build. instead it will be manually run. makes the build setup a bit simpler, so our hope.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Restructure meson.build files to support windows (msys2).
This is the first step in the windows port and does not
generate a useful executalbe.

Signed-off-by: Brandon Capener <bcapener@micron.com>

remove is_windows and add host_system
@bcapener bcapener force-pushed the initial-windows-support-for-meson-build-system branch from d9415cc to 2cacbce Compare March 12, 2026 21:35
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