Chogri
Chogri

Reputation: 336

How to Disable Optimization for One File in Xcode

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?

Upvotes: 7

Views: 5276

Answers (1)

Aderstedt
Aderstedt

Reputation: 6518

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.

Upvotes: 6

Related Questions