[cfe-dev] add a language to clang

regis portalez regis.portalez at altimesh.com
Sat Jul 11 00:49:55 PDT 2015


Hi, I’m thinking about adding a subset of typescript (http://www.typescriptlang.org/)

 

(excluding some javascript inherited features)

 

From: mats.o.petersson at googlemail.com [mailto:mats.o.petersson at googlemail.com] On Behalf Of mats petersson
Sent: samedi 11 juillet 2015 08:59
To: Eli Bendersky
Cc: regis portalez; clang-dev Developers
Subject: Re: [cfe-dev] add a language to clang

 

As Eli says, this is dependent on what your language is - I have written my own Pascal compiler, and it is not part of clang, it uses NOTHING of clang in fact, just llvm. If your language isn't very close to C, that would be my recommendation.

--

Mats

 

On 10 July 2015 at 22:10, Eli Bendersky <eliben at google.com <mailto:eliben at google.com> > wrote:

 

 

On Fri, Jul 10, 2015 at 2:03 PM, regis portalez <regis.portalez at altimesh.com <mailto:regis.portalez at altimesh.com> > wrote:

Hi, 

 

I’m willing to add a new language in clang. 

 

I’d like to know what are the best practices before starting the actual implementation. 

I’m already (kind of) familiar with clang/llvm, but I don’t want to waste an excessive amount of time in trying lousy options. 

I synchronized clang on my local repository, and I read that http://llvm.org/docs/tutorial/LangImpl1.html <https://urldefense.proofpoint.com/v2/url?u=http-3A__llvm.org_docs_tutorial_LangImpl1.html&d=AwMFAw&c=8hUWFZcy2Z-Za5rBPlktOQ&r=CnzuN65ENJ1H9py9XLiRvC_UQz6u3oG6GUNn7_wosSM&m=6aZcYSynvgyZEH3W-ii6Dcb4Z41I2g9jwnCnrXH8WkY&s=el6TF4MLEK_tjFoaZVRjPt6XujhWpS8BmQb5zcslcAQ&e=> . 

 

I’d like to get feedbacks from people who actually did that kind of work, and know which are the pitfalls. 

 

To make it short, these are my questions: 

-          Branching strategy : what is the best way? Should I branch the whole llvm repository? 

-          Code writing: Should I start writing code directly, targeting a small subset of the target language and iterate from that? Should I instead think a lot about my stuff and consider writing code once I’m sure I’ll be able to compile the entire language?

-          Commit : considering I’ve written a really good clang extension, and I want that to make it public. How can I merge to the trunk? 

 

What language/extension do you want to add?

 

Eli

 

 


_______________________________________________
cfe-dev mailing list
cfe-dev at cs.uiuc.edu <mailto:cfe-dev at cs.uiuc.edu> 
http://lists.cs.uiuc.edu/mailman/listinfo/cfe-dev

 

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-dev/attachments/20150711/6935f2e2/attachment.html>


More information about the cfe-dev mailing list