Replies: 9 comments 5 replies
-
This would be my preference as well. |
Beta Was this translation helpful? Give feedback.
-
I am currently using make (for local development builds) but this is simply force of habit and I don't mind at all switching to CMake. I myself would definitely not be willing to invest the effort to maintain the Makefile. |
Beta Was this translation helpful? Give feedback.
-
The problem with this is that the new potential repository (e.g. |
Beta Was this translation helpful? Give feedback.
-
I don't know how swift handles interoperability with C/C++, but it seems overly restrictive to require to build the C/C++ code entirely within the |
Beta Was this translation helpful? Give feedback.
-
I actually haven't considered to have the SPM package just provide bindings to the C/C++ library. Maybe this is the correct way to do it. It will still be a little bit of extra work for the 3rd party projects, because they would have to provide the Overall I am OK with the proposal in this issue to make the CMake build the standard and drop support for the rest of the builds. Btw, one thing to keep in mind is to make effort to keep the required CMake version as low as possible. Currently we require 3.18 for the CUDA builds which is relatively OK. But even today, every now and then I still have to deploy |
Beta Was this translation helpful? Give feedback.
-
I don't use nix or swift, but I do enjoy the simplicity of makefiles and how they just work out of the box even on things like w64devkit or Termux. |
Beta Was this translation helpful? Give feedback.
-
@slaren answering your question here: it's not about just building commands - I personally find Makefile easier to organize and maintain even despite all of its problems. I don't see much reason to use CMake for a relatively small personal project that targets one-two platforms. Maybe keeping Makefile small like proposed will solve the issue of maintenance. Standardizing on only one build system is good, but removing the alternatives completely will cut off a portion of developers and will potentially create more questions in future. |
Beta Was this translation helpful? Give feedback.
-
I believe removing the versus build system and maintaining a clean CMake setup makes the most sense. By having a single method for customizing the build, it simplifies writing detailed documentation and enhances maintainability. This approach can also benefit third-party software. |
Beta Was this translation helpful? Give feedback.
-
What's the correct way to run "make clean" now ? I couldn't find one in the docs when looking for "clean". I had to run a pretty disgusting:
after changing options in order to rebuild, that I really don't like at all. |
Beta Was this translation helpful? Give feedback.
-
Currently we have at least these build systems in llama.cpp:
As the project grows, the build process becomes more complicated and maintaining all of these build systems takes a significant amount of time that could be spent in more meaningful development. Additionally, it prevents adding more advanced logic to the build because having to replicate it in every other build system is not really feasible.
In my opinion there is little reason to not standardize on cmake and remove the other build systems. Compared to make, it is just one more command to build the project. The Makefile has grown to be an unmaintainable mess that effectively requires running
make clean
every single time because it has no idea of what are the dependencies of each source file. Build systems such as Nix can live in a separate repository where the people interested in them can keep them updated, but we should not absorb the maintenance cost of other projects. The swift build might make more sense in a separate repository together with llama.cpp API bindings.This is not the first time this has been proposed, but in my opinion we are finally at a point where it is no longer reasonable to continue maintaining multiple build systems. I would be interested in hearing what are the opinions of other people in the community.
Beta Was this translation helpful? Give feedback.
All reactions