Xcode 7.3 recompiles library project everytime

Hi - I have a library project that used to build just fine in Xcode 7.2. After upgrading to Xcode 7.3 Xcode recompiles all the files on every build even if I make no changes to this build. I did a deep clean and also deleted th derived data folder to make sure that was not the cause. The dependant library projects build fine (they dont recompile everything). I have looked through all the settings but couldnt figure out why this is happening.


I came across some LTO issues but I dont know if that is causing the recompile every time I build.


Has anyone else seen this before?

Accepted Reply

I figured out the problem.

In Xcode one of the Build Settings was not set correctly. The "C Language Dialect" was set to "GNU99" instead of "Compiler Default". Previously the standard was GNU99 but now its not. At some point Xcode did not migrate the library project settings correctly and so it was set to GNU99. Once I changed it to GNU99 it stopped recompiling all my code every time !

Replies

> I did a deep clean


If that wasn't an option-clean build folder, you may have wasted your time.

I have stumbled onto a solution though I am not sure why it works 🙂


I changed the Optimization Level (for LLVM) from None [-O0] to Fastest, Smallest [-Os] and that did the trick. Im not sure why without the optimization it recompiled all the files, all the time (even if it was not changed).


EDIT: In the Preprocessor macro I have a DEBUG=1 and if I remove that then it stops recompiling !

I figured out the problem.

In Xcode one of the Build Settings was not set correctly. The "C Language Dialect" was set to "GNU99" instead of "Compiler Default". Previously the standard was GNU99 but now its not. At some point Xcode did not migrate the library project settings correctly and so it was set to GNU99. Once I changed it to GNU99 it stopped recompiling all my code every time !