Xcode 7.3 library project compiles every time

I have a library project that used to build just fine in Xcode 7.2. If I just compiled it, it would rebuild it on subsequent builds. After upgrading to Xcode 7.3, Xcode recompiles all the files on every build even if I make no changes to any file.

I did a deep clean and also deleted the derived data folder to make sure that was not the cause. The dependent library projects build fine (they don’t recompile everything) when I compile them independently. I have looked through all the settings but couldn’t figure out why this is happening.

  • Comparing two dates with nsdate
  • Can iOS do central and peripheral work on same app at same time?
  • EAAccessory/EASession teardown during background
  • How to update our static library architecture for suporting arm64 Build?
  • “changing property masksToBounds in transform-only layer, will have no effect” in Xcode 7
  • Disable storyboard warnings
  • I stumbled upon 2 things that “fixed” the problem but I don’t want to use any of these “solutions”

    1. 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).

    2. I have a pre-processor flag (DEBUG=1) for debug builds and if I remove that flag then it stops recompiling all the files, all the time

    The above 2 options don’t work for me.

    Has anyone seen similar behavior?

    Solutions Collect From Internet About “Xcode 7.3 library project compiles every time”

    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 !