Build size for LLVM 6.0.0 is huge (42G)

你。 提交于 2021-01-28 00:30:08

问题


I built llvm-6.0.0 from source and everything works fine. I'm just wondering how come its size is so huge (42G). Can I easily erase some object files or other to make the build directory smaller?

$ du -hs ~/GIT/llvm-6.0.0/build/
42G /home/oren/GIT/llvm-6.0.0/build/

回答1:


You're building without shared libraries, which means that a number of very large libraries are linked statically into a large number of (otherwise small) tools. I'm guessing that you may also be building for all targets (32-bit ARM, 64-bit ARM, a few dozens more, 32-bit X86, 64-bit X86).

If you run cmake -DLLVM_TARGETS_TO_BUILD=HOST -DCMAKE_BUILD_TYPE=RelWithDebInfo -DBUILD_SHARED_LIBS=on ., you should reduce the space use to about 10G. (At least I have a 10G build tree produced from a similar command line. I also have bigger trees, because those settings aren't the best match for all purposes.)



来源:https://stackoverflow.com/questions/56016796/build-size-for-llvm-6-0-0-is-huge-42g

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!