Question for the K/N team (or whoever else might k...
# kotlin-native
e
Question for the K/N team (or whoever else might know the answer): what's the required effort on Kotlin's side to update LLVM to 12 (or newer)? And is that even remotely a planned task?
h
Z? AFAIK LLVM visionOS support was just merged a few weeks ago and released with LLVM 18, so to support this target Kotlin needs to update to this version.
e
Yup. There is some noise to participate more in open source here, and understanding what can be done or not regarding K/N in Z would help deciding
h
And I guess visionOS has some higher demand 😂
😂 1
e
I mean we know z/Architecture isn't the typical target. But... who knows what can be done once the Native backend supports it
a
I am doing some research on this as my Master-thesis and I tried to bump LLVM to a higher version (targeting 17). At the end its very hard to do this. A lot of internal barely documented files need to be touched. The complete LLVM JNI stub generation has to be run through and since LLVM forces opaque pointers now, the existing codebase is not working straight forward. At a certain point I had to stop investing all my time into that, since I need to finish my thesis with a clear explanation why the objective was so hard. I can definitely tell, it is not just bumping a version 😉
h
Well, if it was easy, I guess (hope) Jetbrains would have already done it 😄 What's your thesis thought?
a
I am going to extend the K/N compiler to support Risc-V targets.
🚀 3
Not sure how much information I am allowed to share before I publish the thesis, but I can tell I am facing 3 different strategies. One involves to bump the LLVM distribution in the Kotlin repository. As mentioned, I had to cancel that approach and I will about write all my challenges in the thesis. Good thing here is that the POC was already working, when just a higher LLVM Linker is used, but not a higher LLVM backend.
Because the compiled files will be linked at the very end with files of a cross compile toolchain and they need RISCV_RELAXATION support. And the current LLVM linker does not support it and will crash.
h
Sounds really interesting, can't wait to read your thesis (no pressure)
😂 2