How to install clang compiler ?
-
Hi slerdzlo,
It became Headache to me, i am switching to linux.
But i have one important question to you, We have one application which is developed in Qt 4.7 and we have cross compiled it and its running on ARM, Question is by using clang+llvm does it reduce memory size and increases the performance of the application????Thanks
-
In many cases, the answer is yes, but you need to check yourself. It's not a magic do-it-all for you tool. If your code is badly written, it won't make it ultra fast all of a sudden.
-
Hi sierdzio
Good introduction thanks for your information i also new to clang but feel it very powerful rather than GCC. :)
-
Hii slerdzlo,
Its very easy to install clang+llvm if we have linux like system and if we follow http://clang.llvm.org/get_started.html this Thanks for your guidence,
i got clang 3.4 and executed my qt(4.8.1) project and in GCC 4.6 tooComparison between GCC 4.6 , clang 3.4
- Debug Time 37 seconds , 1 min 15 sec
- Warnings 23 , 43
- size of binary file 5.1 MB , 4.5 MB
-
I'm happy it worked for you. Happy coding!
-
hi slerdzlo,
I have one more question, I think we can set the GCC optimization level manually, Can you give any idea to set ?
-
There are various optimisation settings available and many ways to turn them on. Most common settings are: -O2, -Od, -O3. They are well documented by both gcc and clang.
If you mean to ask how to set this up in a qmake project, then the answer is that you need to use QMAKE_CXX_FLAGSvariable. -
Thanks,
This is where we get still better knowledge,
http://doc.qt.digia.com/4.7/qmake-variable-reference.html#qmake-cxxThanks,
-
Hi slerdzlo,
I have one more task to do,
Our target is to run the Qt Project in Arm board, We can directly compile using arm tool chain but our target is i have to run the code which is compiled with clang + llvm on Arm board,
Any Idea Please.... -
If you clang installation supports that architecture, you can compile and it should work. If it's some special custom chip, it may be that GCC is your only option. But that is not a place I have much experience in, so I can't say for sure.
-
Hi slerdzlo,
I Came to know that my clang can directly generate the Arm binary code and i am able to do it for single hello.c file but our job is we need to compile pcre and tslib using clang which generates binary for Arm board,, pleeeease any suggestions,,,