[LLVMdev] Preferring to use GCC instead of LLVM

Gordon Henriksen gordonhenriksen at mac.com
Tue May 13 00:37:38 PDT 2008


On 2008-05-13, at 01:49, kr512 wrote:

> Chris Lattner wrote:
>> FWIW, I wouldn't be surprised if the LLVM project eventually grew  
>> more of native toolchain support (e.g. assembler, linker, etc).  It  
>> would fit naturally with the growing scope of the project.
>
> Yes, it would, and it would make LLVM more popular and more usable  
> in real-world situations.
>
>> I don't think that it is a high priority for anyone though.
>
> Then you are disadvantaging the LLVM project and holding it back.  I  
> see you are working on a C front-end "clang". Personally I think  
> that a C front-end should be a much lower priority than delivering a  
> COMPLETE backend.
>
> Another C compiler is not needed.  GCC and MSVC already do that job,  
> and you won't supplant them.  The thing that is really needed is in  
> accordance with the essence of LLVM -- a complete backend solution.

This is highly presumptive of you to say. Your inquiries would be much  
more well-received if you elided such passages, as they only serve to  
offend. Likewise, you use “real world situations” as a rather  
overbroad proxy for your own needs. And you simultaneously use your  
customers to justify your own ignorance and demean them with the  
pejorative “Windoze.” It is hypocritical of you to criticize others  
for their unprofessional responses when your own postings have been  
and continue to be presumptive, insulting, and poorly researched.

> Owen Anderson wrote:
>> The OP was implying that LLVM is incomplete because it depends on  
>> GCC in the backend, which is incorrect.  It depends on binutils,
>
> Alright, so I used the wrong name.  I said GCC but I should have  
> said binutils.  My original point remains valid -- LLVM is an  
> incomplete backend because by itself it is unable to generate a  
> ready-to-execute .EXE or .DLL file.
>
> And binutils is not necessarily available on the customer's  
> computer.  Do all Linux and BSD distributions include it  
> preinstalled?  Maybe, but what about Windoze and MacOS?  I know  
> Windoze does not include it or any equivalent.  And Apple's  
> developer tools (Xcode etc) for MacOS X are not preinstalled either,  
> they are a separate download (although perhaps binutils is  
> preinstalled in MacOS X, not sure, haven't checked).

The object writers are just part of the problem (if indeed one  
exists); a linker is still necessary. That's an area that LLVM is very  
unlikely to grow into in the near future. Obviously all depends upon  
contributors, so I cannot state this categorically. But it is a matter  
of fact that there have been no contributions of native linkers.

So: LLVM provides neither assemblers nor linkers. This is the reality,  
and no amount of vitriol will not change it. You are not a customer  
here; there is no vendor-customer relationship. LLVM does what its  
contributors have seen fit to make it do, neither more nor less. So  
when it was suggested that you write the code, it was not a flip  
retort; in fact, such is the only way the project advances.

But I digress. if LLVM provides value to your project, you will need  
to address the assembler-linker issue in order to use it. Ultimately,  
this is your responsibility, not ours. However, this is a helpful  
community (to a point)—so if you are unable to find a solution on your  
own, we may be able to help. But the community can only provide a  
constructive response if you give them sufficient context to do so;  
the first concrete remarks you've made in this direction are to remark  
how your project already targets C. And you must keep an open mind,  
since the community will not find you a solution within your framework  
if you over-constrain the problem.

Given what you've said so far, for instance, we have no way of knowing  
what constrains you from precompiling your assembly. That is, if you  
can do compilation at installation time, for the OS X and Windows  
platforms there's no reason you can't do compilation ahead of time. I  
think it perfectly reasonable to presume that you already have access  
to assemblers and linkers in your development environment, and this  
solves your problem of creating a dependency for customers.

— Gordon





More information about the llvm-dev mailing list