imageworks/OpenShadingLanguage — pull request #444 by lgritz (2014-12-17 05:14:35+00:00)
Title: OSLCompiler::compile_buffer

Add OSLCompiler::compile_buffer that compiles osl source in a string into oso output in a string. When combined with ShadingSystem::LoadMemoryCompiledShader, this allows you to go from osl source in memory all the way to execution of the shader, without writing or reading any disk files.

Along the way, we changed a few other things of note:
* OSLCompiler::compile options to std::string vector, for simplicity.
* Remove old /bin/cpp usage, always use Boost Wave.
* Modify OSLCompiler to rely an an ErrorHandler instead of direct stderr output.
* The full OSLCompiler is now built into liboslexec (buy the shading system, get the compiler for free).
* Always use Boost Wave. No more reliance on /usr/bin/cpp, it's too much trouble to maintain parallel code paths, and at this point we totally trust Boost Wave.

(Open question: should we coalesce liboslexec, liboslcomp, and liboslquery into one big libosl? Or is there utility to having, in particular, just OSLQuery or just OSLCompiler linked against an app without dragging ShadingSystem and LLVM with it.)