如何在Xcode中禁用一个文件的优化
问题描述:
我的Xcode项目依赖于另一个库,当我使用 [-O3]
选项构建它时,这会导致我的项目出错.
错误仅在一个文件中.因此,我想关闭该文件的 [-O3]
选项.
有可能吗?
My Xcode project depends on another library, that cause errors in my project when I built it with [-O3]
option.
The errors are in just one file. So I want to turn off the [-O3]
option for that file.
Is it possible?
答
打开目标,在 Build Phases
下查看.打开 Compile Sources
步骤.找到有问题的文件,然后单击右侧的 Compiler flags
列.
输入 -O0
以关闭优化.
Open the target, look under Build Phases
. Open the Compile Sources
step. Locate the file in question, and click the Compiler flags
column to the right.
Enter -O0
to turn off optimisation.