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

Justin Bogner via llvm-commits llvm-commits at lists.llvm.org
Tue Dec 12 15:01:29 PST 2017


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.


More information about the llvm-commits mailing list