How can I build a specific architecture using xcodebuild?

前端 未结 2 1080
忘掉有多难
忘掉有多难 2020-12-05 02:53

I have legacy code that relies on pointers being 32-bit and want to use xCodeBuild to build that code from command line. This doesn\'t

2条回答
  •  广开言路
    2020-12-05 03:34

    You have to set the ONLY_ACTIVE_ARCH to NO if you want xcodebuild to use the ARCHS parameters. By passing these parameters, you can force the proper architecture.

    xcodebuild ARCHS=i386 ONLY_ACTIVE_ARCH=NO -configuration Debug -workspace MyProject.xcworkspace -scheme MyLib
    

    See this reference for details.

提交回复
热议问题