Here is an error when trying to compile Gecko with “ac_add_options --enable-lto=cross”:
ld.lld: error: ../../../aarch64-linux-android/release/libgkrust.a(gkrust_shared-ce8e2738131fed85.gkrust_shared.32046063ea106ef0-cgu.0.rcgu.o): Invalid record
Looks like we need to compile the linker ourselves, like Mozilla does. Now we use the one from Android NDK.