Bug 75622 - [chromium] after updating clang, incremental build doesn't work
Summary: [chromium] after updating clang, incremental build doesn't work
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Tools / Tests (show other bugs)
Version: 528+ (Nightly build)
Hardware: Mac OS X 10.7
: P2 Normal
Assignee: jochen
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-01-05 06:28 PST by jochen
Modified: 2012-01-19 05:53 PST (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description jochen 2012-01-05 06:28:03 PST
After updating clang (via update-webkit --chromium), I get the following errors trying to rebuild:

error: PCH file built from a different branch (trunk 147225) than the compiler (trunk 147434)
1 error generated.
make: *** [out/Debug/obj.target/webcore_platform/Source/WebCore/platform/audio/VectorMath.o] Error 1
Comment 1 jochen 2012-01-05 10:40:40 PST
Nico, any idea?
Comment 2 Nico Weber 2012-01-05 10:49:07 PST
tools/clang/script/update.sh runs

      find "out/${CONFIG}/obj.target" -name '*.gch' -exec rm {} +

to clobber gch files after a clang update, but it has a hardcoded relative path from update.sh to the out dir that I suppose is wrong in a webkit standalone build. Bleh.

Maybe the script could grow an optional build dir parameter?

(To get unblocked, just run the command above on your out/ directory. I'll try to come up with a fix.)
Comment 3 jochen 2012-01-05 10:54:15 PST
(In reply to comment #2)
> tools/clang/script/update.sh runs
> 
>       find "out/${CONFIG}/obj.target" -name '*.gch' -exec rm {} +
> 
> to clobber gch files after a clang update, but it has a hardcoded relative path from update.sh to the out dir that I suppose is wrong in a webkit standalone build. Bleh.
> 
> Maybe the script could grow an optional build dir parameter?
> 
> (To get unblocked, just run the command above on your out/ directory. I'll try to come up with a fix.)

ah, that may again collide with me using make instead of xcode?

I guess the script is executed in ./Source/WebKit/chromium, while the make build puts the stuff in ./out
Comment 4 Nico Weber 2012-01-05 11:03:04 PST
> ah, that may again collide with me using make instead of xcode?
> 
> I guess the script is executed in ./Source/WebKit/chromium, while the make build puts the stuff in ./out

No, the script looks for tools/clang/scripts/../../../out, I guess in the webkit build that doesn't work. For xcode, it also looks at tools/clang/scripts/../../../xcodebuild, so I'd expect this to be equally broken for both make and xcodebuild – maybe the gch format just hasn't changed in a while?

tools/clang/scripts/update.sh is fairly simple, maybe you can add a few debug echos (search for "gch") – or wait until I get to it.