Ok so I'm working on an SM Ext/AMXX Module (code compiles fine on both SM API and AMXX api in current stage) but I noticed something wierd.
As I already know, SM and AMXX (Not 100% sure if true for AMXX) are compiled with clang,
my project is setup to work on clang-3.8 and gcc(g++)-4.8
Wierd part: Binary size of binary compiled with clang is roughly 2x bigger then version under gcc/g++
PHP Code:
Sizes:
AMXX API:
clang: 520KB
gcc: 223KB
SM API:
clang: 478KB
gcc: 217KB
The project statically compiles and links latest source of libbz2 and zlib (at time of thread post) during AMBuild process. Compile flags is as minimal warning disabling as possible (CXX projects get the exception mismatch warning disabled due to SM/AMXX api requiring it), 2 other flags are added onto building 3rd party project code(1 per 3rd party build, other doesn't get it)
Builds were set for optimization (-O3)
Anyone explain to me why clang is producing 2x bigger binary when code variance is practically none existent (except between which API being built against)?
Edit: Digging around compiled files for the project yielded the heavy file size hitters for building with clang being the third party code(zlib, bzip2), zlib ranking highest for most file size.
__________________