grishka / libtgvoip

VoIP library for Telegram clients
The Unlicense
387 stars 156 forks source link

libtgvoip.gyp: non-portable compiler flag #28

Closed MingcongBai closed 6 years ago

MingcongBai commented 7 years ago

At line 379 of libtgvoip.gyp, here, it appears that the compiler flag -msse2 is added unconditionally to the build configuration - this has led to build failure on all non-x86 architectures as the compiler simply won't support it (not to mention all i686 and below processors which will not be able to run the compiled code for unsupported instructions).

Will it be at all possible to make this flag optional? To be honest I was going to yell this issue out here, but I did find many SSE2 related code branches so...

grishka commented 7 years ago

What exactly are you trying to do? The gyp file is intended for tdesktop, so it only builds for x86 and x86_64.

MingcongBai commented 7 years ago

Well I mean if it's made optional, Telegram Desktop could be built for ARMv7 and AArch64 for example... If a code builds, why limit that to x86?

grishka commented 7 years ago

The library is indeed compatible with ARM (I actually primarily debug it on mobile devices), though for better performance you would also want to add some ARM/NEON-specific sources that are already there but not added to the gyp file and add conditions to the x86 ones.

If you're actually porting tdesktop to ARM, a pull request would be welcome.