Mesh icon indicating copy to clipboard operation
Mesh copied to clipboard

Windows build

Open johnterickson opened this issue 6 years ago • 7 comments
trafficstars

Looks like there is some work to get a Windows build going using MSVC. What's the plan w.r.t. MSVC vs. MSYS2? Any way I can help?

johnterickson avatar Feb 18 '19 18:02 johnterickson

@johnterickson do you have suggestions? One thing I was thinking about was switching the python ./configure + Makefiles we have to cmake to make things easier on windows + more consistent across Linux/macOS/Windows.

@emeryberger has some context here

bpowers avatar Feb 18 '19 19:02 bpowers

Yes, I was thinking more about the code side of things. I think MSYS/MinGW will be the easiest as it already supports a lot (e.g. pthreads).

I've made some progress in my fork, but still a long way to go! https://github.com/johnterickson/Mesh

johnterickson avatar Feb 19 '19 00:02 johnterickson

And MSYS/MinGW uses ./configure && make directly.

johnterickson avatar Feb 19 '19 00:02 johnterickson

For Windows builds VC++ is the obvious choice if you want the result to be usable by regular Windows programs. Another alternative is clang-cl, as used by Chromium. This can consume Microsoft's header files and can generate VC++ compatible .obj files and debug information, while also having the advantages of clang.

randomascii avatar Sep 16 '19 23:09 randomascii

I've started a branch that replaces the current build system (which has a distinct makefile for each of macOS and Linux) with Bazel. Bazel seems to have reasonable C++ support via clang-cl: https://docs.bazel.build/versions/master/windows.html

If I can figure out how to get bazel to parity with our existing build, I hope this will make the build system side of things easier, but help is definitely wanted on dealing with the virtual memory side of Mesh on Windows :)

bpowers avatar Sep 17 '19 19:09 bpowers

Would https://docs.microsoft.com/en-us/windows/win32/memory/address-windowing-extensions (Specifically https://docs.microsoft.com/en-us/windows/win32/api/memoryapi/nf-memoryapi-mapuserphysicalpages?redirectedfrom=MSDN to manually map physical pages), and https://docs.microsoft.com/en-us/windows-hardware/drivers/ddi/content/ntddk/nf-ntddk-mmgetphysicaladdress (To get physical pages (I'm assuming it can be done from the address)) be enough for getting started on that?

Also, do you mind if I ask for some guidance (Like just pointing to the relevant files) for someone possibly interested in working on it? ( :) )

nico-abram avatar Oct 13 '19 07:10 nico-abram

Any update on this?

From my point of view e.g. mainstream GC languages can't incorporate this allocator easily because they'd perform quite differently on different systems and they'd need to "ifdef" too much.

dumblob avatar Dec 16 '21 11:12 dumblob