[llvm-commits] PATCH: New option for bitcode output file in llvm-ld

Nick Lewycky nicholas at mxc.ca
Mon Jul 20 22:56:36 PDT 2009


Sanjiv Gupta wrote:
> sanjiv gupta wrote:
>> On Wed, 2009-07-15 at 22:21 -0700, Nick Lewycky wrote:
>>  
>>> Your description of the option made me say "what?" several times. Please
>>> try to clarify it.
>>>     
> Done.
>>> This patch doesn't change the behaviour when llvm-ld emits a shell 
>>> script. I would've expected it (based on the name and description) to 
>>> change the name of the .bc file that the shell script runs.
>>>
>>>     
>> Right. I missed to make that change.
>>   
> Done. Attached is the revised patch.

+=item B<-b> F<filename>
+
+This option can be used to override the output bitcode file name. By 
default, the name of the bitcode output file is one more ".bc" suffix 
added to the name specified by B<-o filename> option.
+

Wrap the long line, and it looks file to me!

>>  
>>> It's still not clear to me what problem this is solving for you. Why 
>>> not just use "-link-as-library -o"?
>>>
>>> Nick
>>>     
>>
>> I want to use llvm-ld as a linker to link a user program with required
>> libraries (also bitcode) and generate the linked .bc file with the name
>> that user has specified.  That linked .bc file will then be passed to
>> the llc to generate native code. (I am not sure whether -link-as-library
>> serves the same purpose. )
>>
>> Now about the problem that it solves.
>> The llvmc driver framework is a graph based model whether output
>> filename of one tool goes as input filename of another tool. i.e.
>> llvm-ld's output file name goes as input file name to llc. So even after
>> specifying the -o hello.bc, the linked .bc file generated is
>> hello.bc.bc, and llc receives only hello.bc as input file name.
>>
>> - Sanjiv
>>
>>
>>   
> 
> 
> ------------------------------------------------------------------------
> 
> _______________________________________________
> llvm-commits mailing list
> llvm-commits at cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits




More information about the llvm-commits mailing list