Bug 117674

Summary: Support using clang instead of gcc for bindings preprocessing
Product: WebKit Reporter: Darin Adler <darin>
Component: Tools / TestsAssignee: Darin Adler <darin>
Status: RESOLVED FIXED    
Severity: Normal CC: cdumez, commit-queue, ddkilzer, mrowe
Priority: P1    
Version: 528+ (Nightly build)   
Hardware: Unspecified   
OS: Unspecified   
Attachments:
Description Flags
Patch none

Description Darin Adler 2013-06-15 10:45:27 PDT
Support using clang instead of gcc for bindings preprocessing
Comment 1 Darin Adler 2013-06-15 10:46:08 PDT
Created attachment 204771 [details]
Patch
Comment 2 WebKit Commit Bot 2013-06-15 19:15:58 PDT
Comment on attachment 204771 [details]
Patch

Clearing flags on attachment: 204771

Committed r151619: <http://trac.webkit.org/changeset/151619>
Comment 3 WebKit Commit Bot 2013-06-15 19:16:00 PDT
All reviewed patches have been landed.  Closing bug.
Comment 4 David Kilzer (:ddkilzer) 2013-06-15 20:09:46 PDT
The 'CC' environment variable should have been set to the correct compiler by the "Generate Derived Sources" build phase script (unless you were running the scripts outside of an Xcode build).

In the case of running the scripts outside of Xcode, the proper way to fix this for Mac OS X is to use 'xcrun' to find 'cc', which maps to the default compiler for the specified SDK (or the "current" SDK on Mac OS X) rather than to hard-code paths that assume the "CLTools" package is installed with Xcode (which isn't always true):

xcrun -find cc
Comment 5 Mark Rowe (bdash) 2013-06-15 20:17:22 PDT
Yeah, I'm also surprised that the CC environment variable wasn't taking care of this.
Comment 6 Darin Adler 2013-06-16 08:42:11 PDT
(In reply to comment #4)
> The 'CC' environment variable should have been set to the correct compiler by the "Generate Derived Sources" build phase script (unless you were running the scripts outside of an Xcode build).

I was. This is to make run-bindings-tests work. Sorry, I should have said that.

> In the case of running the scripts outside of Xcode, the proper way to fix this for Mac OS X is to use 'xcrun' to find 'cc', which maps to the default compiler for the specified SDK (or the "current" SDK on Mac OS X) rather than to hard-code paths that assume the "CLTools" package is installed with Xcode (which isn't always true):
> 
> xcrun -find cc

We could put a Mac-specific fix like that into these two perl scripts, or add Mac-specific code to run-bindings-tests so it sets CC. Do you have a preference, Dave?