How can I build for iOS armv7?


#1

Using the released calculator sample for kotlin native 0.5 I can build and run the project in the simulators. However, when I change the deployment settings to iOS 8.0 for an old iPad I have around I can’t run the project on it. The linker complains about the architecture compiled being arm64 and not armv7. The linker fails to find the symbols and is unable to generate a binary:

ld: warning: ignoring file ~/Downloads/kotlin-native-macos-0.5/samples/calculator/build/konan/bin/xcode/KotlinArithmeticParser.framework/KotlinArithmeticParser, file was built for arm64 which is not the architecture being linked (armv7): ~/Downloads/kotlin-native-macos-0.5/samples/calculator/build/konan/bin/xcode/KotlinArithmeticParser.framework/KotlinArithmeticParser
Undefined symbols for architecture armv7:
  "_OBJC_CLASS_$_KAP", referenced from:
      objc-class-ref in AppDelegate.o
  "_OBJC_CLASS_$_KAPCalculator", referenced from:
      objc-class-ref in ViewController.o
  "_OBJC_CLASS_$_KAPPartialParser", referenced from:
      objc-class-ref in ViewController.o
ld: symbol(s) not found for architecture armv7
clang: error: linker command failed with exit code 1 (use -v to see invocation)

Is there any way to generate code for this architecture as well?

UPDATE: Simulator also fails to run on iPhone 5 or iPhone 4s, iPhone 5s and above is fine. The architecture error is x86_64 vs i386 for these simulators.