Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. Mobile and Embedded
  4. How to compile only arm64 target on iOS

How to compile only arm64 target on iOS

Scheduled Pinned Locked Moved Unsolved Mobile and Embedded
5 Posts 3 Posters 2.2k Views 2 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • C Offline
    C Offline
    chyly
    wrote on last edited by
    #1

    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/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang++ -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/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS11.4.sdk -Xarch_arm64 -miphoneos-version-min=8.0 -Xarch_arm64 -isysroot/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS11.4.sdk

    1 Reply Last reply
    1
    • SGaistS Offline
      SGaistS Offline
      SGaist
      Lifetime Qt Champion
      wrote on last edited by
      #2

      Hi,

      What version of Qt are you using ?

      Interested in AI ? www.idiap.ch
      Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

      C 1 Reply Last reply
      0
      • J Offline
        J Offline
        Jan80
        wrote on last edited by Jan80
        #3

        Hi,

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

        My .pro contains
        QMAKE_APPLE_DEVICE_ARCHS=arm64
        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)
        

        Log:

        /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang++ -c -pipe -stdlib=libc++ -O2 -std=gnu++11  -arch arm64  -arch x86_64 -Xarch_arm64 -miphoneos-version-min=10.0 -Xarch_arm64 -isysroot/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS11.3.sdk -Xarch_x86_64 -mios-simulator-version-min=10.0 -Xarch_x86_64 -isysroot/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator11.3.sdk -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/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang++ -stdlib=libc++  -arch arm64  -arch x86_64 -Xarch_arm64 -miphoneos-version-min=10.0 -Xarch_arm64 -Wl,-syslibroot,/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS11.3.sdk -Xarch_x86_64 -mios-simulator-version-min=10.0 -Xarch_x86_64 -Wl,-syslibroot,/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator11.3.sdk -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 
        
        1 Reply Last reply
        0
        • J Offline
          J Offline
          Jan80
          wrote on last edited by
          #4

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

          QMAKE_APPLE_SIMULATOR_ARCHS=
          

          @OP: Try

          QMAKE_APPLE_DEVICE_ARCHS=arm64
          

          or

          QMAKE_IOS_DEVICE_ARCHS=arm64
          

          on older Qt versions.

          1 Reply Last reply
          1
          • SGaistS SGaist

            Hi,

            What version of Qt are you using ?

            C Offline
            C Offline
            chyly
            wrote on last edited by
            #5

            @SGaist
            QT9.6.
            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.

            1 Reply Last reply
            0

            • Login

            • Login or register to search.
            • First post
              Last post
            0
            • Categories
            • Recent
            • Tags
            • Popular
            • Users
            • Groups
            • Search
            • Get Qt Extensions
            • Unsolved