I'm currently using
xcodebuild -project path/to/my.xcodeproj -scheme MyApp -fprofile-arcs -ftest-coverage
Apparently most compiler flags can be expressed as constants, and these can be passed to the compiler via xcodebuild easily.
To get them, simply select the option in the xcode build settings view, and hit command-C (copy). In my case, they were
My command roughly looks like this:
xcodebuild GCC_GENERATE_TEST_COVERAGE_FILES=YES GCC_INSTRUMENT_PROGRAM_FLOW_ARCS=YES ...