I was experimenting with cmake to see if it is useful for mold,
but it looks like using cmake doesn't make much sense for us.
So I'm undoing all changes that I did for cmake.
cmake is definitely better than autoconf, and it is also useful
if your program is cross-platform. However, neither of the benefits
don't apply to mold; mold doesn't need a complex feature detection,
and it currently supports only ELF-based Unix-like systems.
I think Makefile is a lingua-franca, while CMakeLists.txt isn't.
The good ol' Makefile works just fine for mold.
In the future, mold might become a cross-platform product, and if
that happens, we might want to re-introduce cmake.
I recommend users use the latest release instead of git HEAD
because HEAD may be broken in a subtle way. Before a release,
I build all Gentoo packages using mold, but I don't do that for
every commit because it takes ~2 days.
This change adds mimalloc as a git submodule so that `make` doesn't
try to clone mimalloc repo. This change should allow building mold
with the nix package manager, which doesn't provide network access
while building.
This change may conflict with a local `mimalloc` directory. If you
already have checked out mold and `mimalloc` directory exists in the
mold directory, you may need to remove it by `rm -r mimalloc` before
running `make`.
Requested by David Yamnitsky.
Fixes https://github.com/rui314/mold/issues/50