Big size of compilation artefacts

40 views
Skip to first unread message

Андрей Деркач

unread,
Aug 11, 2016, 10:43:29 AM8/11/16
to crystax-ndk
Hello, guys!

I've switched my project from buggy NDK12 to Crystax NDK and found out interesting thing: clang 3.7 from Crystax compile object file which 3x bigger than clang 3.8 from NDK12 (with the same compiler options).
It is not a problem, actually, but on project with 1500 source files linker generate very big .a and .so files. So linking process is very long and fails on arm (only on arm) with message "ld: error: write: function not implement".
But if I use CMake with unity build (our project support this technique), I have no problem.
I use Crystax 10.3.2 on Windows 10; compiler is clang 3.7 and gcc toolchain 4.9. Can you advice me something?

Best regards, Andrew

Андрей Деркач

unread,
Aug 12, 2016, 4:40:18 AM8/12/16
to crystax-ndk
Hmm, linker can't finalize linking process and stuck in infinity loop. It generate .so with size 1.2 TB (!) on my machine

Dmitry Moskalchuk

unread,
Aug 12, 2016, 7:17:31 AM8/12/16
to cryst...@googlegroups.com

Hi Andrew,

This is something not known to me yet. Maybe it's a difference caused by enabling debug information? Just an assumption. If not, I'd be interested in getting this figured out. Could you provide some minimal example, easily reproducing the issue?

-- 
Dmitry Moskalchuk
--
You received this message because you are subscribed to the Google Groups "crystax-ndk" group.
To unsubscribe from this group and stop receiving emails from it, send an email to crystax-ndk...@googlegroups.com.
To post to this group, send email to cryst...@googlegroups.com.
Visit this group at https://groups.google.com/group/crystax-ndk.
To view this discussion on the web visit https://groups.google.com/d/msgid/crystax-ndk/38a73640-c863-4441-99f9-051c6823aea0%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Андрей Деркач

unread,
Aug 12, 2016, 11:06:00 AM8/12/16
to crystax-ndk
Hi, Dmitry!

I've tried ld.bfd linker and it didn't fail! Something strange... It is hard to provide you my example (our project is not open source), but I'll try to provide you another.
It seems to me that problem in GNU linker. I've found several issues with infinite loop in ld on different resources.

Have a nice day :)

пятница, 12 августа 2016 г., 14:17:31 UTC+3 пользователь Dmitry Moskalchuk написал:

Андрей Деркач

unread,
Aug 29, 2016, 8:46:23 AM8/29/16
to crystax-ndk
Hi, Dmitry!

I've found the root of my problem with linker and big object files. In clang 3.7 from crystax 10.3.2 compiler option "-fstandalone-debug" is enabled by default (http://clang.llvm.org/docs/UsersManual.html#controlling-size-of-debug-information), but not in clang 3.8 from ndk 12b :)
So, I've turned off this option and reduce size of compiling artefacts. Duration of building has been reduced too.
Reply all
Reply to author
Forward
0 new messages