Error in ProcessPCH (xcodebuild)

Hi, all
When I use “xcodebuild” to build my iOS project, the process stopped in compling “PrefixHeader.pch”. I use the following command:

=> xcodebuild -project xxx -scheme yyy build OTHER_CFLAGS=“-mllvm -xt-obf”

the error messages are:

=> clang (LLVM option parsing): Unknown command line argument ‘-xt-obf-header’. Try: ‘clang (LLVM option parsing) -help’
clang (LLVM option parsing): Did you mean ‘-xt-obf’?

That means: The “clang” compiler change my “xt-obf” to “xt-obf-header” in compling “PrefixHeader.pch”.
I want to kown the reseaon and the way to fix it. Can anyone help me ? Thanks.

Maxs

Hi, all
When I use “xcodebuild” to build my iOS project, the process stopped in compling “PrefixHeader.pch”. I use the following command:

=> xcodebuild -project xxx -scheme yyy build OTHER_CFLAGS=“-mllvm -xt-obf”

the error messages are:

=> clang (LLVM option parsing): Unknown command line argument ‘-xt-obf-header’. Try: ‘clang (LLVM option parsing) -help’
clang (LLVM option parsing): Did you mean ‘-xt-obf’?

That means: The “clang” compiler change my “xt-obf” to “xt-obf-header” in compling “PrefixHeader.pch”.
I want to kown the reseaon and the way to fix it. Can anyone help me ? Thanks.

Maxs

Hi, all
I find that the “xcodebuild” can work if I turn off the “Precompile Prefix Header” in “Build Settings”. Are there other ways to fix it? And why clang change
my option?

Thanks,
Maxs

It seems to me from the log you posted that it is not clang that changed anything but xcodebuild that is invoking clang with -mllvm -xt-obf-header (I don’t know why).

How is the clang invocation affected by other -mllvm parameters?

It could be that xcodebuild passes "-xt-obj-header" independently of your OTHER_CFLAGS. Also, _if_ some option re-writing is going on, it'd likely be done by xcodebuild (not clang).

If you search "file a bug against Xcode", you might find the right place to send this.

best
vedant