[cfe-dev] clang PCH and strace

Sebastian Redl sebastian.redl at getdesigned.at
Tue Sep 28 14:06:16 PDT 2010


On Sep 28, 2010, at 1:59 PM, dawn at burble.org wrote:

> Why would strace (on Linux) cause clang to fail to read a PCH? :
> 
> 1. $ clang -cc1 -emit-pch -I/tmp/ /tmp/m.h -o m.pch
>   $ clang -cc1 -include-pch m.pch -I/tmp/ /tmp/m.c
> 
> 2. $ clang -cc1 -emit-pch -I/tmp/ /tmp/m.h -o m.pch
>   $ strace -o bla -e open clang -cc1 -include-pch m.pch -I/tmp/ /tmp/m.c
>   error: PCH file uses a newer PCH format that cannot be read
>   1 error generated.
> 
> 1st command works, 2nd command (with strace) fails.

I give you a 99% probability of the strace command picking up a different clang executable.

Sebastian



More information about the cfe-dev mailing list