Bug 117674 - Support using clang instead of gcc for bindings preprocessing
Summary: Support using clang instead of gcc for bindings preprocessing
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Tools / Tests (show other bugs)
Version: 528+ (Nightly build)
Hardware: Unspecified Unspecified
: P1 Normal
Assignee: Darin Adler
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-06-15 10:45 PDT by Darin Adler
Modified: 2013-06-16 08:42 PDT (History)
4 users (show)

See Also:


Attachments
Patch (2.17 KB, patch)
2013-06-15 10:46 PDT, Darin Adler
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
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?