Replies: 4 comments 12 replies
-
Afaik that should work fine as long as the user is using the same version of LLVM (should be compatible within any NDK major release) that was used to build libunityruntime.a. If it isn't, that sounds like a bug. I don't think it'd be a good thing for most library vendors since it could make getting agreement on the compiler version very difficult for the app developer, but Unity seems like a reasonable exception to me, since it already provides pretty clear guidance in which NDKs to use with each version of the engine. As an aside, r23's support window ended recently. If you're having issues migrating to r25, please let us know so we can help :) |
Beta Was this translation helpful? Give feedback.
-
Fun fact: |
Beta Was this translation helpful? Give feedback.
-
Any ideas why I have an LTO'ed build crashing early during init?
ACCERR without an address is weird, I compared binary sections etc but they are identical. Could it be compiler/linker flags conflicting? Or some UB which works fine until you LTO it? Suspecting static initialization order issues... |
Beta Was this translation helpful? Give feedback.
-
@DanAlbert finally our LTO got to a CI, and here's a crash:
happy to share the relevant contents of the response file if needed. NDK: r23b build agent: ubuntu VM, 16Gb RAM, 8 cores. |
Beta Was this translation helpful? Give feedback.
-
Hi!
After we've upgraded to r23b and finally switched the linker to lld (used to be bfd.ld for arm64 builds because issues!), now I'm looking into enabling LTO.
It works on my machine (c), although x86_64 build has increased in size (!) by 1%. (x86 shows best improvement, Arm gains ~1%). I haven't assessed performance yet too.
However, I have a question which is related to our workflow and a feature called "native engine stripping".
APK-size-wise, this optimization gives huge gains.
Can LTO be enabled in such a case? Does it matter if the compilation and linking happens on different machines (and maybe even different OS's)?
Thanks!
Beta Was this translation helpful? Give feedback.
All reactions