[LLVMdev] Building LLVM with cmake on FreeBSD
chuckr at telenix.org
Wed May 27 12:03:20 PDT 2009
Paul Melis wrote:
> You assume that the makefiles CMake produces need to do some kind of
> conditional stuff. I don't think they do anything like that, as that has
> already been resolved on a higher level, i.e. with CMake's own little
> language used in the CMakeLists.txt files. In fact, the generated
> makefiles DO seem to be usable by both GNU make and BSD make.
> Here's an example of "the other way around": BSD make on a Gentoo Linux
> system building LLVM from CMake-generated makefiles:
I've said this VERY often now, I can't see why no one ever refers to it. I
said that, for FreeBSD, when they bring llvm into their build, it's a virtual
certainty that the BSD style makefiles will be added to the llvm build, probably
in some parallel dir tree, inside FreeBSD. This will be done in a way that
affects the llvm project not one little bit, you won't even be aware of it, but
I don't see anyone who is going to be willing to toss away the BSD build system,
which allows modification of the BSD build as it suits, to instead try to bring
in a brand new build system that works totally differently than our present one,
and allows no ability to change the build from the BSD build environment.
The current build of llvm on FreeBSD is managed from the FreeBSD ports system,
and uses whatever your build system offers. In bringing it into our base build,
we want some more control, some more build standardization, as long as we can
manage this without bothering you, and we CAN do this, we've been doing it for
years now with gcc. The GNU folks probably aren't (in the main) even aware of this.
I do want to answer your point about conditionals: they ARE there in the
CMake-generated GNU Make-Makefiles, allowing a user of GNU Make to have some
local control (as they are used to) over their local environment without having
to learn CMake. If such is deemed needed for GNU Make, why is it ok to treat
anyone using a BSD Make system as a poor cousin? Not that it's going to really
affect us (we'll be using our own tree of Makefiles) but it rankles. Those old
SYSV Makefiles are only there because they're the stupidest. I could offer you
BSD Makefile templates, if someone in llvm would learn enough CMake to figure
out how to integrate them into CMake. Cmake is your tool, not mine, remember.
However, as I said in the first paragraph, maybe it's better for you to just
ignore things, because llvm builds for most folks as it stands.
If it matters (and I don't think it really does) I like the way that some build
systems used to do it, which was to maintain Makefile sets for each OS. Let
each of those OSes supply their own Makefiles to you. A system like this could
be engineered with little bother, and the things that change (like new source
files) be managed with simple scripts, and less maintenance from you than your
present system. Everybody gets the very best local integration, your problems
are far less, and every one is happy. On top of that, anyone who finds a build
problem on their local build environment (for whatever reason) is more likely to
have a simpler time fixing it. That's my opinion, but don't bother to argue it,
because I know it doesn't matter in this discussion, and it's just my own opinion.
However, even if you used my suggestion, it would still be fairly likely that
the folks in the BSD systems would want to have their own makefiles, since they
CAN do this without bothering you. I couldn't say for sure, then, really.
> LLVM Developers mailing list
> LLVMdev at cs.uiuc.edu http://llvm.cs.uiuc.edu
More information about the llvm-dev