This allows ToolChain to decide if Clang is not the right C compiler.
Also, removed comment in Driver::ShouldUseClangCompiler implying that there was an opt-out ability at that point - there isn't.
Differential D10246
Make ToolChain::SelectTool virtual. dougk on Jun 4 2015, 8:25 AM. Authored by
Details This allows ToolChain to decide if Clang is not the right C compiler. Also, removed comment in Driver::ShouldUseClangCompiler implying that there was an opt-out ability at that point - there isn't.
Diff Detail
Event TimelineComment Actions Suggested some improvements to the comments below. Generally, this makes sense, but I think you should also mention your end-goal in the commit log. I happen to know because we've chatted, and so this change makes sense to me, but others won't have that context. For those reading the review log, the context is that there exist some embedded platforms which use specialized C derivatives and C compilers where Clang doesn't support their derivative yet. We'd like to add support for these platforms to Clang, but at least until we do, its useful if the toolchain for such an embedded target can detect special flags and dispatch to whatever embedded compiler is commonly used. This makes the Clang driver more of a drop-in replacement and starts us down the path of support. Actually, Doug, it might be worth sending an email to cfe-dev with the overall plan you have here to support C-dialects on embedded platforms by dispatching to the vendor-provided SDK until Clang grows support for that dialect. There you can give an overview and hopefully that'll provide context for folks seeing these commits. Comment Actions Folks on cfe-dev seem happy with this direction, so go ahead and submit with a tweaked comment as below...
|