[cfe-dev] clang PCH and strace

Jean-Daniel Dupas devlists at shadowlab.org
Tue Sep 28 15:08:15 PDT 2010


Le 28 sept. 2010 à 23:06, Sebastian Redl a écrit :

> 
> 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.


You can confirm that by doing

strace clang --version

and 

clang --version

-- Jean-Daniel








More information about the cfe-dev mailing list