[LLVMdev] How much memory clang llvm needs for debug compiling?

Ronaldo Ferreira ronaldorferreira at gmail.com
Mon Jun 2 07:10:58 PDT 2014


I have a 7 years old computer with 1 GB RAM and I was able to build clang
in debug mode. I created a swap file of 4 GB I think, and I've stopped
using the computer at all, just grab some tea and wait.

This link shows you how you can create a swap file:
http://askubuntu.com/questions/178712/how-to-increase-swap-space

At least for me it worked well.


2014-06-02 15:46 GMT+02:00 Nancy <nancydreaming at gmail.com>:

> $cd llvm-build
> $../llvm/configure --enable-targets=x86
>
>
> make[4]:正在离开目录 `/home/nancy/work/build-llvm/tools/clang/tools/libclang'
> make[4]: 正在进入目录
> `/home/nancy/work/build-llvm/tools/clang/tools/c-index-test'
> llvm[4]: Linking Debug+Asserts executable c-index-test
> llvm[4]: ======= Finished Linking Debug+Asserts Executable c-index-test
> make[4]:正在离开目录 `/home/nancy/work/build-llvm/tools/clang/tools/c-index-test'
> make[4]: 正在进入目录
> `/home/nancy/work/build-llvm/tools/clang/tools/c-arcmt-test'
> llvm[4]: Linking Debug+Asserts executable c-arcmt-test
> llvm[4]: ======= Finished Linking Debug+Asserts Executable c-arcmt-test
> make[4]:正在离开目录 `/home/nancy/work/build-llvm/tools/clang/tools/c-arcmt-test'
> make[4]: 正在进入目录 `/home/nancy/work/build-llvm/tools/clang/tools/driver'
> llvm[4]: Linking Debug+Asserts executable clang
> /usr/bin/ld: 最终连接失败: 内存耗尽 ( in english : Memory exhausted)
> collect2: error: ld returned 1 exit status
> make[4]: *** [/home/nancy/work/build-llvm/Debug+Asserts/bin/clang] 错误 1
> make[4]:正在离开目录 `/home/nancy/work/build-llvm/tools/clang/tools/driver'
> make[3]: *** [driver/.makeall] 错误 2
> make[3]:正在离开目录 `/home/nancy/work/build-llvm/tools/clang/tools'
> make[2]: *** [all] 错误 1
> make[2]:正在离开目录 `/home/nancy/work/build-llvm/tools/clang'
> make[1]: *** [clang/.makeall] 错误 2
> make[1]:正在离开目录 `/home/nancy/work/build-llvm/tools'
> make: *** [all] 错误 1
>
>
> What should I do to make debug enabled compiling successful? Anyone
> can tell me a tiny configuration which can save memory? I only have 3G
> RAM, Ubuntu kylin.
>
>
> --
> Best Regards,
> Yu Rong Tan
>
> _______________________________________________
> LLVM Developers mailing list
> LLVMdev at cs.uiuc.edu         http://llvm.cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20140602/37362619/attachment.html>


More information about the llvm-dev mailing list