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

Migrate build system to CMake #322

Open
loganek opened this issue Sep 4, 2022 · 6 comments · May be fixed by #330
Open

Migrate build system to CMake #322

loganek opened this issue Sep 4, 2022 · 6 comments · May be fixed by #330

Comments

@loganek
Copy link
Contributor

loganek commented Sep 4, 2022

I understand that a great thing about Makefile (versus CMake) is less dependencies. However, I see it comes with its own limitations, like not great Windows support, lack of ninja build (if that's preferred) or a bit obscure syntax (although that's very subjective). I've seen a PR #154 although that seemed abandoned. Not sure if there was any reason for that or was it simply lost of interest? I'd be happy to pick up the work and finish it unless there was a reason to keep Makefiles.

@sbc100
Copy link
Member

sbc100 commented Sep 5, 2022

I think its fairly subjective. The windows support is probably the most significant reason to switch. But also, non of those issues are really blocking progress or holding is back right now so it doesn't seem like we should be prioritizing this.

@loganek
Copy link
Contributor Author

loganek commented Sep 6, 2022

@sbc100 thanks for the comment. I agree that doesn't block any of the development, but it might slightly improve development experience as well (e.g. #156). Given there are no objections, I might pick up the branch and update the PR (or create a new one, if I'm unable to update the existing one) - otherwise, I'll keep the issue open so others can work on at one point of time.

@sbc100
Copy link
Member

sbc100 commented Sep 6, 2022

As you might have guessed I'm not a huge fan of cmake.. but I don't know of any good alternatives. I would imagine that converting to cmake could make things more/needlessly complex, but if you can find a way to do it without too much extra complexity and without loosing in features, then I don't block it.

The fact the the previous attempt stall makes me things it could be somewhat challenging.

@sunfishcode
Copy link
Member

I support migrating to CMake. I'm not familiar enough with CMake enough to be of much direct help, but I'm happy to answer any question about what the current Makefile is doing.

@loganek loganek linked a pull request Sep 30, 2022 that will close this issue
3 tasks
@xphoenix
Copy link

One more usage for Cmake is CPM: add all dependencies including was-libc, llvm#{cxx,c++abi,compiler-rt}, third-party libs and everything gets cross compiled nicely.

Work seems to be stopped, so maybe I could help to finish this. A couple of questions:

  • right now cmake files added out-of-sources: is there any strong reason to do in that way instead of place CMakeLists.txt directly next to source files in each directory?
  • are there any other issues/requirenments/notes not mentioned in the [WIP] Add CMake build system #330 review?

@abrown
Copy link
Collaborator

abrown commented Apr 16, 2024

@alexcrichton and I were just talking about this. Like @sbc100, I was originally more inclined here and in wasi-sdk to stick with the "tried and true" Makefile approach but there's good reasons to switch to CMake: (1) it does make the Windows build experience more robust and (2) the Makefile approach only makes sense to me when the build is simple — both wasi-sdk and wasi-libc may be complex enough now to justify CMake.

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 a pull request may close this issue.

5 participants