[cfe-commits] [patch] fix -include relative path .d file generation

Douglas Gregor dgregor at apple.com
Wed Feb 23 07:58:17 PST 2011


On Feb 15, 2011, at 6:47 PM, Nick Lewycky wrote:

> Hi,
> 
> There's a small difference between gcc and clang in emitted .d files when -include was passed a relative path. Sadly, this actually breaks our build system. GCC preserves what the user wrote in the argument while clang replaces it with an absolute path. That breaks for us because we try to relocate those files afterwards.
> 
> This moderately gnarly patch extends an existing hack to insert the file specified in the -include path first, and any subsequent #include lookups will find the same file with the first path is was looked up with.
> 
> Please review!

Looks fine to me.

	- Doug





More information about the cfe-commits mailing list