Question

Let's get this out of the way first: This question is not a duplicate of this earlier question. I'll explain why below.

I'm running the command xcodebuild test -scheme 'ISO8601ForCocoa' SYMROOT=../build, and here's the output:

Executed 16 tests, with 0 failures (0 unexpected) in 0.047 (0.051) seconds
profiling: invalid magic number (0x656d6954)
profiling: invalid magic number (0x00000000)
** TEST SUCCEEDED **

The person who asked that earlier question got the same error message, but they fixed it by cleaning their build folder.

In my case, cleaning will not help, because I don't have a build folder yet. I still get this error message even on a completely fresh build. In fact, the .gcda and .gcno files are not even created, so there is nothing to clean.

Was it helpful?

Solution

xcodebuild puts build products in $SYMROOT, but stores profile products in $OBJROOT.

If you want to completely confine a build, including all intermediate and ultimate products, to a single directory, you need to set three build settings:

  • SYMROOT: Build Products Path (ultimate products, such as apps and test bundles)
  • OBJROOT: Intermediate Build Files Path (intermediate products, such as per-module object files—generated by the compiler, read by the linker—and .gcno/.gcda files)
  • SHARED_PRECOMPS_DIR: Precompiled Headers Cache Path (guess)
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top