Important: Please read the Qt Code of Conduct -

How to compile only arm64 target on iOS

  • I have compiled a lib library that seems to compile armv7 and arm64 at the same time.
    But I don't want to compile the goal of armv7. Does anyone know how to solve it?

    build log:
    /Applications/ -c -pipe -stdlib=libc++ -O2 -fPIC -std=gnu++11 -arch armv7 -arch arm64 -arch i386 -arch x86_64 -Xarch_armv7 -miphoneos-version-min=8.0 -Xarch_armv7 -isysroot/Applications/ -Xarch_arm64 -miphoneos-version-min=8.0 -Xarch_arm64 -isysroot/Applications/

  • Lifetime Qt Champion


    What version of Qt are you using ?

  • Hi,

    having the same problem. I'm using Qt 5.11, Qt Creator 4.7.1.

    My .pro contains
    but this doesn't change anything.

    Edit: For me I want to get rid of the x86_64 arch. It causes this warning:

    ld: warning: ignoring file /Users/sertac/Ogre/dependecies/cabalistic-ogredeps-019e46bf5ce0/Build/src/freetype/Release-iphoneos/libfreetype.a, missing required architecture x86_64 in file /Users/sertac/Ogre/dependecies/cabalistic-ogredeps-019e46bf5ce0/Build/src/freetype/Release-iphoneos/libfreetype.a (2 slices)


    /Applications/ -c -pipe -stdlib=libc++ -O2 -std=gnu++11  -arch arm64  -arch x86_64 -Xarch_arm64 -miphoneos-version-min=10.0 -Xarch_arm64 -isysroot/Applications/ -Xarch_x86_64 -mios-simulator-version-min=10.0 -Xarch_x86_64 -isysroot/Applications/ -fobjc-nonfragile-abi -fobjc-legacy-dispatch -fembed-bitcode -Wall -W -Wno-unused-parameter -fPIC -DQT_COMPILER_SUPPORTS_SSE2 -DINCLUDE_RTSHADER_SYSTEM -I../OgreTest -I. -I../../../../Qt5.11/5.11.1/ios/mkspecs/common/uikit -I../../../../Qt5.11/5.11.1/ios/mkspecs/macx-ios-clang -o main.o ../OgreTest/main.cpp
    /Applications/ -stdlib=libc++  -arch arm64  -arch x86_64 -Xarch_arm64 -miphoneos-version-min=10.0 -Xarch_arm64 -Wl,-syslibroot,/Applications/ -Xarch_x86_64 -mios-simulator-version-min=10.0 -Xarch_x86_64 -Wl,-syslibroot,/Applications/ -fembed-bitcode -Wl,-rpath,@executable_path/Frameworks -o OGRETest main.o   -L/Users/sertac/Ogre/dependecies/cabalistic-ogredeps-019e46bf5ce0/Build/src/freetype/Release-iphoneos -lfreetype 

  • Ok, I managed to disable the simulator (x86_64) part using:


    @OP: Try




    on older Qt versions.

  • @SGaist
    I changed a method, the library linked to the program is also compiled armv7 and arm64.
    First compile the armv7 and arm64 libraries separately, then merge them with the lipo tool.

Log in to reply