Re: not-used-in-precomps
Re: not-used-in-precomps
- Subject: Re: not-used-in-precomps
- From: David Ewing <email@hidden>
- Date: Mon, 13 Jun 2005 14:21:38 -0600
Fritz,
It does look like you understand how it's supposed to work. One
important thing to note is that there are system headers that use the
preprocessor symbol named "DEBUG". So that's one definition that you
can't add to GCC_PREPROCESSOR_DEFINITIONS_NOT_USED_IN_PRECOMPS. The
compiler is being smart about such things and trying to protect you
from making a mistake (whether you want its protection or not).
Dave
On Jun 12, 2005, at 11:43 PM, Chris Espinosa wrote:
On Jun 12, 2005, at 2:33 PM, Fritz Anderson wrote:
About the new (2.1) build setting
GCC_PREPROCESSOR_DEFINITIONS_NOT_USED_IN_PRECOMPS...
Am I misconceiving the use of this setting? I had thought that two
targets could share a precompiled header, and then one could add a
preprocessor definition using this setting, and the change would
be "downstream" from the reading of the PCH. So Target A and
Target B could both use TargetA.pch, and Target B could
additionally specify as ...NOT_USED_IN_PRECOMPS, say, DEBUG=1, and
not spoil the precompilation
If I try this (and as the compiler suggested, turn on -Winvalid-
pch), I get:
========
cc1obj: warning: /Library/Caches/com.apple.Xcode.503/
SharedPrecompiledHeaders/Linear_Prefix-
apkchnlmwdltyrczcnulutdqxqdh/Linear_Prefix.pch.gch: not used
because `DEBUG' is defined
cc1obj: error: /Library/Caches/com.apple.Xcode.503/
SharedPrecompiledHeaders/Linear_Prefix-
apkchnlmwdltyrczcnulutdqxqdh/Linear_Prefix.pch: No such file or
directory
cc1obj: error: one or more PCH files were found, but they were
invalid
========
... which seems to be saying that the presence of a not-in-
precomps symbol, so far from permitting the sharing of PCHes,
actually prevents it.
Am I missing something, or should I report a bug?
You're not missing anything, that's what it's for. If you had had
DEBUG defined elsewhere, and moved it, then the old precomp would
still be around and would be, as you say, invalid. You might want
to just clear out all of /Library/Caches/com.apple.Xcode.503/
SharedPrecompiledHeaders/ before your next run, and check again.
The real way to tell whether you're actually sharing is to build
target A, then build target B, and see if there is a PrecompilePCH
build step in the transcript.
If this is not happening, file a bug, and please include the
contents of all .pch.gch.hash-criteria files from inside the
SharedPrecompiledHeaders folder. They'll tell us what the
differences among the headers are.
Chris
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Xcode-users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Xcode-users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden