[cfe-dev] Building Clang on Windows
Dennis Luehring via cfe-dev
cfe-dev at lists.llvm.org
Sun Oct 7 07:47:39 PDT 2018
im using VS2017 15.8.5 for building LLVM/clang, Release and Debug, Slow
Dual Core, Win7 x64 and 8GB RAM
im using current LLVM source + nested clang source from github mirror
my_root
llvm_build
llvm <-- git clone https://github.com/llvm-mirror/llvm
tools
clang <-- git clone https://github.com/llvm-mirror/clang
cd my_root
and these CMake build steps
cd llvm_build
cmake -Thost=x64 -G "Visual Studio 15 2017 Win64"
-DLLVM_TARGETS_TO_BUILD=host ..\llvm
(i see that "Win64" is missing in your examples)
then
cmake --build . --config Debug
or
cmake --build . --config Release
just works out of the box
(takes some time and is nearly swapping using VStudio IDE instead of
cmake--build to build)
Am 04.10.2018 um 15:24 schrieb Fábio Picchi:
> Updates:
> > Are you building debug or release? If debug, try building release.
> I tried and got the same error.
>
> I noticed my *build target* was *Win32* even though I passed the option
> -Thost=x64 to cmake. I followed the new instructions to regenerate the
> solution using:
> cmake -G "Visual Studio 15 2017" -A x64 -Thost=x64 ..\llvm
>
> Now the build target is displayed as *x64*. I tried to build it in Debug
> mode and still got the dreaded error:
> C1060: compiler is out of heap space
>
> I couldn't check the log errors in detail because I had to leave for work
> but I'll post more updates in the evening.
>
> I will try to do some research on the weekend but it would be great if
> someone could better explain the out of heap space error. How can the
> linker run out of memory just by linking binaries? Why is this process so
> memory intensive? Furthermore, why does it matter if I am targeting x86 or
> x64? I understand the pointers double in size but that would mean more
> memory usage for the x64 target, not the x86.
>
> Thank you very much for the help!
>
> On Thu, Oct 4, 2018 at 4:19 AM Dennis Luehring via cfe-dev <
> cfe-dev at lists.llvm.org> wrote:
>
> > Am 03.10.2018 um 23:29 schrieb Reid Kleckner via cfe-dev:
> > > Can anyone who actually knows answer Shaob's question? He asked "Does the
> > > Win64 generator automatically imply -Thost=x64?
> >
> >
> > CMake gives a warning if not using -Thost=x64 with VS2017 generator
> > Win64 that i could happen that the x86 tool chain is used - so i think
> > its not automatically implied
> >
> > _______________________________________________
> > cfe-dev mailing list
> > cfe-dev at lists.llvm.org
> > http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-dev
> >
>
More information about the cfe-dev
mailing list