After building for archive I got 8 warnings saying my ‘profile data may be out of date’.
I have no clue what this meant, so I googled the problem. I only ended up with some search results such as these:
- Email with Apple employees discussing the name of the compiler flag:
- Looks like the actual commit when this warning was added to LLVM:
That last one was good since the commit message actually described the problem:
“a warning that triggers when profile data doesn’t match for the source that’s being compiled with -fprofile-instr-use=“. Now I know this is about PGO, which related to XCode’s Generate Optimization Profile. I had deleted the build folder earlier and this caused the warnings.
Note the importance of always having descriptive commit messages.
How To Fix:
Here, Apple described how to use the Optimization Profile and how to enable it. I don’t want to use the profile I generated and corrupted, so I’m going to properly delete it and disable it. You can always regenerate the profile to fix this problem.
- Delete the group folder ‘OptimizationProfiles’ in your project
- Set the ‘Use Optimization Profile’ for the release to ‘No’
- Build again