react-native-community / jsc-android-buildscripts

Script for building JavaScriptCore for Android (for React Native but not only)

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

JSC Android 236355.1.1 is not striped

Thebarda opened this issue · comments

Issue Description

Hello,
I found that the last version of JSC Android (236355.1.1) is not striped.
This was not the case in jsc-android@174650.0.2, the .so file was striped
Indeed, the .so file sizes 12.7 MB. So, we could save about 1.8MB by striping that file.
Screenshot from 2019-03-26 16-45-12-1

To reproduce the following size reduction, just run strip your-jsc-android-file.so

Version, config, any additional info

JSC Android version : 236355.1.1

Gradle will do strip during APK packaging.
Keeping symbols from jsc-android AAR will benefit crash troubleshooting.

same problem

Keeping symbols from jsc-android AAR will benefit crash troubleshooting.

Agreed, I like this being the default from this library.

Gradle will do strip during APK packaging.

Are you sure, when I unpack an APK I see the same (.so) files coming from RN's (.aar) file?

I installed NDK bundle to strip libraries and JSC Android lib seems to be striped. I guess the file is just big.
So, the solution is just install NDK bundle

I've checked the gradle source code and found that the StripDebugSymbolTransform task will only do strip if NDK is setup.
That is aligned with @Thebarda said.
Thank you @hey99xx @Thebarda.

Will try to propose another build variant to ship debug symbols.

Why is this issue closed though? Shouldn't it be shipped with stripped symbols by default? Now that the new JSC is included in RN, lots of people will just bundle with debug symbols because they don't have the NDK installed.

I just noticed that with our CI: On my development machine I have the NDK installed, so symbols where stripped and I didn't notice anything off. But our CI does not have the NDK installed (as it was not needed), and so didn't strip symbols, bloating our final build.

Don't worry. Have a stripped version in plan. Just focus on RN 0.60 to make sure we could upgrade jsc-android for RN easier. Please stayed tune. Thank you.