[英]What optimizations / settings should I use for compiling in release mode in Xcode for MacOS?
I have an app I am working on that will be used in MacOS with Adobe products.我正在开发一个应用程序,该应用程序将在 MacOS 中与 Adobe 产品一起使用。
The SDK only comes with a debug release mode for the projects. SDK 仅带有项目的调试发布模式。 If I try to edit the scheme and look under 'run', I cannot switch it to release as there is no other option either than debug.
如果我尝试编辑方案并查看“运行”下的内容,则无法将其切换为发布,因为除了调试之外别无选择。 From what I've read, this means I either have to create a new scheme, or edit this one.
从我读到的内容来看,这意味着我要么必须创建一个新方案,要么编辑这个方案。
In Windows, compiling between debug and release mode produces a huge performance difference in the app so I assume the same thing happens in MacOS.在 Windows 中,在调试模式和发布模式之间进行编译会在应用程序中产生巨大的性能差异,所以我假设在 MacOS 中也会发生同样的事情。 For this reason, it is important for me to set the appropriate optimizations correctly.
因此,正确设置适当的优化对我来说很重要。 However, I have no idea which are important.
但是,我不知道哪些是重要的。
Does anyone have suggestions on what are the key optimizations I should set by either editing the debug mode, or creating a new one, for optimal performance from my app?有没有人建议我应该通过编辑调试模式或创建新模式来设置哪些关键优化,以获得应用程序的最佳性能?
Thank you - I am a little blind in this department as I am a Windows developer and Mac is new to me.谢谢 - 我在这个部门有点盲目,因为我是一名 Windows 开发人员,而 Mac 对我来说是新手。
Thanks, -Richard谢谢,-理查德
To create a new scheme:要创建新方案:
Click on '+' under where it says AppStore.单击 AppStore 下方的“+”。 This creates a duplicate of an existing scheme with a new name.
这将使用新名称创建现有方案的副本。
Edit the newly created configuration with the desired compiler settings etc.使用所需的编译器设置等编辑新创建的配置。
The newly created configuration should then show up in the 'Edit Schemes' window.新创建的配置随后应显示在“编辑方案”窗口中。
Edit: To set optimisation flags, get your screen looking like this and then select the flags you want for each configuration:编辑:要设置优化标志,让你的屏幕看起来像这样,然后为每个配置选择你想要的标志:
I encourage you to experiment.我鼓励你去尝试。 None of this is difficult.
这一切都不难。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.