On Aug 14, 2013, at 10:20 , Jerry Krinock < email@hidden> wrote: Apparently it is not, because in my current project, Optimization Level > Debug is overridden to "None" at the Target level, for all relevant targets.
On Aug 14, 2013, at 08:59 , Jens Alfke < email@hidden> wrote: But today I ran into this again, and I dug into the target build settings and saw that the optimization level is “Fastest, smallest” (-Os). Oops, yeah, that’s going to mess up the debugger. :-P But that setting isn’t coming from the project — Xcode is defaulting to full optimization even for the Debug configuration
In every version of Xcode I've ever used (which is back to version 2.x), every new-project template has set the debug [non-]optimization at the level of the target. I suppose it wouldn't be very hard to delete the setting accidentally, or perhaps there are ways of creating projects via scripting that don't use a template.
This seems like a pretty glaring bug. And it’s apparently been around for a while, because I’ve had problems like this for a year at least. Anyone got a clue why it does this?
One reason I can think of: Xcode-defaults *are* built-in defaults, but there's nothing built-in about the presence of a Debug configuration. That, too, comes from the new-project templates (AFAIK).
Perhaps you could argue there's a slight advantage in having templates define the optimization settings at the project level rather than the target level, but that's hardly a glaring bug, and it wouldn't protect you against whatever caused your target to lose this setting a year ago.
|