[LLVMdev] accessing a bitcode library exported from C++ using the JIT

Samuel Crow samuraileumas at yahoo.com
Mon Aug 31 12:17:01 PDT 2009


Hello,

My partner and I am making a small app needs to access a C++ library from the LLVM 2.5 JIT.  We've made sure that there are no classes and have put 'extern "c"' in front of the functions we need to access.  In order to make this work, we seem to need to have a bitcode version of libstdc++ so we can avoid writing our own implementations of std::string and std::vector.  I've been trying to get the version of libstdc++ that came with llvm-gcc-4.2-2.5 to configure and compile.  I've set the environment variables to use llvm-gcc and llvm-g++ respectively and placed the --emit-llvm flag in the CCFLAGS and CXXFLAGS environment variables.  Configure works but make fails with:

from /Users/samuraicrow/Documents/llvm-gcc4.2-2.5.source/libstdc++-v3/include/precompiled/extc++.h:60:
/Users/samuraicrow/Documents/llvm-gcc4.2-2.5.source/libstdc++-v3/include/ext/pb_ds/detail/priority_queue_base_dispatch.hpp:79: error: ISO C++ forbids declaration of ‘rc_binomial_heap_’ with no type
/Users/samuraicrow/Documents/llvm-gcc4.2-2.5.source/libstdc++-v3/include/ext/pb_ds/detail/priority_queue_base_dispatch.hpp:79: error: expected ‘;’ before ‘<’ token

I'm building on MacOSX 10.5.8 and my parnter will be building on MinGW under Windows XP.

Is this a problem with the source or with my configuration?  Has this been solved in version 2.6 prerelease or ToT?

Thanks in advace for your help,

--Sam



      




More information about the llvm-dev mailing list