If Xcode's build directories are set to an absolute path at the project or workspace level rather than the application level then builds from the command-line and GUI can use different values for SHARED_PRECOMPS_DIR. This can cause the appearance of full rebuilds when switching between the command-line and GUI the precompiled headers built in one context will not be used by the other. webkitdirs.pm contains logic to set SHARED_PRECOMPS_DIR to the same value that the Xcode GUI uses, but currently only sets it if the build directory is set at the application level. If we were to always set it when using Xcode 4 then this would allow the precompiled headers to be shared between command-line and GUI builds, avoiding the extra rebuilds. One downside is that if Xcode's build directory is configured to use the "Legacy" setting then builds within Xcode don't override SHARED_PRECOMPS_DIR. We can accommodate this setting when set at the application level, but we have no way of detecting it on individual projects. This means that fixing the absolute path case will introduce the same problem for users of the "Legacy" setting at the project or workspace level. I think that's a reasonable trade-off to make though given that "Legacy" is intended for legacy projects, and that a solution exists (switch to using absolute paths). <rdar://problem/11570029>
Created attachment 149789 [details] Patch v1
Landed in r121422.