Tim Northover via llvm-dev
llvm-dev at lists.llvm.org
Mon Feb 27 19:37:19 PST 2017
On 27 February 2017 at 18:57, John Cortell via llvm-dev
<llvm-dev at lists.llvm.org> wrote:
> If I don't specify LLVM_TARGETS_TO_BUILD or I set it to "X86", cmake
> completes fine, and I can build the solution
X86 is definitely what you should be using (both 32-bit and 64-bit x86
backends share the code in lib/Target/X86, which is the key point
CMake is looking for).
> (but it gives me 32-bit binaries)
I assume this means that when you run the Clang you've just built it
defaults to producing 32-bit binaries? If so, on *NIX platforms you
override the default target with LLVM_DEFAULT_TARGET_TRIPLE.
I'm not *sure* that'll work on Windows (which has its own weird driver
on top of Clang), but as far as I can tell from here it behaves as I'd
expect. If so you want to set it to something like
"x86_64-pc-windows-msvc18.0.0" for 64-bit default.
clang-cl also seems to accept -m32 and -m64 options as overrides,
which may or may not be useful to you. Probably a bit hacky to put
into a build system since MSVC itself won't accept them.
More information about the llvm-dev