[LLVMdev] Optional Target Builds
sabre at nondot.org
Fri Apr 22 10:39:24 PDT 2005
On Fri, 22 Apr 2005, Reid Spencer wrote:
> Okay, we need to get this resolved. So far we have two camps: (a) those
> that want the default to be "all" and (b) those that want the default to
> be "host-only". This is easy enough to change in the configure script;
> we just need to make a decision. So far we have:
Let me try to clarify why I feel the way I do. For this discussion, I use
the term "end-user" to be someone who just wants to USE a compiler, and
doesn't want to hack on the compiler.
To me, the current LLVM distro isn't something that an end-user would
generally want to use directly. In particular, the LLVM CVS repo is
currently biased towards supporting developers more than end-users. For
end-users, I think it would be most useful to build all of the targets,
but only link the host target into llc (the others remain as .so files).
That way the common case of non-cross-compiling will be fast (llc has a
smaller disk footprint), but cross compilation can still work.
Since end users don't build the tree often (e.g. only once), they don't
really care THAT much about LLVM build time. More commonly, a packager
will do this work for them, producing a set of debs, gentoo packages, etc.
The problem with building targets as .so files is transparency: you need
to know to pass "-load libfoo.so" to llc to get support for the "foo"
target. In the long-term, I think this is 100% acceptable. In
particular, llc is a low-level developer tool that end-users will ideally
not have to directly use in the future. In particular, someday hopefully
soon, end-users will interface to the llvm toolchain exclusively through
the llvmc tool. llvmc will fork off the subtools when necessary.
I think it's perfectly reasonable for llvmc to know which targets are
linked into the llc tool and automatically provide the -load option when
If you accept the above, then we have 3 classes of people to consider: 1.
end-users with the above definition, 2. developers that want to test
everything [including the nightly testers], and 3. developers who don't
want to test everything.
I think that all groups of people are important, the only question is who
passes the extra flag. I think that "punishing" group #3 is the right way
to go, because they're the ones that want to do something strange, and
they're the ones that know enough about llvm to do it. :)
More information about the llvm-dev