Cannot build large project for arm64, unrecognized option --long-plt

Hello!

So my issue is when I am trying to build my rather big project unity automatically adds --long-plt option to the linking phase. For the arm7 all builds successfully, but for the arm64 linker doesn’t have such option. So the linking fails with error below. Is there a workaround for this?

Unity version 2020.3.17f1. Tried different NDK versions and different unity 2020 versions. None helped. Does not happen on 2018.4.35f1. IOS builds succsessfully, problem only persists for Android.

1 Like
1 Like

Having same issue. Originally, we had the error

arm-linux-androideabi/bin/ld.gold: error: PLT offset too large, try linking with --long-plt

When we use Unity’s suggested workaround (Unity Issue Tracker - [Android] [IL2CPP] Flag --long-plt is missing when building a release build (Error: PLT offset too large, try with --long-plt)) of PlayerSettings.SetAdditionalIl2CppArgs("--command-log=on --linker-flags=\"-Wl,--long-plt\"");

We started getting aarch64-linux-android/bin/ld.bfd: unrecognized option '--long-plt'

This happens when building Android on Unity Cloud Build