[LLVMdev] Compiling zlib to static bytecode archive

Anton Korobeynikov asl at math.spbu.ru
Thu Sep 27 23:25:47 PDT 2007


Hello, Maarten

> As far as I can see, collect2.c does not read the object files though: it 
> only runs "nm" on them, which is not what we need to determine which files 
> are bitcode files.
This can be identified via LLVM's sys::IdentifyFileType()

> One thing I'm wondering is how to merge the C code of collect2 with the C++ 
> code that uses liblto:
> - convert collect2.c to collect2.cpp?
> - put the C++ code in a separate source file and link the C object file and 
> the C++ object file together into a single collect2 executable?
> - expose more functionality from include/llvm-c/LinkTimeOptimizer.h? 
> (meaning the code using liblto would be C, not be C++)
There are C wrappers for liblto calls. Also, ask Chandler (CCed) about
his patches. Maybe he started to work on collect integration already.

-- 
With best regards, Anton Korobeynikov.

Faculty of Mathematics & Mechanics, Saint Petersburg State University.





More information about the llvm-dev mailing list