[llvm] r320413 - [cmake] Pass TARGETS_TO_BUILD through to host tools build

Don Hinton via llvm-commits llvm-commits at lists.llvm.org
Tue Dec 12 15:32:26 PST 2017


On Tue, Dec 12, 2017 at 3:01 PM, Justin Bogner <mail at justinbogner.com>
wrote:

> Don Hinton <hintonda at gmail.com> writes:
> > On Tue, Dec 12, 2017 at 2:04 PM, Justin Bogner <mail at justinbogner.com>
> > wrote:
> >
> >> Alex Bradbury <asb at lowrisc.org> writes:
> >> > On 12 December 2017 at 13:32, Don Hinton via llvm-commits
> >> > <llvm-commits at lists.llvm.org> wrote:
> >> >> Yes, for this to work, we'd need to pass
> LLVM_EXPERIMENTAL_TARGETS_TO_
> >> BUILD
> >> >> as well.
> >> >>
> >> >> However, since Native is the only target actually used, I'd lean
> toward
> >> >> reverting this change and perhaps adding a comment.
> >>
> >> This isn't true, Native is not used (in fact, most of my builds don't
> >> have it or the equivalent, which is part of why I made this change). It
> >> would make just as much sense to pass in an empty target list.
> >>
> >
> > "Native" is never used literally, it's just a wildcard placeholder.
> >
> > string(REPLACE "Native" ${LLVM_NATIVE_ARCH}
> >   LLVM_TARGETS_TO_BUILD "${LLVM_TARGETS_TO_BUILD}")
> > list(REMOVE_DUPLICATES LLVM_TARGETS_TO_BUILD)
> >
> > With LLVM_NATIVE_ARCH set in config-ix.cmake.
>
> Yes, but the host tools do not need the native arch in the targets in
> order to work.
>
> If I build on X86 and set LLVM_TARGETS_TO_BUILD=AArch64, then the host
> tools should have LLVM_TARGETS_TO_BUILD="AArch64" (which they do
> currently), not "X86", and not "AArch64;X86". Native expands to "X86" in
> this case, and that doesn't actually make sense for the build.
>

Since we're only talking about the host tools built in the NATIVE
subdirectory -- currently just (clang|llvm)-tblgen -- and invoked on the
host, I'm not really sure it matters.  But perhaps it will someday.

So, passing LLVM_EXPERIMENTAL_TARGETS_TO_BUILD seems like the best idea at
this point.

I can make this change later today if you want.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20171212/e8a9f6be/attachment.html>


More information about the llvm-commits mailing list